Skip to main content

Module exit_control

Module exit_control 

Source
Expand description

What the Exit pays for on a peer’s behalf, and the bounds put on it: the refusal reply budget and the labels of hopr_exit_control_packets_total.

Structs§

BucketState 🔒
RefusalReplyBucket 🔒
A token bucket over a RefusalReplyBudget, shared by every clone of the manager.
RefusalReplyBudget
How many refusal replies an Exit sends, shared by every reason it refuses a StartSession.

Enums§

ExitControlKind 🔒
What a packet the Exit sent on a peer’s behalf was for, as hopr_exit_control_packets_total labels it. Closed, so no call site can invent a label value. Refusal* kinds answer a declined StartSession; the rest are sent for admitted Sessions.
ExitControlOutcome 🔒
What became of a packet, as hopr_exit_control_packets_total labels it.
ExitSessionKind 🔒
Whether the Session a packet belongs to offers PIX, as hopr_exit_control_packets_total labels it.

Constants§

DEFAULT_REFUSAL_REPLY_BURST
The default RefusalReplyBudget::burst: the most replies a flood can make the Exit pay for back to back, while a briefly busy Exit still answers the Entries that arrive together.
DEFAULT_REFUSAL_REPLY_REFILL_PERIOD
The default RefusalReplyBudget::refill_period.
MIN_REFUSAL_REPLY_REFILL_PERIOD
The shortest RefusalReplyBudget::refill_period accepted; a zero period would be no budget.

Functions§

record_exit_control 🔒
Counts one packet the Exit sent, or declined to send, on a peer’s behalf.