pub struct MonitoringConfig {
pub health_check_interval: Duration,
pub watchdog_interval: Duration,
pub metrics_flush_interval: Duration,
pub enable_health_checks: bool,
pub enable_watchdog: bool,
pub enable_metrics_flush: bool,
}Expand description
Configuration for background monitoring loops.
Fields§
§health_check_interval: DurationInterval for health checks.
watchdog_interval: DurationInterval for watchdog scans.
metrics_flush_interval: DurationInterval for metrics flush.
enable_health_checks: boolWhether to enable health check loop.
enable_watchdog: boolWhether to enable watchdog loop.
enable_metrics_flush: boolWhether to enable metrics flush loop.
Implementations§
Source§impl MonitoringConfig
impl MonitoringConfig
Sourcepub fn new() -> MonitoringConfig
pub fn new() -> MonitoringConfig
Create a new monitoring config.
Sourcepub fn health_check_interval(self, interval: Duration) -> MonitoringConfig
pub fn health_check_interval(self, interval: Duration) -> MonitoringConfig
Set health check interval.
Sourcepub fn watchdog_interval(self, interval: Duration) -> MonitoringConfig
pub fn watchdog_interval(self, interval: Duration) -> MonitoringConfig
Set watchdog interval.
Sourcepub fn metrics_flush_interval(self, interval: Duration) -> MonitoringConfig
pub fn metrics_flush_interval(self, interval: Duration) -> MonitoringConfig
Set metrics flush interval.
Sourcepub fn enable_health_checks(self, enable: bool) -> MonitoringConfig
pub fn enable_health_checks(self, enable: bool) -> MonitoringConfig
Enable or disable health checks.
Sourcepub fn enable_watchdog(self, enable: bool) -> MonitoringConfig
pub fn enable_watchdog(self, enable: bool) -> MonitoringConfig
Enable or disable watchdog.
Sourcepub fn enable_metrics_flush(self, enable: bool) -> MonitoringConfig
pub fn enable_metrics_flush(self, enable: bool) -> MonitoringConfig
Enable or disable metrics flush.
Trait Implementations§
Source§impl Clone for MonitoringConfig
impl Clone for MonitoringConfig
Source§fn clone(&self) -> MonitoringConfig
fn clone(&self) -> MonitoringConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MonitoringConfig
impl Debug for MonitoringConfig
Source§impl Default for MonitoringConfig
impl Default for MonitoringConfig
Source§fn default() -> MonitoringConfig
fn default() -> MonitoringConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MonitoringConfig
impl RefUnwindSafe for MonitoringConfig
impl Send for MonitoringConfig
impl Sync for MonitoringConfig
impl Unpin for MonitoringConfig
impl UnwindSafe for MonitoringConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§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.