Skip to main content

Module rate_limit

Module rate_limit 

Source
Expand description

Router-level rate limiting.

Structs§

GovernorMemoryRateLimitStore
HybridRateLimitStore
LegacyRateLimitStorageAdapter
RateLimitRejection
RequestClientIp
Framework-neutral client IP resolved by an HTTP adapter.

Functions§

consume_rate_limit
consume_scoped_rate_limit
Consume a rate-limit bucket keyed by client IP, path, and an opaque scope.
hash_rate_limit_scope
Derive a stable, non-reversible rate-limit scope identifier.
on_request_rate_limit
on_response_rate_limit
resolve_client_ip
Resolve the trusted client IP for a request using advanced.ip_address configuration. Shared by rate limiting and request metadata so the two never disagree about the same request. Returns None when no trusted IP can be resolved instead of trusting raw forwarding headers.

Type Aliases§

Body