Skip to main content

Module backoff

Module backoff 

Source

Re-exportsยง

use std::ops::Range; ๐Ÿ”’
use std::sync::atomic::AtomicU64; ๐Ÿ”’
use std::sync::atomic::Ordering; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use futures::FutureExt; ๐Ÿ”’
use ruma::EventId; ๐Ÿ”’
use tuwunel_core::Error; ๐Ÿ”’
use tuwunel_core::implement; ๐Ÿ”’
use tuwunel_core::utils::BoolExt; ๐Ÿ”’
use tuwunel_core::utils::continue_exponential_backoff; ๐Ÿ”’
use tuwunel_core::utils::stream::ReadyExt; ๐Ÿ”’
use tuwunel_core::utils::stream::TryIgnore; ๐Ÿ”’
use tuwunel_core::utils::time::now_secs; ๐Ÿ”’
use tuwunel_database::Ignore; ๐Ÿ”’
use tuwunel_database::Interfix; ๐Ÿ”’

Structsยง

BackoffCounters ๐Ÿ”’
BackoffMetrics
Snapshot of process-lifetime verdicts from the backoff store, per federation step.
Summary ๐Ÿ”’
VerdictCounters ๐Ÿ”’
Verdicts
Verdict counts for one federation step.

Enumsยง

Context ๐Ÿ”’
Federation step that recorded a decision; the keyโ€™s leading discriminant.
Disposition ๐Ÿ”’
Permanence of a recorded decision. Unknown discriminants decode to the weakest (Pending) so a future encoding can only soften, never wrongly escalate, a verdict against an old binary. Permanent is never written by this store.
Suppression ๐Ÿ”’
Verdict from consulting the store before a federation step.

Constantsยง

QUANTUM ๐Ÿ”’
Bucket width in seconds. Records within one bucket collide onto a single key (<= the smallest call-site backoff floor), coalescing concurrent failures.
SUPPRESS_AFTER ๐Ÿ”’
Accumulated Pending records at which the rate brake engages.
UPGRADE_RETRY ๐Ÿ”’
Retry window for the Upgrade context.

Functionsยง

current_bucket ๐Ÿ”’