Versions in this module Expand all Collapse all v1 v1.0.0 Jul 22, 2021 Changes in this version + const Version + type Limiter struct + func New(opts Options) *Limiter + func (l *Limiter) Get(ctx context.Context, id string, policy ...int) (Result, error) + func (l *Limiter) Remove(ctx context.Context, id string) error + type Options struct + Client RedisClient + Ctx context.Context + Duration time.Duration + Max int + Prefix string + type RedisClient interface + RateDel func(context.Context, string) error + RateEvalSha func(context.Context, string, []string, ...interface{}) (interface{}, error) + RateScriptLoad func(context.Context, string) (string, error) + type Result struct + Duration time.Duration + Remaining int + Reset time.Time + Total int