pub struct ElectConfig {
pub hb_interval: Duration,
pub down_after: Duration,
pub election_timeout: Duration,
pub election_backoff: Duration,
pub election_backoff_jitter: Duration,
}Expand description
Tunable timeouts. Defaults match the protocol spec — operators
can override via the [cluster] config section once the
kevy-server adapter (separate task) wires the live config in.
Fields§
§hb_interval: DurationPeriod between outbound HB per peer. Default 200 ms.
down_after: DurationFlag a peer DOWN after this duration without an inbound HB.
Default 5 s = 25 × hb_interval (a transient 1 s blip
doesn’t trigger an election).
election_timeout: DurationCandidate waits this long for quorum ACCEPT before backing
off. Default 3 s.
election_backoff: DurationBackoff floor after a failed election attempt. Real wait
adds jitter up to election_backoff_jitter to prevent
dueling candidates from re-running synchronously.
election_backoff_jitter: DurationRandom jitter added to election_backoff per attempt.
Default 4 s (so the real range is 1–5 s).
Trait Implementations§
Source§impl Clone for ElectConfig
impl Clone for ElectConfig
Source§fn clone(&self) -> ElectConfig
fn clone(&self) -> ElectConfig
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 moreimpl Copy for ElectConfig
Source§impl Debug for ElectConfig
impl Debug for ElectConfig
Auto Trait Implementations§
impl Freeze for ElectConfig
impl RefUnwindSafe for ElectConfig
impl Send for ElectConfig
impl Sync for ElectConfig
impl Unpin for ElectConfig
impl UnsafeUnpin for ElectConfig
impl UnwindSafe for ElectConfig
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