pub struct HealthMonitor { /* private fields */ }Expand description
Health monitor for connection quality
Implementations§
Source§impl HealthMonitor
impl HealthMonitor
Sourcepub fn new(config: HealthCheckConfig) -> Self
pub fn new(config: HealthCheckConfig) -> Self
Create new health monitor
Sourcepub async fn start_monitoring(&self, peer_id: PeerId)
pub async fn start_monitoring(&self, peer_id: PeerId)
Start health monitoring for a peer
Sourcepub async fn check_health(
&self,
peer_id: PeerId,
connection: &ConnectionInfo,
) -> HealthCheckResult
pub async fn check_health( &self, peer_id: PeerId, connection: &ConnectionInfo, ) -> HealthCheckResult
Perform health check on a peer
Sourcepub fn get_health_result(&self, peer_id: &PeerId) -> Option<HealthCheckResult>
pub fn get_health_result(&self, peer_id: &PeerId) -> Option<HealthCheckResult>
Get latest health check result
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HealthMonitor
impl !UnwindSafe for HealthMonitor
impl Freeze for HealthMonitor
impl Send for HealthMonitor
impl Sync for HealthMonitor
impl Unpin for HealthMonitor
impl UnsafeUnpin for HealthMonitor
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> 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<'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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more