pub struct HealthState { /* private fields */ }Expand description
Shared health state, updated by the pipeline runtime and read by the probes. All methods are lock-free and callable from any thread.
Implementations§
Source§impl HealthState
impl HealthState
Sourcepub fn new(pipeline_threads: usize, thresholds: HealthThresholds) -> Arc<Self> ⓘ
pub fn new(pipeline_threads: usize, thresholds: HealthThresholds) -> Arc<Self> ⓘ
Create state for pipeline_threads heartbeating threads. All
heartbeats start “fresh” at creation time.
Sourcepub fn heartbeat(&self, thread: usize)
pub fn heartbeat(&self, thread: usize)
Beat thread thread’s heart. Called once per poll iteration; out of
range indices are ignored (defensive — sizing is fixed at startup).
Sourcepub fn set_assignment_received(&self, received: bool)
pub fn set_assignment_received(&self, received: bool)
Mark whether the source has received its (initial) assignment.
Sourcepub fn set_sinks_connected(&self, connected: bool)
pub fn set_sinks_connected(&self, connected: bool)
Mark whether all sinks report connectivity.
Sourcepub fn report_watermark(&self, age: Duration, data_flowing: bool)
pub fn report_watermark(&self, age: Duration, data_flowing: bool)
Report the checkpointer’s oldest-unacknowledged-batch age and whether data is currently flowing (a stuck watermark only counts against liveness while records move).
Sourcepub fn healthy_at(&self, now: Instant) -> bool
pub fn healthy_at(&self, now: Instant) -> bool
Liveness as of now (injectable for tests).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HealthState
impl RefUnwindSafe for HealthState
impl Send for HealthState
impl Sync for HealthState
impl Unpin for HealthState
impl UnsafeUnpin for HealthState
impl UnwindSafe for HealthState
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