View Source RedixPool (redix_pool v0.1.0)

A name-based pool implement built on Redix.

Summary

Functions

Returns a specification to start this module under a supervisor.

get random conn and delegate to Redix, See Redix.command/3

get random conn and delegate to Redix, See Redix.command!/3

get_conn_name by pool_name an pool_index

get_conn_pool_name by conn_name, can be use for log and metric. see Redix.Telemetry.Example for usage.

get random conn and delegate to Redix, See Redix.noreply_command/3

get random conn and delegate to Redix, See Redix.noreply_command!/3

get random conn and delegate to Redix, See Redix.noreply_pipeline/3

get random conn and delegate to Redix, See Redix.noreply_pipeline!/3

get random conn and delegate to Redix, See Redix.pipeline/3

get random conn and delegate to Redix, See Redix.pipeline!/3

start a redix name based pool. redix_param refer to Redix.start_link

get random conn and delegate to Redix, See Redix.transaction_pipeline/3

get random conn and delegate to Redix, See Redix.transaction_pipeline!/3

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

command(pool_name, command, opts)

View Source

get random conn and delegate to Redix, See Redix.command/3

Link to this function

command!(pool_name, command, opts)

View Source

get random conn and delegate to Redix, See Redix.command!/3

Link to this function

get_conn_name!(pool_name, index)

View Source
@spec get_conn_name!(pool_name :: atom(), index :: integer()) :: atom()

get_conn_name by pool_name an pool_index

Link to this function

get_conn_pool_name!(conn_name)

View Source
@spec get_conn_pool_name!(conn_name :: atom()) :: String.t()

get_conn_pool_name by conn_name, can be use for log and metric. see Redix.Telemetry.Example for usage.

Link to this function

noreply_command(pool_name, command, opts)

View Source

get random conn and delegate to Redix, See Redix.noreply_command/3

Link to this function

noreply_command!(pool_name, command, opts)

View Source

get random conn and delegate to Redix, See Redix.noreply_command!/3

Link to this function

noreply_pipeline(pool_name, commands, opts)

View Source

get random conn and delegate to Redix, See Redix.noreply_pipeline/3

Link to this function

noreply_pipeline!(pool_name, commands, opts)

View Source

get random conn and delegate to Redix, See Redix.noreply_pipeline!/3

Link to this function

pipeline(pool_name, commands, opts)

View Source

get random conn and delegate to Redix, See Redix.pipeline/3

Link to this function

pipeline!(pool_name, commands, opts)

View Source

get random conn and delegate to Redix, See Redix.pipeline!/3

@spec start_link(opts :: list()) :: :ignore | {:error, any()} | {:ok, pid()}

start a redix name based pool. redix_param refer to Redix.start_link

Examples

iex(2)> {:ok, p} = RedixPool.start_link([pool_name: :test, pool_size: 16, redix_param: [host: "127.0.0.1"]])

iex(3)> RedixPool.command(:test, ["GET", "K"], [])

Link to this function

transaction_pipeline(pool_name, commands, opts)

View Source

get random conn and delegate to Redix, See Redix.transaction_pipeline/3

Link to this function

transaction_pipeline!(pool_name, commands, opts)

View Source

get random conn and delegate to Redix, See Redix.transaction_pipeline!/3