Skip to main content

Module peer

Module peer 

Source
Expand description

Stores and evaluates per-server federation reachability.

Each failure is a blind write keyed by (server, bucket), with repeated failures in one window deliberately coalescing; current row values retain the classification and exact failure time. A scan derives the latest anchor and surviving bucket span before applying the retry curve. Successful outbound or inbound contact clears the server prefix. The bucket width comes from sender_timeout, keeping this gate aligned with sender backoff.

Structs§

Backoff 🔒
Latest-failure state feeding the pure attempt_verdict decision.
PeerBackoff
Summarizes a peer’s current failure streak for administration.
Streak 🔒
Fold state accumulated over one server’s failure rows.

Enums§

Classification
Permanence classification supplied alongside a failure.
ShouldAttempt
Verdict returned by super::Service::should_attempt.

Constants§

MAX_BACKOFF 🔒
Caps peer-status backoff delays.

Functions§

attempt_verdict 🔒
Computes a retry verdict from a peer’s latest failure state.
classify 🔒
Decodes the classification byte from a peer-status value.
classify_error 🔒
Classifies a failed federation attempt for the peer-reachability store.
failure_secs 🔒
Decodes the recorded failure instant in seconds since the epoch.
fold_streak 🔒
Folds one failure row into a server’s running streak.
is_content_rejection
Whether a failed federation attempt is a content rejection from a reachable peer, the one failure the peer-reachability store does not record.