Module raft::prelude

source ·
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

Structs

  • Config contains the parameters to start a raft.
  • Generated files are compatible only with the same version of protobuf runtime.
  • The progress of catching up from a restart.
  • A struct that represents the raft consensus itself. Stores details concerning the current and possible state the system can take.
  • 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.
  • Represents the current status of the raft

Enums