redis

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

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