The shared in-memory key-value store, a single GenServer backing every
endpoint.
It holds two independent keyspaces so both the bucketed and bucketless protocols can share one process:
- a bucketed space —
put/3,get/2,delete/2take(bucket, key)and are used byFakeRiak.Riak; - a bucketless space —
put/2,get/1,delete/1take just(key)and are used byFakeRiak.Redis,FakeRiak.EtcdandFakeRiak.Memcached.
get replies {:ok, value} or {:error, reason}; put/delete reply :ok
(with delete returning {:error, reason} when the key is absent). The
public functions run in the caller's connection process, so when --verbose
is set they log each operation, attributed to that connection's protocol.
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Callback implementation for GenServer.init/1.