Documentation ¶
Overview ¶
Redis客户端. Redis中文手册文档请参考:http://redisdoc.com/ ,Redis官方命令请参考:https://redis.io/commands
Index ¶
- type Config
- type PoolStats
- type Redis
- func (r *Redis) Close() error
- func (r *Redis) Do(command string, args ...interface{}) (interface{}, error)
- func (r *Redis) GetConn() redis.Conn
- func (r *Redis) Send(command string, args ...interface{}) error
- func (r *Redis) SetIdleTimeout(value time.Duration)
- func (r *Redis) SetMaxActive(value int)
- func (r *Redis) SetMaxConnLifetime(value time.Duration)
- func (r *Redis) SetMaxIdle(value int)
- func (r *Redis) Stats() *PoolStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis客户端
func (*Redis) GetConn ¶ added in v1.2.11
获得一个原生的redis连接对象,用于自定义连接操作, 但是需要注意的是如果不再使用该连接对象时,需要手动Close连接,否则会造成连接数超限。
func (*Redis) SetIdleTimeout ¶
设置属性 - IdleTimeout
func (*Redis) SetMaxConnLifetime ¶
设置属性 - MaxConnLifetime
Click to show internal directories.
Click to hide internal directories.