View Source RedixPool

A name-based pool implement built on redix refer to redix-real-world-usage

Usage

start by child_spec:

# see Redix.start_link for redix_param.
child_spec = RedixPool.child_spec(pool_name: :test, redix_param: [host: "127.0.0.1"])
{:ok, _} = Supervisor.start_child(YourSupervisor, child_spec)
# use pool_name instead of conn, see Redix.command for usage.
RedixPool.command(:test, ["GET", "K"], [])

start by start_link:

# see Redix.start_link for redix_param.
{:ok, _} = RedixPool.start_link([pool_name: :test, redix_param: [host: "127.0.0.1"]])
# use pool_name instead of conn, see Redix.command for usage.
RedixPool.command(:test, ["GET", "K"], [])