Expand description
Health monitoring and resilience infrastructure for RingKernel.
This module provides production-ready health and resilience features:
- Health Checks - Kernel liveness and readiness probes
- Circuit Breakers - Fault isolation and recovery
- Retry Policies - Configurable retry with backoff
- Graceful Degradation - Load shedding and fallback modes
- Watchdog - Automatic kernel health monitoring
§Usage
ⓘ
use ringkernel_core::health::{HealthChecker, CircuitBreaker, RetryPolicy};
// Create health checker
let checker = HealthChecker::new()
.liveness_check("kernel_alive", || async { true })
.readiness_check("queue_ready", || async { queue_depth < 1000 });
// Create circuit breaker
let breaker = CircuitBreaker::new()
.failure_threshold(5)
.recovery_timeout(Duration::from_secs(30));
// Execute with circuit breaker
let result = breaker.execute(|| async { risky_operation() }).await;Structs§
- Circuit
Breaker - Circuit breaker for fault isolation.
- Circuit
Breaker Config - Circuit breaker configuration.
- Circuit
Breaker Stats - Circuit breaker statistics.
- Degradation
Manager - Graceful degradation manager.
- Degradation
Stats - Degradation statistics.
- Health
Check - A health check definition.
- Health
Check Result - Result of a health check.
- Health
Checker - Health checker that manages multiple health checks.
- Kernel
Health - Kernel health status for watchdog.
- Kernel
Watchdog - Watchdog for monitoring kernel health.
- Load
Shedding Policy - Load shedding policy.
- Recovery
Action - A recovery action to be taken.
- Recovery
Config - Configuration for automatic recovery.
- Recovery
Config Builder - Builder for recovery configuration.
- Recovery
Manager - Manager for automatic kernel recovery.
- Recovery
Result - Result of a recovery action.
- Recovery
Stats Snapshot - Snapshot of recovery statistics.
- Retry
Policy - Retry policy configuration.
Enums§
- Backoff
Strategy - Backoff strategy for retries.
- Circuit
State - Circuit breaker state.
- Degradation
Level - Degradation level for system operation.
- Failure
Type - Types of kernel failures.
- Health
Status - Health status of a component.
- Recovery
Policy - Recovery policy for handling kernel failures.
Type Aliases§
- Health
Check Fn - Type alias for async health check functions.
- Recovery
Handler - Type alias for recovery handler functions.