pub struct SwarmSpecRaftInlineItem {
    pub election_tick: Option<isize>,
    pub heartbeat_tick: Option<isize>,
    pub keep_old_snapshots: Option<u64>,
    pub log_entries_for_slow_followers: Option<u64>,
    pub snapshot_interval: Option<u64>,
}
Expand description

Raft configuration.

Fields§

§election_tick: Option<isize>

The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. ElectionTick must be greater than HeartbeatTick.

A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.

§heartbeat_tick: Option<isize>

The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers.

A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.

§keep_old_snapshots: Option<u64>

The number of snapshots to keep beyond the current snapshot.

§log_entries_for_slow_followers: Option<u64>

The number of log entries to keep around to sync up slow followers after a snapshot is created.

§snapshot_interval: Option<u64>

The number of log entries between snapshots.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more