Structs§
- Ballot in election.
- Clock of log entry. If two entries have the same clock, they should be the same entry. It is like the hash of the git commit.
- Log entry.
RaftProcess
is a implementation of Raft process inRaftNode
.RaftProcess
is unaware of the gRPC and the network but just focuses on the Raft algorithm.
Traits§
RaftApp
is the representation of state machine in Raft. Beside the application state, it also contains the snapshot store where snapshot data is stored with a snapshot index as a key.RaftBallotStore
is the representation of the ballot store in Raft. Conceptually, it is likeRwLock<Ballot>
.RaftLogStore
is the representation of the log store in Raft. Conceptually, it is likeRwLock<BTreeMap<Index, Entry>>
.
Type Aliases§
- Log index.
- Snapshot is transferred as stream of bytes.
SnapshotStream
is converted to gRPC streaming outside of theRaftProcess
.` - Election term. In Raft, only one leader can be elected per a term.