pub struct HealthChecker { /* private fields */ }Expand description
Performs health checks on LSP servers
Implementations§
Source§impl HealthChecker
impl HealthChecker
Sourcepub fn is_check_due(&self) -> bool
pub fn is_check_due(&self) -> bool
Check if a health check is due
Sourcepub fn record_success(&mut self, latency: Duration) -> HealthStatus
pub fn record_success(&mut self, latency: Duration) -> HealthStatus
Record a successful health check
Sourcepub fn record_failure(&mut self, reason: String) -> HealthStatus
pub fn record_failure(&mut self, reason: String) -> HealthStatus
Record a failed health check
Sourcepub fn is_unhealthy(&self) -> bool
pub fn is_unhealthy(&self) -> bool
Check if the server should be marked as unhealthy
Sourcepub fn failure_count(&self) -> u32
pub fn failure_count(&self) -> u32
Get the number of consecutive failures
Trait Implementations§
Auto 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<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