pub struct Chitchat { /* private fields */ }
Implementations
sourceimpl Chitchat
impl Chitchat
pub fn with_node_id_and_seeds(
config: ChitchatConfig,
seed_addrs: Receiver<HashSet<SocketAddr>>,
initial_key_values: Vec<(String, String)>
) -> Self
pub fn create_syn_message(&mut self) -> ChitchatMessage
pub fn process_message(
&mut self,
msg: ChitchatMessage
) -> Option<ChitchatMessage>
sourcepub fn update_nodes_liveliness(&mut self)
pub fn update_nodes_liveliness(&mut self)
Checks and marks nodes as dead or live.
pub fn node_state(&self, node_id: &NodeId) -> Option<&NodeState>
pub fn self_node_state(&mut self) -> &mut NodeState
sourcepub fn live_nodes(&self) -> impl Iterator<Item = &NodeId>
pub fn live_nodes(&self) -> impl Iterator<Item = &NodeId>
Retrieves the list of all live nodes.
sourcepub fn dead_nodes(&self) -> impl Iterator<Item = &NodeId>
pub fn dead_nodes(&self) -> impl Iterator<Item = &NodeId>
Retrieve the list of all dead nodes.
sourcepub fn seed_nodes(&self) -> HashSet<SocketAddr>
pub fn seed_nodes(&self) -> HashSet<SocketAddr>
Retrieve a list of seed nodes.
pub fn self_node_id(&self) -> &NodeId
pub fn cluster_id(&self) -> &str
pub fn update_heartbeat(&mut self)
sourcepub fn state_snapshot(&self) -> ClusterStateSnapshot
pub fn state_snapshot(&self) -> ClusterStateSnapshot
Returns a serializable snapshot of the ClusterState
sourcepub fn live_nodes_watcher(&self) -> WatchStream<HashSet<NodeId>>
pub fn live_nodes_watcher(&self) -> WatchStream<HashSet<NodeId>>
Returns a watch stream for monitoring changes on the cluster’s live nodes.
Auto Trait Implementations
impl !RefUnwindSafe for Chitchat
impl Send for Chitchat
impl Sync for Chitchat
impl Unpin for Chitchat
impl !UnwindSafe for Chitchat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more