pub struct RaftTuning {
pub heartbeat_ms: u64,
pub election_timeout_min_ms: u64,
pub election_timeout_max_ms: u64,
}Expand description
Raft timing knobs: the defaults suit a LAN; on high-latency / wide-area networks, scale them up to avoid falsely concluding that the leader is unreachable.
Fields§
§heartbeat_ms: u64Leader heartbeat interval (ms).
election_timeout_min_ms: u64Lower bound of the election timeout (ms). Should be far larger than the heartbeat interval.
election_timeout_max_ms: u64Upper bound of the election timeout (ms).
Trait Implementations§
Source§impl Clone for RaftTuning
impl Clone for RaftTuning
Source§fn clone(&self) -> RaftTuning
fn clone(&self) -> RaftTuning
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RaftTuning
impl Debug for RaftTuning
Auto Trait Implementations§
impl Freeze for RaftTuning
impl RefUnwindSafe for RaftTuning
impl Send for RaftTuning
impl Sync for RaftTuning
impl Unpin for RaftTuning
impl UnsafeUnpin for RaftTuning
impl UnwindSafe for RaftTuning
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