pub enum FailoverEvent {
LeaderLost {
old_leader: NodeId,
election_triggered: bool,
},
LeaderElected {
new_leader: NodeId,
},
FailoverTimeout,
PeerFailed {
node_id: NodeId,
},
PeerRecovered {
node_id: NodeId,
},
}Expand description
Events produced by the FailoverCoordinator during each tick.
Variants§
LeaderLost
The current leader has been detected as failed and an election has been scheduled (after the jitter delay expires).
Fields
LeaderElected
A new leader has been acknowledged (set via FailoverCoordinator::set_leader).
FailoverTimeout
The election jitter timer expired without a new leader being set.
PeerFailed
A non-leader peer has failed.
PeerRecovered
A previously-failed peer has recovered.
Trait Implementations§
Source§impl Clone for FailoverEvent
impl Clone for FailoverEvent
Source§fn clone(&self) -> FailoverEvent
fn clone(&self) -> FailoverEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FailoverEvent
impl Debug for FailoverEvent
Source§impl PartialEq for FailoverEvent
impl PartialEq for FailoverEvent
impl Eq for FailoverEvent
impl StructuralPartialEq for FailoverEvent
Auto Trait Implementations§
impl Freeze for FailoverEvent
impl RefUnwindSafe for FailoverEvent
impl Send for FailoverEvent
impl Sync for FailoverEvent
impl Unpin for FailoverEvent
impl UnsafeUnpin for FailoverEvent
impl UnwindSafe for FailoverEvent
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