Documentation ¶
Index ¶
- func NewFixedRateLimitCacheImpl(client Client, perSecondClient Client, timeSource utils.TimeSource, ...) limiter.RateLimitCache
- func NewRateLimiterCacheImplFromSettings(s settings.Settings, localCache *freecache.Cache, srv server.Server, ...) limiter.RateLimitCache
- type Client
- type Pipeline
- type RedisError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFixedRateLimitCacheImpl ¶ added in v1.4.0
func NewRateLimiterCacheImplFromSettings ¶ added in v1.4.0
Types ¶
type Client ¶ added in v1.4.0
type Client interface { // DoCmd is used to perform a redis command and retrieve a result. // // @param rcv supplies receiver for the result. // @param cmd supplies the command to append. // @param key supplies the key to append. // @param args supplies the additional arguments. DoCmd(rcv interface{}, cmd, key string, args ...interface{}) error // PipeAppend append a command onto the pipeline queue. // // @param pipeline supplies the queue for pending commands. // @param rcv supplies receiver for the result. // @param cmd supplies the command to append. // @param key supplies the key to append. // @param args supplies the additional arguments. PipeAppend(pipeline Pipeline, rcv interface{}, cmd, key string, args ...interface{}) Pipeline // PipeDo writes multiple commands to a Conn in // a single write, then reads their responses in a single read. This reduces // network delay into a single round-trip. // // @param pipeline supplies the queue for pending commands. PipeDo(pipeline Pipeline) error // Once Close() is called all future method calls on the Client will return // an error Close() error // NumActiveConns return number of active connections, used in testing. NumActiveConns() int // ImplicitPipeliningEnabled return true if implicit pipelining is enabled. ImplicitPipeliningEnabled() bool }
Interface for a redis client.
type RedisError ¶
type RedisError string
Errors that may be raised during config parsing.
func (RedisError) Error ¶
func (e RedisError) Error() string
Click to show internal directories.
Click to hide internal directories.