pub struct LagInfo {
pub current_lsn: u64,
pub lag_bytes: u64,
pub lag_time: Duration,
pub updated_at: Instant,
pub trend: LagTrend,
pub sync_mode: SyncMode,
pub healthy: bool,
}Expand description
Lag information for a single node
Fields§
§current_lsn: u64Current LSN (Log Sequence Number) on this node
lag_bytes: u64Lag in bytes (LSN difference from primary)
lag_time: DurationEstimated lag in time
updated_at: InstantWhen this info was last updated
trend: LagTrendLag trend (improving, stable, degrading)
sync_mode: SyncModeNode’s sync mode
healthy: boolWhether the node is considered healthy based on lag
Implementations§
Source§impl LagInfo
impl LagInfo
Sourcepub fn is_stale(&self, max_age: Duration) -> bool
pub fn is_stale(&self, max_age: Duration) -> bool
Check if this lag info is stale (not updated recently)
Sourcepub fn meets_freshness(&self, max_lag: Duration) -> bool
pub fn meets_freshness(&self, max_lag: Duration) -> bool
Check if this node meets the freshness requirement
Sourcepub fn has_reached_lsn(&self, required_lsn: u64) -> bool
pub fn has_reached_lsn(&self, required_lsn: u64) -> bool
Check if this node has reached a specific LSN
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LagInfo
impl RefUnwindSafe for LagInfo
impl Send for LagInfo
impl Sync for LagInfo
impl Unpin for LagInfo
impl UnsafeUnpin for LagInfo
impl UnwindSafe for LagInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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