Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { URL *url.URL Password string MaxIdle int32 MaxActive int32 ReadTimeout time.Duration WriteTimeout time.Duration KeepAlive time.Duration SentinelMaster string Sentinels []*url.URL }
Config is the redis pool configuration
type TokenLimiter ¶
type TokenLimiter struct {
// contains filtered or unexported fields
}
TokenLimiter is a redis-based rate limiter implementing the algorithm in https://redislabs.com/redis-best-practices/basic-rate-limiting/
Click to show internal directories.
Click to hide internal directories.