pub struct HealthChecker { /* private fields */ }Expand description
Health checker for monitoring RabbitMQ connection status
Implementations§
Source§impl HealthChecker
impl HealthChecker
Sourcepub fn new(connection_manager: ConnectionManager) -> Self
pub fn new(connection_manager: ConnectionManager) -> Self
Create a new health checker
Sourcepub fn set_metrics(&mut self, metrics: RustRabbitMetrics)
pub fn set_metrics(&mut self, metrics: RustRabbitMetrics)
Set metrics for this health checker
Sourcepub async fn start_monitoring(&self) -> Result<()>
pub async fn start_monitoring(&self) -> Result<()>
Start continuous health monitoring in the background
Sourcepub async fn stop_monitoring(&self)
pub async fn stop_monitoring(&self)
Stop health monitoring
Sourcepub async fn check_health(&self) -> Result<HealthCheckResult>
pub async fn check_health(&self) -> Result<HealthCheckResult>
Perform a single health check
Sourcepub async fn get_last_result(&self) -> Option<HealthCheckResult>
pub async fn get_last_result(&self) -> Option<HealthCheckResult>
Get the last health check result
Sourcepub async fn is_healthy(&self) -> bool
pub async fn is_healthy(&self) -> bool
Check if the connection is currently healthy
Sourcepub async fn is_operational(&self) -> bool
pub async fn is_operational(&self) -> bool
Check if the connection is operational (healthy or degraded)
Sourcepub async fn wait_for_healthy(&self, timeout: Option<Duration>) -> Result<()>
pub async fn wait_for_healthy(&self, timeout: Option<Duration>) -> Result<()>
Wait for the connection to become healthy
Sourcepub async fn get_health_summary(&self) -> HealthSummary
pub async fn get_health_summary(&self) -> HealthSummary
Get health status summary
Trait Implementations§
Source§impl Clone for HealthChecker
impl Clone for HealthChecker
Source§fn clone(&self) -> HealthChecker
fn clone(&self) -> HealthChecker
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 moreAuto Trait Implementations§
impl Freeze for HealthChecker
impl !RefUnwindSafe for HealthChecker
impl Send for HealthChecker
impl Sync for HealthChecker
impl Unpin for HealthChecker
impl !UnwindSafe for HealthChecker
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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