pub struct RaftNodeConfig {
pub node_id: NodeId,
pub cluster_members: Vec<NodeId>,
pub election_timeout_min: u64,
pub election_timeout_max: u64,
pub heartbeat_interval: u64,
pub max_entries_per_message: usize,
pub snapshot_chunk_size: usize,
}Expand description
Configuration for a Raft node
Fields§
§node_id: NodeIdThis node’s ID
cluster_members: Vec<NodeId>IDs of all cluster members (including self)
election_timeout_min: u64Minimum election timeout (milliseconds)
election_timeout_max: u64Maximum election timeout (milliseconds)
heartbeat_interval: u64Heartbeat interval (milliseconds)
max_entries_per_message: usizeMaximum entries per AppendEntries RPC
snapshot_chunk_size: usizeSnapshot chunk size (bytes)
Implementations§
Trait Implementations§
Source§impl Clone for RaftNodeConfig
impl Clone for RaftNodeConfig
Source§fn clone(&self) -> RaftNodeConfig
fn clone(&self) -> RaftNodeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RaftNodeConfig
impl RefUnwindSafe for RaftNodeConfig
impl Send for RaftNodeConfig
impl Sync for RaftNodeConfig
impl Unpin for RaftNodeConfig
impl UnwindSafe for RaftNodeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more