Documentation
¶
Overview ¶
Package ratelimit provides a per-key token-bucket limiter, used to cap the ingest rate per source so one provider cannot overwhelm the gateway.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter caps requests per key with an independent token bucket for each key. A non-positive rate disables limiting, and a nil *Limiter allows everything, so callers can construct one unconditionally.
Click to show internal directories.
Click to hide internal directories.