Skip to main content

nodedb_raft/node/
mod.rs

1// SPDX-License-Identifier: BUSL-1.1
2
3//! Raft single-group state machine.
4//!
5//! Split across files:
6//! - [`config`]: `RaftConfig` (including voter/learner lists).
7//! - [`core`]: `RaftNode` struct, constructors, simple accessors, `tick`,
8//!   `propose`, and the `Ready` output type.
9//! - [`internal`]: Internal state transitions (elections, replication,
10//!   commit advancement) and timeout math.
11//! - [`membership`]: Dynamic configuration changes — add/remove voters,
12//!   add/remove/promote learners.
13//! - [`rpc`]: Incoming RPC handlers (`AppendEntries`, `RequestVote`,
14//!   `InstallSnapshot`, and their response handlers).
15
16pub mod config;
17pub mod core;
18mod internal;
19pub mod membership;
20pub mod rpc;
21
22pub use self::config::RaftConfig;
23pub use self::core::{RaftNode, Ready};