ypaq / riakc_poolboy

Riak Connection Pool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Riak Protocol Buffers Client Pool

Build Status

About

Riak client connection pool using poolboy

Usage

SizeArgs = [{size, 10},
            {max_overflow, 20}],
WorkerArgs = [{hostname, "127.0.0.1"},
              {port, 8087},
              {ping_every, 50000}, %% undefined or absent to disable
              {options, [{auto_reconnect, true}]}],
PoolName = badger_pool,
riakc_poolboy:start_pool(PoolName, SizeArgs, WorkerArgs),

{ok, Obj} = riakc_poolboy:get(PoolName, <<"a_bucket">>, <<"a_key">>).

riakc_poolboy:stop_pool(PoolName).

TODO

  • Support streaming functions
  • Tests

About

Riak Connection Pool

License:BSD 2-Clause "Simplified" License