pub enum Role {
Primary,
Replica,
Candidate,
}Expand description
Self-perceived role of a node in its heartbeat. The state
machine in kevy-elect’s reactor decides which transitions are
legal; this enum is just what gets put on the wire.
Variants§
Primary
This node currently accepts writes.
Replica
This node mirrors a primary.
Candidate
This node has sent OFFER for the current epoch and is
waiting for quorum ACCEPT. Transitional — once enough
ACCEPTs arrive it flips to Primary and broadcasts
ANNOUNCE; if the election times out it flips back to
Replica and re-arms its DOWN detector.
Implementations§
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more