Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StatusTooManyRequests represents HTTP 429, missing from net/http StatusTooManyRequests = 429 // not in net/http package )
Variables ¶
This section is empty.
Functions ¶
func NewHTTPLimiter ¶
func NewHTTPLimiter(rateLimiter ratelimiter.RateLimiter, proxy http.Handler, allowOnError bool) http.Handler
NewHTTPLimiter returns an http.Handler that rate limits and proxies requests.
func NewHTTPLogger ¶
func NewHTTPLogger(rateLimiter ratelimiter.RateLimiter, proxy http.Handler) http.Handler
NewHTTPLogger returns an http.Handler that logs the results of rate limiting requests, but actually proxies everything.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.