Module node

Module node 

Source
Expand description

Raft node container and lifecycle management.

The Node struct acts as a host for a Raft consensus participant, coordinating between the core protocol implementation ([crate::raft::Raft]) and external subsystems:

§Key Responsibilities

  • Manages the Raft finite state machine lifecycle
  • Maintains node readiness state for cluster coordination
  • Executes the main event processing loop inside Raft

§Example Usage

let node = NodeBuilder::new(node_config).build().ready().unwrap();
tokio::spawn(async move {
    node.run().await.expect("Raft node execution failed");
});

Structs§

Node
Raft node container
NodeBuilder
Builder pattern implementation for constructing a Raft node with configurable components. Provides a fluent interface to set up node configuration, storage, transport, and other dependencies.

Enums§

NodeMode