Module raft::prelude[][src]

Expand description

A “prelude” for crates using the raft crate.

This prelude is similar to the standard library’s prelude in that you’ll almost always want to import its entire contents, but unlike the standard library’s prelude you’ll have to do so manually:

use raft::prelude::*;

The prelude may grow over time as additional items see ubiquitous use.

Re-exports

pub use crate::storage::RaftState;
pub use crate::storage::Storage;
pub use crate::raw_node::Peer;
pub use crate::raw_node::RawNode;
pub use crate::raw_node::Ready;
pub use crate::raw_node::SnapshotStatus;

Structs

ConfChange
ConfChangeSingle
ConfChangeV2
ConfState
Config

Config contains the parameters to start a raft.

Entry

Generated files are compatible only with the same version of protobuf runtime.

HardState
Message
Progress

The progress of catching up from a restart.

Raft

A struct that represents the raft consensus itself. Stores details concerning the current and possible state the system can take.

ReadState

ReadState provides state for read only query. It’s caller’s responsibility to send MsgReadIndex first before getting this state from ready. It’s also caller’s duty to differentiate if this state is what it requests through request_ctx, e.g. given a unique id as request_ctx.

Snapshot
SnapshotMetadata
Status

Represents the current status of the raft

Enums

ConfChangeTransition
ConfChangeType
EntryType
MessageType
ReadOnlyOption

Determines the relative safety of and consistency of read only requests.