NOTE: Somewhat production ready.... (Some big features are not implemented, but if this subset satisfies your needs then it is working well...)
An Erlang Redis client based on the High-performance Shackle client library. A lot of this library's design was inspired and driven by the design/code in Anchor, and Shackle.
- Rest of client commands
- Faster decoding
- Multi/Exec commands
To get familiar with Shackle by doing a simple/small project.
Right now tests use the locally setup redis server, this could be very dangerous to your environment as they flush DBs.
1> rediz:start(rediz_local_pool, #{ip => "127.0.0.1",
port => 6379,
auth => no_auth,
db => 0,
pool_size => 16}).
ok
2> rediz:hset(<<"rediz:hash">>, <<"field">>, <<"val">>, rediz_local_pool).
{ok, 1}
3> rediz:hset(<<"rediz:hash">>, <<"field2">>, <<"val2">>, rediz_local_pool).
{ok, 1}
4> rediz:hkeys(<<"redis:hash">>, rediz_local_pool).
{ok, []}
5> rediz:hkeys(<<"rediz:hash">>, rediz_local_pool).
{ok, [<<"field2">>, <<"field">>]}
6> rediz:hget(<<"rediz:hash">>, <<"field2">>, rediz_local_pool).
{ok, <<"val2">>}
7> rediz:hgetall(<<"rediz:hash">>, rediz_local_pool).
{ok,[{<<"field2">>, <<"val2">>},
{<<"field">>, <<"val">>}]}
8> rediz:keys(<<"rediz:*">>, rediz_local_pool).
{ok, [<<"rediz:hash">>]}