Raft::Transport::InMemory
Inherits Raft::Transport < Reference < Object
In-memory transport for testing.
Messages are delivered directly between fibers via a class-level channel
registry — no sockets involved. Supports partition simulation via
partition / heal class methods.
Call reset between test cases to clear all registrations and partitions.
Constructors
Class methods
Removes the partition between nodes a and b, restoring connectivity.
Simulates a network partition between nodes a and b (bidirectional).
Instance methods
Sends an RPC message to the peer identified by peer_id.
Delivery is best-effort. If the peer is unreachable the message is silently dropped — Raft's protocol-level retries handle the loss.
Starts listening for incoming messages.
Received messages are wrapped in RPC::Envelope (tagged with sender ID)
and pushed into the provided inbox channel.