[][src]Module raft::prelude

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 eraftpb::ConfChange;
pub use eraftpb::ConfChangeType;
pub use eraftpb::ConfState;
pub use eraftpb::Entry;
pub use eraftpb::EntryType;
pub use eraftpb::HardState;
pub use eraftpb::Message;
pub use eraftpb::MessageType;
pub use eraftpb::Snapshot;
pub use eraftpb::SnapshotMetadata;
pub use storage::RaftState;
pub use storage::Storage;
pub use raw_node::Peer;
pub use raw_node::RawNode;
pub use raw_node::Ready;
pub use raw_node::SnapshotStatus;

Structs

Config

Config contains the parameters to start a raft.

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.

Status

Represents the current status of the raft

Enums

ReadOnlyOption

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