Skip to main content

Module node

Module node 

Source
Expand description

The Raft node: a pure sans-I/O state machine.

Node::step consumes one Event and returns the Action values the driver must execute. The node reads no clock, opens no socket, and touches no disk; time arrives as Event::Tick, messages as Event::Message, and durable writes complete as Event::Persisted.

Roles and transitions follow docs/ARCHITECTURE.md section 6. Every election runs through Pre-Vote first: a node never increments its persistent term merely because its election timer fired. Responses whose correctness depends on durable state are held in a pending queue and released only by the matching Event::Persisted (invariant T-02).

Structs§

Node
One Raft node.
NodeStats
A node’s whole operating state at one instant, as data.
PeerStats
One peer’s replication progress, as reported in a stats snapshot.

Enums§

Role
The role a node currently plays. Learner is a membership status, not a role: a learner runs the follower transitions with voting disabled.