#1 go-limiter
Package limiter defines rate limiting systems.
Dead simple rate limit middleware for Go.
Health score 77/100, confidence 100/100.
| Latest version | v2.2.2+incompatible |
| Imported by | 449 packages |
| Stars | 2.3K |
| Forks | 162 |
| Last activity | 1 years ago |
| Latest release | v3.11.2 (3 years ago) |
| License | MIT |
| Known vuln records | 0 |
| Symbol | Kind | Synopsis |
|---|---|---|
| Context | Type | type Context struct{ ... } |
| Context.Limit | Field | Limit int64 |
| Context.Reached | Field | Reached bool |
| Context.Remaining | Field | Remaining int64 |
| Context.Reset | Field | Reset int64 |
| Limiter | Type | type Limiter struct{ ... } |
| Limiter.Get | Method | func (limiter *Limiter) Get(ctx context.Context, key string) (Context, error) |
| Limiter.Peek | Method | func (limiter *Limiter) Peek(ctx context.Context, key string) (Context, error) |
| Limiter.Rate | Field | Rate Rate |
| Limiter.Store | Field | Store Store |
| New | Function | func New(store Store, rate Rate) *Limiter |
| Rate | Type | type Rate struct{ ... } |
Package limiter defines rate limiting systems.
Package limiter defines shared types and constants used by all limiter sub-packages (conn, rate, traffic).
Package caddywaf implements a Web Application Firewall (WAF) middleware for Caddy.