referrerpolicy=no-referrer-when-downgrade

Module rate_limit

Module rate_limit 

Source
Expand description

Per-account submit rate limiting for HOP.

Two token buckets per SenderId: one counts requests, the other counts bytes. Both must admit a call for it to proceed. Refill happens lazily on each check using monotonic Instants, so idle users never block a background task.

Structs§

RateLimitConfig
Configuration for the per-account submit rate limiter.
RateLimiter
Per-account token-bucket rate limiter for HOP submissions.