[][src]Module raft::storage

Represents the storage trait and example implementation.

The storage trait is used to house and eventually serialize the state of the system. Custom implementations of this are normal and this is likely to be a key integration point for your distributed storage.

Structs

MemStorage

MemStorage is a thread-safe but incomplete implementation of Storage, mainly for tests.

MemStorageCore

The Memory Storage Core instance holds the actual state of the storage struct. To access this value, use the rl and wl functions on the main MemStorage implementation.

RaftState

Holds both the hard state (commit index, vote leader, term) and the configuration state (Current node IDs)

Traits

Storage

Storage saves all the information about the current Raft implementation, including Raft Log, commit index, the leader to vote for, etc.