Skeg. KV
(skeg v1.0.0)
Copy Markdown
Key-value commands. Keys and values are binaries, sent and returned as is.
Every function takes :timeout in ms as an option. Errors are
%Skeg.Error{}; see it for what each kind proves about the request.
Summary
Functions
Deletes keys and returns how many existed.
The value under key, or nil when there is none. An empty value is "".
Adds one to the integer under key and returns the new value.
Adds delta to the integer under key and returns the new value.
The values of keys in the same order, nil where a key is missing.
Stores value under key, replacing any previous value.
Types
@type conn() :: Skeg.conn()
@type error() :: {:error, Skeg.Error.t()}
Functions
@spec delete(conn(), [binary(), ...], keyword()) :: {:ok, non_neg_integer()} | error()
Deletes keys and returns how many existed.
The value under key, or nil when there is none. An empty value is "".
Adds one to the integer under key and returns the new value.
Adds delta to the integer under key and returns the new value.
The values of keys in the same order, nil where a key is missing.
Stores value under key, replacing any previous value.