struct BackgroundTasks {
health_check_loops: AtomicU64,
watchdog_loops: AtomicU64,
metrics_flush_loops: AtomicU64,
last_health_check: RwLock<Option<Instant>>,
last_watchdog_scan: RwLock<Option<Instant>>,
last_metrics_flush: RwLock<Option<Instant>>,
}Expand description
Background task tracking.
Fields§
§health_check_loops: AtomicU64Number of active health check loops.
watchdog_loops: AtomicU64Number of active watchdog loops.
metrics_flush_loops: AtomicU64Number of active metrics flush loops.
last_health_check: RwLock<Option<Instant>>Last health check time.
last_watchdog_scan: RwLock<Option<Instant>>Last watchdog scan time.
last_metrics_flush: RwLock<Option<Instant>>Last metrics flush time.
Implementations§
Source§impl BackgroundTasks
impl BackgroundTasks
fn new() -> Self
fn record_health_check(&self)
fn record_watchdog_scan(&self)
fn record_metrics_flush(&self)
fn health_check_age(&self) -> Option<Duration>
fn watchdog_scan_age(&self) -> Option<Duration>
fn metrics_flush_age(&self) -> Option<Duration>
Trait Implementations§
Source§impl Debug for BackgroundTasks
impl Debug for BackgroundTasks
Source§impl Default for BackgroundTasks
impl Default for BackgroundTasks
Source§fn default() -> BackgroundTasks
fn default() -> BackgroundTasks
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for BackgroundTasks
impl !RefUnwindSafe for BackgroundTasks
impl Send for BackgroundTasks
impl Sync for BackgroundTasks
impl Unpin for BackgroundTasks
impl UnwindSafe for BackgroundTasks
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.