FakeRiak.SimpleStore (fake_riak v0.1.0)

Copy Markdown View Source

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:

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

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

delete(key)

delete(bucket, key)

get(key)

get(bucket, key)

init(_)

Callback implementation for GenServer.init/1.

put(key, value)

put(bucket, key, value)

start_link(_)