redis

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const NUM_REDIS_RETRY = 3

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisRateLimiter

type RedisRateLimiter struct {
	// contains filtered or unexported fields
}

func NewRedisRateLimiter

func NewRedisRateLimiter(tid tenant.Id, addr string, rqs int) *RedisRateLimiter

func (*RedisRateLimiter) Limit

func (r *RedisRateLimiter) Limit() int

func (*RedisRateLimiter) SetLimit

func (r *RedisRateLimiter) SetLimit(newLimit int) error

func (*RedisRateLimiter) Take

func (r *RedisRateLimiter) Take(ctx context.Context, unit int) error

Jump to

Keyboard shortcuts

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