pub struct NodeP2PState {
pub last_attempt: Option<Timestamp>,
pub last_success: Option<Timestamp>,
pub last_failure: Option<Timestamp>,
pub source: NodeSource,
pub rostra_id: Option<RostraId>,
pub consecutive_failures: u32,
pub backoff_until: Option<Instant>,
}Expand description
Per-node (Iroh endpoint) connection state for debugging.
Tracks connection attempts, successes, and failures per node.
Fields§
§last_attempt: Option<Timestamp>Last time we attempted to connect to this node
last_success: Option<Timestamp>Last successful connection time
last_failure: Option<Timestamp>Last failed connection time
source: NodeSourceSource of how we learned about this node
rostra_id: Option<RostraId>The RostraId this node is associated with (if known)
consecutive_failures: u32Number of consecutive connection failures
backoff_until: Option<Instant>Time until which we should not attempt to connect (backoff)
Implementations§
Source§impl NodeP2PState
impl NodeP2PState
Sourcepub fn is_in_backoff(&self) -> bool
pub fn is_in_backoff(&self) -> bool
Check if we should skip connecting due to backoff.
Trait Implementations§
Source§impl Clone for NodeP2PState
impl Clone for NodeP2PState
Source§impl Debug for NodeP2PState
impl Debug for NodeP2PState
Auto Trait Implementations§
impl Freeze for NodeP2PState
impl RefUnwindSafe for NodeP2PState
impl Send for NodeP2PState
impl Sync for NodeP2PState
impl Unpin for NodeP2PState
impl UnsafeUnpin for NodeP2PState
impl UnwindSafe for NodeP2PState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, T> ExpectFrom<F> for T
impl<F, T> ExpectFrom<F> for T
fn expect_from(other: F) -> T
Source§impl<F, I> ExpectInto<I> for Fwhere
I: ExpectFrom<F>,
impl<F, I> ExpectInto<I> for Fwhere
I: ExpectFrom<F>,
fn expect_into(self) -> I
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