pub struct RingPeer {
pub node: String,
pub dc: String,
pub rack: String,
pub tokens: Vec<u32>,
pub state: String,
pub is_local: bool,
}Expand description
One peer rendered as a typed, machine-parseable ring row.
This is the JSON-friendly counterpart to the free-form
RowSection used by the plaintext dump: every field is a
named value so a consumer (such as dyn-admin ring-status)
can deserialize the whole ring without scraping text.
§Examples
use dynomite::admin::cluster_info::RingPeer;
let p = RingPeer {
node: "10.0.0.1:8101".into(),
dc: "dc1".into(),
rack: "r1".into(),
tokens: vec![0, 2_147_483_648],
state: "NORMAL".into(),
is_local: true,
};
assert_eq!(p.tokens.len(), 2);Fields§
§node: StringNode label: host:port for a remote peer, or the local
node’s endpoint.
dc: StringDatacenter name.
rack: StringRack name.
tokens: Vec<u32>Token list as the u32 integers the engine uses for ring
lookups.
state: StringLifecycle state name (JOINING, NORMAL, DOWN, …).
is_local: boolTrue for the local peer.
Trait Implementations§
impl Eq for RingPeer
impl StructuralPartialEq for RingPeer
Auto Trait Implementations§
impl Freeze for RingPeer
impl RefUnwindSafe for RingPeer
impl Send for RingPeer
impl Sync for RingPeer
impl Unpin for RingPeer
impl UnsafeUnpin for RingPeer
impl UnwindSafe for RingPeer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.