pub trait AddHealthCheckExt {
// Required methods
fn add_health_check<T>(&self, health_check: impl Into<Arc<T>>)
where T: HealthCheck + 'static;
fn has_health_check<T>(&self) -> bool
where T: HealthCheck + 'static;
}Expand description
Registers concrete HealthCheck instances on the control server.
Lives on AppContext, so checks can be registered while configuring the
AppBuilder or from within a plugin’s build. A check is identified by its
type and is only ever run if ControlServerPlugin is added (it provides the
registry and the HealthRouter that drives the checks).
Required Methods§
Sourcefn add_health_check<T>(&self, health_check: impl Into<Arc<T>>)where
T: HealthCheck + 'static,
fn add_health_check<T>(&self, health_check: impl Into<Arc<T>>)where
T: HealthCheck + 'static,
Registers health_check on the control server.
§Panics
Panics if a health check of type T is already registered. Guard with
has_health_check when the same
type may be registered more than once; to run several checks of the same
kind, make the type itself aggregate them.
Sourcefn has_health_check<T>(&self) -> boolwhere
T: HealthCheck + 'static,
fn has_health_check<T>(&self) -> boolwhere
T: HealthCheck + 'static,
Returns whether a health check of type T is registered.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".