option() = {pool_size, pos_integer()} | {pool_type, pool_type()} | {auto_reconnect, false | pos_integer()} | {on_reconnect, reconn_callback()} | tuple()
pool_name() = term()
pool_type() = random | hash | round_robin
reconn_callback() = {fun((pid()) -> term())}
| get_client/1 | Get client/connection. |
| get_client/2 | Get client/connection with hash key. |
| name/1 | ecpool name. |
| pool_spec/4 | |
| set_reconnect_callback/2 | |
| start_pool/3 | Start the pool sup. |
| start_sup_pool/3 | Start the pool supervised by ecpool_sup. |
| stop_sup_pool/1 | Start the pool supervised by ecpool_sup. |
| with_client/2 | Call the fun with client/connection. |
| with_client/3 | Call the fun with client/connection. |
| workers/1 | Pool workers. |
get_client(Pool::atom()) -> pid()
Get client/connection
get_client(Pool::atom(), Key::any()) -> pid()
Get client/connection with hash key.
name(Pool) -> any()
ecpool name
pool_spec(ChildId, Pool, Mod, Opts) -> any()
set_reconnect_callback(Pool::atom(), Callback::reconn_callback()) -> ok
start_pool(Pool::atom(), Mod::atom(), Opts::[option()]) -> {ok, pid()} | {error, term()}
Start the pool sup.
start_sup_pool(Pool, Mod, Opts) -> any()
Start the pool supervised by ecpool_sup
stop_sup_pool(Pool) -> any()
Start the pool supervised by ecpool_sup
with_client(Pool::atom(), Fun::fun((Client::pid()) -> any())) -> no_return()
Call the fun with client/connection
with_client(Pool::atom(), Key::any(), Fun::fun((Client::pid()) -> term())) -> no_return()
Call the fun with client/connection
workers(Pool) -> any()
Pool workers
Generated by EDoc