redis

package
v0.0.0-...-e20e094 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL