pub struct HealthCheckManager { /* private fields */ }Expand description
Health check manager
Implementations§
Source§impl HealthCheckManager
impl HealthCheckManager
Sourcepub fn new(config: Option<HealthCheckConfig>) -> Self
pub fn new(config: Option<HealthCheckConfig>) -> Self
Create a new HealthCheckManager instance
Sourcepub async fn RegisterService(
&self,
ServiceName: String,
CheckLevel: HealthCheckLevel,
) -> Result<()>
pub async fn RegisterService( &self, ServiceName: String, CheckLevel: HealthCheckLevel, ) -> Result<()>
Register a service for health monitoring
Sourcepub async fn CheckService(&self, ServiceName: &str) -> Result<HealthStatus>
pub async fn CheckService(&self, ServiceName: &str) -> Result<HealthStatus>
Perform health check for a service
Sourcepub async fn GetOverallHealth(&self) -> HealthStatus
pub async fn GetOverallHealth(&self) -> HealthStatus
Get overall daemon health status
Sourcepub async fn GetServiceHealth(
&self,
service_name: &str,
) -> Option<ServiceHealth>
pub async fn GetServiceHealth( &self, service_name: &str, ) -> Option<ServiceHealth>
Get service health status
Sourcepub async fn GetHealthHistory(
&self,
service_name: Option<&str>,
limit: Option<usize>,
) -> Vec<HealthCheckRecord>
pub async fn GetHealthHistory( &self, service_name: Option<&str>, limit: Option<usize>, ) -> Vec<HealthCheckRecord>
Get health check history
Sourcepub async fn RegisterRecoveryAction(&self, action: RecoveryAction) -> Result<()>
pub async fn RegisterRecoveryAction(&self, action: RecoveryAction) -> Result<()>
Register a recovery action
Sourcepub async fn GetHealthStatistics(&self) -> HealthStatistics
pub async fn GetHealthStatistics(&self) -> HealthStatistics
Get health statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HealthCheckManager
impl !RefUnwindSafe for HealthCheckManager
impl Send for HealthCheckManager
impl Sync for HealthCheckManager
impl Unpin for HealthCheckManager
impl !UnwindSafe for HealthCheckManager
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
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].