pub struct LaneActivityClock { /* private fields */ }Expand description
Read handle over the client handler’s live lane registry, exposing each
lane’s whole-seconds age since its last accepted voucher for the admin
lanes surface (issue #1733). Cloning shares the same registry Arc, so
the admin surface and the handler observe one set of lanes. The timestamp
lives on the lane’s own delivery state, stamped under the per-lane lock the
voucher-accept path already holds, so reading liveness needs no separate
global lock.
Implementations§
Source§impl LaneActivityClock
impl LaneActivityClock
Sourcepub fn empty() -> Self
pub fn empty() -> Self
An activity clock over an empty registry — reports “never” for every lane. Used where no client handler is wired (a node with no payment surface, and admin unit tests).
Sourcepub async fn ages(&self) -> HashMap<LaneKey, u64>
pub async fn ages(&self) -> HashMap<LaneKey, u64>
Whole seconds since each live lane last accepted a voucher, keyed by
LaneKey. A lane whose stamp is 0 (none accepted since this process
hydrated it) is omitted, so a caller reads it back as “never” rather than
a bogus zero age. Best-effort: Instant-free wall-clock arithmetic, so a
clock that stepped backwards can only under-report the age — the safe
direction for a diagnostic.
Trait Implementations§
Source§impl Clone for LaneActivityClock
impl Clone for LaneActivityClock
Auto Trait Implementations§
impl !RefUnwindSafe for LaneActivityClock
impl !UnwindSafe for LaneActivityClock
impl Freeze for LaneActivityClock
impl Send for LaneActivityClock
impl Sync for LaneActivityClock
impl Unpin for LaneActivityClock
impl UnsafeUnpin for LaneActivityClock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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