Skip to main content

nodedb_cluster/raft_loop/
mod.rs

1//! Raft event loop — drives MultiRaft ticks and dispatches messages over the transport.
2//!
3//! Split across files:
4//! - [`loop_core`]: `RaftLoop` struct, constructors, builders, public API
5//!   (`propose`, `propose_conf_change`, `group_statuses`), and the main
6//!   `run` shutdown-driven loop.
7//! - [`tick`]: one iteration of the tick pipeline — drive MultiRaft,
8//!   dispatch outbound AE/RV, apply committed entries, promote
9//!   caught-up learners.
10//! - [`handle_rpc`]: inbound RPC routing (`impl RaftRpcHandler`). The
11//!   `JoinRequest` arm delegates to [`join`].
12//! - [`join`]: async server-side `JoinRequest` orchestration — register
13//!   peer, propose `AddLearner` on every group, wait for commit,
14//!   broadcast topology, persist catalog, build the wire response.
15
16pub mod handle_rpc;
17pub mod join;
18pub mod loop_core;
19pub mod tick;
20
21pub use loop_core::{CommitApplier, RaftLoop, VShardEnvelopeHandler};