pub enum NodeUpdate {
Alive {
node: NodeId,
addr: SocketAddr,
incarnation: u64,
},
Suspect {
node: NodeId,
incarnation: u64,
},
Dead {
node: NodeId,
incarnation: u64,
},
Left {
node: NodeId,
},
SlotsChanged {
node: NodeId,
incarnation: u64,
slots: Vec<SlotRange>,
},
RoleChanged {
node: NodeId,
incarnation: u64,
is_primary: bool,
replicates: Option<NodeId>,
},
VoteRequest {
candidate: NodeId,
epoch: u64,
offset: u64,
},
VoteGranted {
from: NodeId,
candidate: NodeId,
epoch: u64,
},
}Expand description
A state update about a node, piggybacked on protocol messages.
Variants§
Alive
Node is alive with given incarnation number.
Suspect
Node is suspected to be failing.
Dead
Node has been confirmed dead.
Left
Node left the cluster gracefully.
SlotsChanged
Node’s slot ownership changed.
RoleChanged
Node’s role changed (primary ↔ replica).
Fields
VoteRequest
A replica is requesting votes to take over a failed primary.
Fields
VoteGranted
A primary is granting its vote to a candidate replica.
Trait Implementations§
Source§impl Clone for NodeUpdate
impl Clone for NodeUpdate
Source§fn clone(&self) -> NodeUpdate
fn clone(&self) -> NodeUpdate
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 NodeUpdate
impl Debug for NodeUpdate
Source§impl PartialEq for NodeUpdate
impl PartialEq for NodeUpdate
impl StructuralPartialEq for NodeUpdate
Auto Trait Implementations§
impl Freeze for NodeUpdate
impl RefUnwindSafe for NodeUpdate
impl Send for NodeUpdate
impl Sync for NodeUpdate
impl Unpin for NodeUpdate
impl UnsafeUnpin for NodeUpdate
impl UnwindSafe for NodeUpdate
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