1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Raft configuration and runtime settings.
//!
//! This module defines configuration types for controlling Raft behavior.
//!
//! ## Key Types
//!
//! - [`Config`] - Main configuration for Raft runtime behavior
//! - [`SnapshotPolicy`] - Policy for triggering automatic snapshots
//! - [`RuntimeConfig`] - Dynamic configuration that can be changed at runtime
//! - [`ConfigError`] - Configuration validation errors
//!
//! ## Overview
//!
//! [`Config`] controls key aspects of Raft operation:
//! - **Election timeouts**: Min/max duration before starting election
//! - **Heartbeat interval**: Frequency of leader heartbeats to followers
//! - **Replication settings**: Max entries per payload, lag thresholds
//! - **Snapshot policy**: When to trigger automatic snapshots
//! - **Log management**: Purge batch size, max logs to keep
//!
//! ## Usage
//!
//! ```ignore
//! use openraft::Config;
//!
//! let config = Config {
//! heartbeat_interval: 50,
//! election_timeout_min: 150,
//! election_timeout_max: 300,
//! ..Default::default()
//! };
//!
//! let config = config.validate()?;
//! ```
//!
//! See [`Config`] for all available options and their defaults.
pub use Config;
pub use RuntimeConfig;
pub use SnapshotPolicy;
pub use ConfigError;