pub struct Membership { /* private fields */ }Expand description
Tracks cluster peers by polling the distribution connection table.
Implementations§
Source§impl Membership
impl Membership
Sourcepub fn new(connections: ConnectionManager, atoms: Arc<AtomTable>) -> Self
pub fn new(connections: ConnectionManager, atoms: Arc<AtomTable>) -> Self
Creates a membership tracker over connections with an empty peer set.
Sourcepub fn peer_names(&self) -> Vec<String>
pub fn peer_names(&self) -> Vec<String>
The currently-tracked peers as resolved node-name strings.
Sourcepub fn poll_once(&self) -> MembershipDelta
pub fn poll_once(&self) -> MembershipDelta
Polls the connection table once, updates the tracked peer set, and returns the join/leave delta since the previous poll.
Trait Implementations§
Source§impl Clone for Membership
impl Clone for Membership
Source§fn clone(&self) -> Membership
fn clone(&self) -> Membership
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Membership
impl !UnwindSafe for Membership
impl Freeze for Membership
impl Send for Membership
impl Sync for Membership
impl Unpin for Membership
impl UnsafeUnpin for Membership
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