pub struct NodeRegistry { /* private fields */ }
Expand description
Node registry for tracking cluster members
Implementations§
Source§impl NodeRegistry
impl NodeRegistry
pub fn new() -> Self
pub fn register_node(&mut self, nodeinfo: NodeInfo) -> CoreResult<bool>
pub fn get_all_nodes(&self) -> Vec<NodeInfo>
pub fn get_healthy_nodes(&self) -> Vec<NodeInfo>
pub fn get_node_status(&self, nodeid: &str) -> Option<NodeStatus>
pub fn update_node_status( &mut self, nodeid: &str, status: NodeStatus, ) -> CoreResult<()>
Trait Implementations§
Source§impl Debug for NodeRegistry
impl Debug for NodeRegistry
Auto Trait Implementations§
impl Freeze for NodeRegistry
impl RefUnwindSafe for NodeRegistry
impl Send for NodeRegistry
impl Sync for NodeRegistry
impl Unpin for NodeRegistry
impl UnwindSafe for NodeRegistry
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more