Documentation
¶
Index ¶
Constants ¶
View Source
const ( ReasonCooldown = "cooldown" ReasonLimitExceeded = "limit_exceeded" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Limit ¶ added in v0.74.0
Limit configures a named rate-limit bucket: at most Limit requests per Window, with an optional Cooldown applied once the limit is hit. It is the single shared limit type consumed by the memory and redis limiter backends and the HTTP layer.
func LookupLimit ¶ added in v0.74.0
LookupLimit resolves the Limit for a bucket from a limits map: the bucket's own entry, else the "default" entry, else a conservative built-in fallback (found is false only for that fallback). Shared by the memory and redis backends.
Click to show internal directories.
Click to hide internal directories.