#[repr(u8)]pub enum PeerState {
Unknown = 0,
Joining = 1,
Normal = 2,
Standby = 3,
Down = 4,
Reset = 5,
Leaving = 6,
}Expand description
Lifecycle state of a peer in the gossip view.
Numeric values match the reference engine’s per-node state
constants (UNKNOWN, JOINING, NORMAL, STANDBY, DOWN,
RESET, LEAVING).
Variants§
Unknown = 0
Initial state before the first observation.
Joining = 1
Peer is bootstrapping into the ring.
Normal = 2
Peer is healthy and serving traffic.
Standby = 3
Peer is on warm standby; requests are not routed there.
Down = 4
Failure detector marked the peer down.
Reset = 5
Peer is being re-established (connection pool reset).
Leaving = 6
Peer is preparing to leave the ring.
Implementations§
Source§impl PeerState
impl PeerState
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Stable string label.
§Examples
use dynomite::cluster::peer::PeerState;
assert_eq!(PeerState::Normal.name(), "NORMAL");Sourcepub fn is_routable(self) -> bool
pub fn is_routable(self) -> bool
True when the dispatcher should consider this peer for
routing decisions. Joining peers are accepted because the
reference engine includes them in the continuum until they
transition to Down or Leaving.
§Examples
use dynomite::cluster::peer::PeerState;
assert!(PeerState::Normal.is_routable());
assert!(!PeerState::Down.is_routable());Trait Implementations§
impl Copy for PeerState
impl Eq for PeerState
impl StructuralPartialEq for PeerState
Auto Trait Implementations§
impl Freeze for PeerState
impl RefUnwindSafe for PeerState
impl Send for PeerState
impl Sync for PeerState
impl Unpin for PeerState
impl UnsafeUnpin for PeerState
impl UnwindSafe for PeerState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.