pub struct PeerState {
pub last_seen: Instant,
pub role: ReplicaRole,
pub tail_seq: u64,
}Expand description
Per-peer state cell. Captures the most recent
SyncHeartbeat observation.
Public field shape so consumers can build leader-side lag
metrics directly.
Fields§
§last_seen: InstantMost recent inbound heartbeat timestamp from this peer.
role: ReplicaRoleRole the peer claimed in its most recent heartbeat.
tail_seq: u64tail_seq the peer claimed in its most recent heartbeat.
Leader-side: lag-from-this-replica = our_tail - peer_tail.
Replica-side: lag-from-leader = leader_tail - our_tail (the
inverse).
Trait Implementations§
impl Copy for PeerState
impl Eq for PeerState
impl StructuralPartialEq for PeerState
Auto Trait Implementations§
impl Freeze for PeerState
impl RefUnwindSafe for PeerState
impl Send for PeerState
impl Sync for PeerState
impl Unpin for PeerState
impl UnsafeUnpin for PeerState
impl UnwindSafe for PeerState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.