Optional options: RaftNodeOptionsPrivate commitPrivate currentPrivate destroyedPrivate Readonly electionPrivate Readonly electionPrivate electionPrivate Readonly eventPrivate Readonly heartbeatPrivate heartbeatReadonly idPrivate lastPrivate leaderPrivate Readonly logPrivate matchPrivate nextPrivate peersPrivate roleCalled by the node to send an RPC to a peer — must be wired up externally
Private votedPrivate votesPrivate advancePrivate applyPrivate becomePrivate becomePrivate becomePrivate clearPrivate clearPrivate emitRest ...args: Parameters<RaftNodeEvents<T>[E]>Private handlePrivate handleHandle an incoming Raft RPC message from a peer
Private handlePrivate handlePrivate isRemove an event listener
Register an event listener
Private persistPrivate resetPrivate sendPrivate sendGenerated using TypeDoc
Core Raft consensus node.
This class implements the Raft algorithm for leader election and log replication. It is transport-agnostic — the caller must wire up
sendMessageto deliver RPCs, and callhandleMessagewhen RPCs arrive.Log indices are 1-based per the Raft paper.