openraft 0.9.22

Advanced Raft consensus
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::proposer::Candidate;
use crate::proposer::Leader;
use crate::quorum::Joint;
use crate::type_config::alias::NodeIdOf;

/// The quorum set type used by `Leader`.
pub(crate) type LeaderQuorumSet<NID> = Joint<NID, Vec<NID>, Vec<Vec<NID>>>;

pub(crate) type LeaderState<C> = Option<Box<Leader<C, LeaderQuorumSet<NodeIdOf<C>>>>>;
pub(crate) type CandidateState<C> = Option<Candidate<C, LeaderQuorumSet<NodeIdOf<C>>>>;