Versions in this module Expand all Collapse all v0 v0.3.0 Apr 19, 2023 v0.2.0 Sep 21, 2022 Changes in this version type Zone + func (z *Zone) RateLimitPolicyHeader() string v0.1.0 Jan 25, 2022 Changes in this version + type RateLimit struct + Key string + Rate string + RejectStatusCode int + ZoneSize int + func (RateLimit) CaddyModule() caddy.ModuleInfo + func (rl *RateLimit) Cleanup() error + func (rl *RateLimit) Provision(ctx caddy.Context) (err error) + func (rl *RateLimit) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error + func (rl *RateLimit) UnmarshalCaddyfile(d *caddyfile.Dispenser) (err error) + func (rl *RateLimit) Validate() error + type Var struct + Bits uint8 + Name string + Raw string + func ParseVar(s string) (*Var, error) + func (v *Var) Evaluate(r *http.Request) (value string, err error) + type Zone struct + func NewZone(size int, rateSize time.Duration, rateLimit int64) (*Zone, error) + func (z *Zone) Allow(key string) bool + func (z *Zone) Purge()