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
//! Configuration management for RockRaft nodes.
//!
//! Provides configuration structures and parsing for:
//! - Node identification and network endpoints
//! - Raft consensus parameters
//! - RocksDB storage settings
//!
//! # Example
//!
//! ```rust
//! use rockraft::config::{Config, RaftConfig, RocksdbConfig, Endpoint};
//!
//! let config = Config {
//! node_id: 1,
//! raft: RaftConfig {
//! endpoint: Endpoint::parse("127.0.0.1:5001").unwrap(),
//! advertise_endpoint: Endpoint::parse("127.0.0.1:5001").unwrap(),
//! join: vec![],
//! heartbeat_interval: None,
//! election_timeout_min: None,
//! election_timeout_max: None,
//! grpc_max_message_size: None,
//! },
//! rocksdb: RocksdbConfig {
//! data_path: "/tmp/raft".to_string(),
//! max_open_files: 1024,
//! },
//! };
//! ```
pub use Config;
pub use RaftConfig;
pub use RocksdbConfig;
pub use DEFAULT_GRPC_MAX_MESSAGE_SIZE;
pub use Endpoint;