pub struct HealthChecker { /* private fields */ }Expand description
Health checker
Implementations§
Source§impl HealthChecker
impl HealthChecker
pub fn new() -> Self
Sourcepub fn register_health_check(&mut self, check: HealthCheck)
pub fn register_health_check(&mut self, check: HealthCheck)
Register a health check under its check id.
Sourcepub fn get_health_check(&self, check_id: &str) -> Option<&HealthCheck>
pub fn get_health_check(&self, check_id: &str) -> Option<&HealthCheck>
Get a registered health check by id.
Sourcepub fn list_health_checks(&self) -> Vec<String>
pub fn list_health_checks(&self) -> Vec<String>
List the ids of all registered health checks.
Sourcepub fn remove_health_check(&mut self, check_id: &str) -> bool
pub fn remove_health_check(&mut self, check_id: &str) -> bool
Remove a registered health check by id. Returns true if removed.
Sourcepub fn check_interval(&self) -> u64
pub fn check_interval(&self) -> u64
Return the check interval (seconds).
Sourcepub fn set_check_interval(&mut self, interval: u64)
pub fn set_check_interval(&mut self, interval: u64)
Set the check interval (seconds).
Sourcepub fn set_timeout(&mut self, timeout: u64)
pub fn set_timeout(&mut self, timeout: u64)
Set the timeout (seconds).
Auto Trait Implementations§
impl Freeze for HealthChecker
impl RefUnwindSafe for HealthChecker
impl Send for HealthChecker
impl Sync for HealthChecker
impl Unpin for HealthChecker
impl UnsafeUnpin for HealthChecker
impl UnwindSafe for HealthChecker
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<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>
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