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