pub struct HealthProbeManager { /* private fields */ }Expand description
Manager for health probes with background tick loop.
Implementations§
Source§impl HealthProbeManager
impl HealthProbeManager
Sourcepub fn new(
store: Arc<HealthProbeStore>,
hub: Arc<dyn AlertDelivery>,
tick_interval_secs: u64,
) -> Self
pub fn new( store: Arc<HealthProbeStore>, hub: Arc<dyn AlertDelivery>, tick_interval_secs: u64, ) -> Self
Create a new health probe manager.
Sourcepub fn store(&self) -> &Arc<HealthProbeStore> ⓘ
pub fn store(&self) -> &Arc<HealthProbeStore> ⓘ
Get a reference to the store for external use.
Sourcepub async fn seed_from_config(
&self,
probes: &[HealthProbeConfig],
default_alert_sessions: &[String],
)
pub async fn seed_from_config( &self, probes: &[HealthProbeConfig], default_alert_sessions: &[String], )
Seed probes from configuration.
Uses upsert by name for config-sourced probes and removes stale entries.
Sourcepub async fn cleanup_old_results(&self, retention_days: u32) -> Result<u64>
pub async fn cleanup_old_results(&self, retention_days: u32) -> Result<u64>
Cleanup old probe results beyond retention period.
Auto Trait Implementations§
impl !RefUnwindSafe for HealthProbeManager
impl !UnwindSafe for HealthProbeManager
impl Forget for HealthProbeManager
impl Freeze for HealthProbeManagerwhere
*const ArcInner<HealthProbeStore> is !null: Freeze,
PhantomData<ArcInner<HealthProbeStore>>: Freeze,
*const ArcInner<AlertManager> is !null: Freeze,
PhantomData<ArcInner<AlertManager>>: Freeze,
impl Move for HealthProbeManager
impl Send for HealthProbeManager
impl Sync for HealthProbeManager
impl Unpin for HealthProbeManager
impl UnsafeUnpin for HealthProbeManagerwhere
*const ArcInner<HealthProbeStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<HealthProbeStore>>: UnsafeUnpin,
*const ArcInner<AlertManager> is !null: UnsafeUnpin,
PhantomData<ArcInner<AlertManager>>: UnsafeUnpin,
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> 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 more