pub struct Status { /* private fields */ }Expand description
Shared, mutable operational state. Cheap to update concurrently from the
observer; snapshotted to JSON for the /status endpoint.
Implementations§
Source§impl Status
impl Status
Sourcepub fn new(indexes: impl IntoIterator<Item = IndexName>, now: Instant) -> Self
pub fn new(indexes: impl IntoIterator<Item = IndexName>, now: Instant) -> Self
A fresh status with every configured index Pending. now is the start
instant uptime is measured from.
Sourcepub fn in_flight(&self) -> u64
pub fn in_flight(&self) -> u64
Changes captured but not yet committed — the queue/back-pressure signal. A cheap two-atomic read, safe to call from a metrics collection thread (e.g. an observable-gauge callback in the binary).
Sourcepub fn snapshot(&self) -> StatusSnapshot
pub fn snapshot(&self) -> StatusSnapshot
A point-in-time, serializable view of the status for the HTTP endpoint.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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