Documentation ¶
Overview ¶
Package rate provides a rate limiter middleware based on a "token bucket" implementation.
More information: https://en.wikipedia.org/wiki/Token_bucket
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler provides a rate limiter middleware based on a "token bucket" implementation. A rate limiter controls how frequently HTTP requests are allowed to happen. The "token bucket" is of size `limit`, initially full and refilled at rate `burst` tokens per second.
The rate limiter is applied to all incoming requests and will reject, with status 429, those that exceed the configured limit.
More information: https://www.rfc-editor.org/rfc/rfc6585.html#section-4
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.