Raft::MemoryTransport
Inherits Raft::Transport < Reference < Object
In-memory transport backed by IO pipes. Wire format is identical to TCPTransport — specs exercise the same encode/decode and outbox/drain paths that run in production. Per-node: each instance owns one outbox, one dispatcher fiber, and a reader+writer fiber pair for each peer.
Constants
Constructors
Class methods
Test helper: full-mesh wiring for node_ids. Returns a hash so
specs can address transports by node id.
Instance methods
Wire this transport to a peer via an IO pipe pair. Safe to call before
or after start — fibers spawn lazily for the peer.
MemoryTransport routes by pipe, not network address — no-op for API parity with TCPTransport.
Synchronous write directly to the peer's pipe. Used by per-peer writer fibers; tests can also call this to bypass the outbox path.