pub struct HealthCheck {
pub id: String,
pub name: String,
pub description: String,
pub check_fn: String,
pub timeout_seconds: u64,
pub enabled: bool,
pub interval_seconds: u64,
}Expand description
Health check definition
Fields§
§id: StringUnique identifier for the health check
name: StringHuman-readable name for the health check
description: StringDescription of what this health check monitors
check_fn: StringFunction to perform the health check
timeout_seconds: u64Timeout for the health check (in seconds)
enabled: boolWhether the health check is enabled
interval_seconds: u64Interval between health checks (in seconds)
Implementations§
Source§impl HealthCheck
impl HealthCheck
Sourcepub fn new(
id: String,
name: String,
description: String,
check_fn: String,
) -> Self
pub fn new( id: String, name: String, description: String, check_fn: String, ) -> Self
Create a new health check
Sourcepub fn with_timeout(self, timeout_seconds: u64) -> Self
pub fn with_timeout(self, timeout_seconds: u64) -> Self
Set the timeout
Sourcepub fn with_interval(self, interval_seconds: u64) -> Self
pub fn with_interval(self, interval_seconds: u64) -> Self
Set the interval
Sourcepub fn set_enabled(self, enabled: bool) -> Self
pub fn set_enabled(self, enabled: bool) -> Self
Enable or disable the health check
Trait Implementations§
Source§impl Clone for HealthCheck
impl Clone for HealthCheck
Source§fn clone(&self) -> HealthCheck
fn clone(&self) -> HealthCheck
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 HealthCheck
impl Debug for HealthCheck
Source§impl<'de> Deserialize<'de> for HealthCheck
impl<'de> Deserialize<'de> for HealthCheck
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HealthCheck
impl RefUnwindSafe for HealthCheck
impl Send for HealthCheck
impl Sync for HealthCheck
impl Unpin for HealthCheck
impl UnwindSafe for HealthCheck
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