Pool of pools of erlcql connections to separate cassandra cluster nodes
make deps compile
Start an application:
1> erlcql_cluster:start().
{ok,[snappy,lz4,erlcql,poolboy,erlcql_poolboy,
erlcql_cluster]}
Create new pool test
for cluster with nodes.
2> erlcql_cluster:new(test, [{nodes, [{"localhost", 9160}]},
{pool_size, 1},
{pool_overflow, 1},
{use, "kairosdb"},
{prepare, []}]).
ok
Checkout a resource and get erlcql client:
3> {ok, {Pool, Worker}} = erlcql_cluster:checkout(test).
{ok,{testlocalhost9160,<0.59.0>}}
4> erlcql_cluster_worker:get_client(Worker).
<0.60.0>
Checkin resource:
5> erlcql_cluster:checkin({Pool, Worker}).
ok