Versions in this module Expand all Collapse all v0 v0.3.0 Oct 17, 2016 Changes in this version + type RedisClient interface + RateDel func(string) error + RateEvalSha func(string, []string, ...interface{}) (interface{}, error) + RateScriptLoad func(string) (string, error) v0.2.0 Oct 14, 2016 Changes in this version type Limiter + func ClusterNew(c *redis.ClusterClient, opts Options) (*Limiter, error) + func RingNew(c *redis.Ring, opts Options) (*Limiter, error) v0.1.0 Oct 11, 2016 Changes in this version + type Limiter struct + func New(client *redis.Client, opts *Options) (*Limiter, error) + func (limiter *Limiter) Get(id string, policy ...int) (Result, error) + func (limiter *Limiter) Remove(id string) (int, error) + type Options struct + Duration time.Duration + Max int + Prefix string + type Result struct + Duration time.Duration + Remaining int + Reset time.Time + Total int