#1 go-limiter
Package limiter defines rate limiting systems.
net/http rate limiter middleware
Health score 81/100, confidence 95/100.
| Latest version | v0.15.0 |
| Imported by | 256 packages |
| Stars | 458 |
| Forks | 22 |
| Last activity | 7 months ago |
| Latest release | v0.15.0 (1 years ago) |
| License | MIT |
| Known vuln records | 0 |
| Symbol | Kind | Synopsis |
|---|---|---|
| KeyFunc | Type | type KeyFunc func(r *http.Request) (string, error) |
| LimitCounter | Type | type LimitCounter interface{ ... } |
| LimitCounter.Config | Method | Config func(requestLimit int, windowLength time.Duration) |
| LimitCounter.Get | Method | Get func(key string, currentWindow, previousWindow time.Time) (int, int, error) |
| LimitCounter.Increment | Method | Increment func(key string, currentWindow time.Time) error |
| LimitCounter.IncrementBy | Method | IncrementBy func(key string, currentWindow time.Time, amount int) error |
| Option | Type | type Option func(rl *RateLimiter) |
| WithErrorHandler | Function | func WithErrorHandler(h func(http.ResponseWriter, *http.Request, error)) Option |
| WithKeyByIP | Function | func WithKeyByIP() Option |
| WithKeyByRealIP | Function | func WithKeyByRealIP() Option |
| WithKeyFuncs | Function | func WithKeyFuncs(keyFuncs ...KeyFunc) Option |
| WithLimitCounter | Function | func WithLimitCounter(c LimitCounter) Option |
Package limiter defines rate limiting systems.
Package httprl provides a rate limiter for http servers.
Dead simple rate limit middleware for Go.
Package caddywaf implements a Web Application Firewall (WAF) middleware for Caddy.
A Go blocking leaky-bucket rate limit implementation