Skip to content

Redis Protocol Erlang Implementation

License

Notifications You must be signed in to change notification settings

niamtokik/redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis

redis is an application and library implementing redis protocol in Erlang.

Build Status

Usage

rebar3 shell

Serializer

Encoding Erlang terms in Redis data format using redis:encode/1 function:

% integer
redis:encode(1).

% simple string
redis:encode(<<"test">>).

% bulk string
redis:encode({bulk_string, <<"test">>).

% array
redis:encode([1,2,3,<<"test">>, {bulk_string, <<"test">>}]).

% error
redis:encode({error, <<"my message">>}).

Decoding Redis data in Erlang term with redis:decode/1 function:

% simple string
redis:decode(<<"+OK\r\n">>).

% integer
redis:decode(<<":1\r\n">>).

% bulk string
redis:decode(<<"$3\r\nfoo\r\n">>).

% array
redis:decode(<<"*0\r\n\r\n">>).

% error
redis:decode(<<"-Message\r\n">>).

Client

wip.

Server

wip.

Test

rebar3 eunit

Resources and References

About

Made with <3 by Mathieu Kerjouan with Erlang and rebar3.

Releases

No releases published

Packages

No packages published

Languages