#[non_exhaustive]pub enum ClusterEvent {
NodeJoined(NodeId),
NodeLeft(NodeId),
NodeRejected {
node_id: NodeId,
reason: NodeRejectionReason,
detail: String,
},
}Expand description
Events emitted by the cluster membership system.
Subscribe via ClusterEvents::subscribe to react to topology changes
such as scaling, failover, or planned maintenance.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NodeJoined(NodeId)
A new node has joined the cluster and is ready to receive messages.
NodeLeft(NodeId)
A node has left the cluster (gracefully or due to failure).
NodeRejected
A node attempted to join but was rejected during the version handshake.
This event is emitted when a connecting node fails the compatibility check (different wire protocol version or adapter) or when the handshake transport call itself fails. The rejected node does not appear in the cluster’s node list.
Trait Implementations§
Source§impl Clone for ClusterEvent
impl Clone for ClusterEvent
Source§fn clone(&self) -> ClusterEvent
fn clone(&self) -> ClusterEvent
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 ClusterEvent
impl Debug for ClusterEvent
Source§impl PartialEq for ClusterEvent
impl PartialEq for ClusterEvent
impl Eq for ClusterEvent
impl StructuralPartialEq for ClusterEvent
Auto Trait Implementations§
impl Freeze for ClusterEvent
impl RefUnwindSafe for ClusterEvent
impl Send for ClusterEvent
impl Sync for ClusterEvent
impl Unpin for ClusterEvent
impl UnsafeUnpin for ClusterEvent
impl UnwindSafe for ClusterEvent
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