pub struct MemberSignals {
pub since_last_heartbeat: Duration,
pub replication_lag_lsn: u64,
pub recent_errors: u32,
pub unhealthy_for: Duration,
}Expand description
Raw, point-in-time health signals for one member, read from the running
cluster through ClusterSignals::member_signals. The supervisor turns
these into a HealthScore; it owns no clock or counters itself.
Fields§
§since_last_heartbeat: DurationTime since the member’s last heartbeat was received (liveness).
replication_lag_lsn: u64How many WAL LSNs the member trails the range commit watermark by, as an aggregate liveness-of-replication signal. Zero means fully caught up.
recent_errors: u32Observed errors from the member in the recent observation window.
unhealthy_for: DurationHow long the member has been continuously below the failover threshold. Zero for a healthy member; the caller resets it the moment the member recovers. This is the grace-period input that damps flapping — the supervisor refuses to fail over until it reaches the policy’s grace period.
Implementations§
Source§impl MemberSignals
impl MemberSignals
Sourcepub fn healthy() -> MemberSignals
pub fn healthy() -> MemberSignals
A perfectly healthy member: fresh heartbeat, no lag, no errors, never unhealthy. Handy as a test/observation baseline.
Trait Implementations§
Source§impl Clone for MemberSignals
impl Clone for MemberSignals
Source§fn clone(&self) -> MemberSignals
fn clone(&self) -> MemberSignals
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MemberSignals
Source§impl Debug for MemberSignals
impl Debug for MemberSignals
impl Eq for MemberSignals
Source§impl PartialEq for MemberSignals
impl PartialEq for MemberSignals
Source§fn eq(&self, other: &MemberSignals) -> bool
fn eq(&self, other: &MemberSignals) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MemberSignals
Auto Trait Implementations§
impl Freeze for MemberSignals
impl RefUnwindSafe for MemberSignals
impl Send for MemberSignals
impl Sync for MemberSignals
impl Unpin for MemberSignals
impl UnsafeUnpin for MemberSignals
impl UnwindSafe for MemberSignals
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request