pub struct LagConfig {
pub replica_timeout_ms: u128,
pub records_per_ms: Option<f64>,
pub now_unix_ms: u128,
}Expand description
Knobs for the lag/health computation. Kept as a small struct so
the call sites (gRPC topology RPC, RedWire HelloAck builder)
thread the same defaults without each one redeclaring constants.
Fields§
§replica_timeout_ms: u128Replica heartbeats older than this flip healthy to false.
records_per_ms: Option<f64>Recent-progress estimate: how many WAL records the cluster
applies per millisecond on average. None → lag conversion
degrades gracefully to u32::MAX (issue spec: “if not
estimable”).
now_unix_ms: u128now in unix milliseconds. Threaded explicitly so tests can
pin a deterministic clock without reaching for a global.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LagConfig
impl RefUnwindSafe for LagConfig
impl Send for LagConfig
impl Sync for LagConfig
impl Unpin for LagConfig
impl UnsafeUnpin for LagConfig
impl UnwindSafe for LagConfig
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 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>
Wrap the input message
T in a tonic::Request