Documentation ¶
Overview ¶
Package http rate decorates an http.Handler and prevents too many requests being made
Index ¶
Constants ¶
View Source
const StatusTooManyRequests = 429
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimitedHandler ¶
func Decorate ¶
func Decorate(delegate http.Handler, rateLimiter RateLimiter) RateLimitedHandler
func (RateLimitedHandler) ServeHTTP ¶
func (lh RateLimitedHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type RateLimiter ¶
Click to show internal directories.
Click to hide internal directories.