API Reference fake_riak v#0.2.1

Copy Markdown View Source

Modules

Top-level namespace for FakeRiak.

Command-line entry point for the mix escript.build executable.

Generic, framing-agnostic connection serve loop.

Wire-level tracing enabled by --debug (see FakeRiak.CLI).

Fake etcd endpoint speaking the etcd v2 HTTP/JSON API over TCP.

A minimal HTTP/1.1 request parser and response builder shared by the Riak and etcd handlers (both of which speak HTTP over TCP).

A supervised TCP acceptor for a single protocol.

Fake memcached endpoint speaking the classic memcached text protocol.

Minimal protobuf (proto2) wire-format codec, just enough for the Riak PBC messages FakeRiak.RiakPBC speaks.

Behaviour implemented by every wire-protocol handler (Riak, Redis, etcd, memcached).

Fake Redis endpoint speaking RESP (the Redis serialization protocol).

Fake Riak KV endpoint speaking both of Riak's client APIs on the same port: the HTTP API and the Protocol Buffers (PBC) API.

The Protocol Buffers (PBC) side of the fake Riak endpoint.

The shared in-memory key-value store, a single GenServer backing every endpoint.

Detects whether a freshly accepted connection is starting a TLS handshake and, if so, silently terminates TLS before handing the plaintext byte stream to FakeRiak.Connection. Everything else is served as plain TCP, so every listener transparently accepts both on the same port.