Documentation ¶
Overview ¶
Package redis implements token buckets backed by Redis, inspired by the algorithms used in Guava's RateLimiter library - https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/RateLimiter.java
Package redis implements token buckets backed by Redis, inspired by the algorithms used in Guava's RateLimiter library - https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/RateLimiter.java
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBucketFactory ¶
func NewBucketFactory(redisOpts *redis.Options, connectionRetries int, keyMaxIdleTime time.Duration) quotaservice.BucketFactory
NewBucketFactory creates a new bucketFactory instance backed by a standalone Redis.
func NewClusterBucketFactory ¶
func NewClusterBucketFactory(redisClusterOpts *redis.ClusterOptions, connectionRetries int, keyMaxIdleTime time.Duration) quotaservice.BucketFactory
NewClusterBucketFactory creates a new bucketFactory instance backed by a Redis cluster.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.