pub struct Health { /* private fields */ }Implementations§
Source§impl Health
impl Health
pub fn ok(&self, id: &str)
Sourcepub fn fault(&self, id: &str, why: &str, started: Instant)
pub fn fault(&self, id: &str, why: &str, started: Instant)
A dial that began at started failed through id. Dials that began together and failed
together are one failure, and one a later success overtook is none: neither says more.
Sourcepub fn note(&self, id: &str, why: &str)
pub fn note(&self, id: &str, why: &str)
A failure that isn’t the outproxy’s to answer for: shown, never held against it.
pub fn refused_port(&self, id: &str, port: u16, why: &str)
Sourcepub fn last_ok(&self) -> Option<String>
pub fn last_ok(&self) -> Option<String>
The outproxy id that last opened a tunnel on this instance.
Sourcepub fn plan(
&self,
list: &[Outproxy],
port: u16,
) -> Result<Vec<Outproxy>, ConnectError>
pub fn plan( &self, list: &[Outproxy], port: u16, ) -> Result<Vec<Outproxy>, ConnectError>
Which outproxies to try for port, in order: enabled ones that haven’t refused the
port, skipping those cooling down; if all are cooling, the one that cools first.
Sourcepub fn state_of(&self, id: &str) -> &'static str
pub fn state_of(&self, id: &str) -> &'static str
ok (worked last), unknown (not tried), cooling, or failing.
Sourcepub fn all_failing(&self, list: &[Outproxy]) -> bool
pub fn all_failing(&self, list: &[Outproxy]) -> bool
Whether every enabled outproxy is cooling or failing right now.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Health
impl Forget for Health
impl Move for Health
impl RefUnwindSafe for Health
impl Send for Health
impl Sync for Health
impl Unpin for Health
impl UnsafeUnpin for Health
impl UnwindSafe for Health
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
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