package
0.0.0-20200816183431-f58d27765601
Repository: https://github.com/bynf/rate.git
Documentation: pkg.go.dev

# Functions

Client indicates the redis client of the rate limiter.
Every converts a minimum time interval between events to a Limit.
NewLimiter returns a new Limiter that allows events up to rate r and permits bursts of at most b tokens.
SetRedis sets the redis client.

# Constants

Inf is the infinite rate limit; it allows all events (even if burst is zero).

# Structs

A Limiter controls how frequently events are allowed to happen.
A Reservation holds information about events that are permitted by a Limiter to happen after a delay.

# Type aliases

Limit defines the maximum frequency of some events.