Module eredis

Data Types

client()

client() = (Pid::pid()) | (Name::atom()) | {Name::atom(), Node::atom()} | {global, term()} | {via, module(), term()}

command()

command() = [term()]

Supports list, atom, binary or integer

continuation_data()

continuation_data() = any()

host()

host() = string() | {local, binary() | string()}

option()

option() = {transport, transport()} | {host, host()} | {port, 0..65535} | {database, undefined | string()} | {password, undefined | string()} | {reconnect_sleep, undefined | reconnect_sleep()} | {connect_timeout, undefined | non_neg_integer()}

parser_state()

parser_state() = status_continue | bulk_continue | multibulk_continue

pipeline()

pipeline() = [command()]

reconnect_sleep()

reconnect_sleep() = no_reconnect | non_neg_integer()

return_value()

return_value() = undefined | binary() | [binary() | nonempty_list()]

server_args()

server_args() = [option()]

transport()

transport() = tcp | ssl

Function Index

create_multibulk/1Creates a multibulk command with all the correct size headers.
q/2Executes the given command in the specified connection.
q/3
q_async/2Executes the command, and sends a message to this process with the response (with either error or success).
q_async/3Executes the command, and sends a message to Pid with the response (with either or success).
q_noreply/2Executes the command but does not wait for a response and ignores any errors.
qp/2Executes the given pipeline (list of commands) in the specified connection.
qp/3
qp_async/2Executes the pipeline, and sends a message to this process with the response (with either error or success).
qp_async/3
qp_noreply/2Executes the pipeline but does not wait for a response and ignores any errors.
start_link/0
start_link/1Callback for starting from poolboy.
start_link/2
start_link/3
start_link/4
start_link/5
start_link/6
start_link/7
stop/1

Function Details

create_multibulk/1

create_multibulk(Args::command()) -> Command::[[command()], ...]

Creates a multibulk command with all the correct size headers

q/2

q(Client::client(), Command::command()) -> {ok, return_value()} | {error, Reason::term() | no_connection}

Executes the given command in the specified connection. The command must be a valid Redis command and may contain arbitrary data which will be converted to binaries. The returned values will always be binaries.

q/3

q(Client, Command, Timeout) -> any()

q_async/2

q_async(Client::client(), Command::command()) -> {await, Tag::reference()}

Executes the command, and sends a message to this process with the response (with either error or success). Message is of the form {Tag, Reply}, where Reply is the reply expected from q/2.

q_async/3

q_async(Client::client(), Command::command(), Pid::pid() | atom()) -> {await, Tag::reference()}

Executes the command, and sends a message to Pid with the response (with either or success).

See also: q_async/2.

q_noreply/2

q_noreply(Client::client(), Command::command()) -> ok

Executes the command but does not wait for a response and ignores any errors.

See also: q/2.

qp/2

qp(Client::client(), Pipeline::pipeline()) -> [{ok, return_value()} | {error, Reason::binary()}] | {error, no_connection}

Executes the given pipeline (list of commands) in the specified connection. The commands must be valid Redis commands and may contain arbitrary data which will be converted to binaries. The values returned by each command in the pipeline are returned in a list.

qp/3

qp(Client, Pipeline, Timeout) -> any()

qp_async/2

qp_async(Client::client(), Pipeline::pipeline()) -> {await, Tag::reference()}

Executes the pipeline, and sends a message to this process with the response (with either error or success). Message is of the form {Tag, Reply}, where Reply is the reply expected from qp/2.

qp_async/3

qp_async(Client, Pipeline, Pid) -> any()

qp_noreply/2

qp_noreply(Client::client(), Pipeline::pipeline()) -> ok

Executes the pipeline but does not wait for a response and ignores any errors.

See also: q/2.

start_link/0

start_link() -> any()

start_link/1

start_link(Args::server_args()) -> {ok, Pid::pid()} | {error, Reason::term()}

Callback for starting from poolboy

start_link/2

start_link(Transport, Host) -> any()

start_link/3

start_link(Transport, Host, Port) -> any()

start_link/4

start_link(Transport, Host, Port, Database) -> any()

start_link/5

start_link(Transport, Host, Port, Database, Password) -> any()

start_link/6

start_link(Transport, Host, Port, Database, Password, ReconnectSleep) -> any()

start_link/7

start_link(Transport, Host, Port, Database, Password, ReconnectSleep, ConnectTimeout) -> any()

stop/1

stop(Client) -> any()


Generated by EDoc