pub struct Members {
pub states: BTreeMap<ActorId, MemberState>,
pub by_addr: BTreeMap<SocketAddr, ActorId>,
pub rtts: BTreeMap<SocketAddr, Rtt>,
}Fields§
§states: BTreeMap<ActorId, MemberState>§by_addr: BTreeMap<SocketAddr, ActorId>§rtts: BTreeMap<SocketAddr, Rtt>Implementations§
Source§impl Members
impl Members
pub fn get(&self, id: &ActorId) -> Option<&MemberState>
pub fn update_sync_ts(&mut self, actor_id: &ActorId, ts: Timestamp)
pub fn add_member(&mut self, actor: &Actor) -> MemberAddedResult
pub fn remove_member(&mut self, actor: &Actor) -> bool
pub fn add_rtt(&mut self, addr: SocketAddr, rtt: Duration)
Sourcepub fn ring0(
&self,
cluster_id: ClusterId,
) -> impl Iterator<Item = SocketAddr> + '_
pub fn ring0( &self, cluster_id: ClusterId, ) -> impl Iterator<Item = SocketAddr> + '_
Get member addresses where the ring index is 0 (meaning a
very small RTT)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Members
impl RefUnwindSafe for Members
impl Send for Members
impl Sync for Members
impl Unpin for Members
impl UnwindSafe for Members
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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