Documentation ¶
Index ¶
- func IsConnError(err error) bool
- func RedisInit(host, port, password string)
- type MyRedisReConn
- func (myredis MyRedisReConn) Del(key string) error
- func (myredis MyRedisReConn) ExpiresSet(key, value string, expiresTime int) error
- func (myredis MyRedisReConn) Get(key string) (string, error)
- func (myredis MyRedisReConn) Redo(command string, opt ...interface{}) (interface{}, error)
- func (myredis MyRedisReConn) Set(key, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MyRedisReConn ¶
func GetRedisConn ¶
func GetRedisConn(n int) (conn *MyRedisReConn, err error)
GetRedisConn 从redis池子拿去一个n号库的链接 n int redis 对应的n号库
func (MyRedisReConn) ExpiresSet ¶
func (myredis MyRedisReConn) ExpiresSet(key, value string, expiresTime int) error
失效方式插入值
func (MyRedisReConn) Redo ¶
func (myredis MyRedisReConn) Redo(command string, opt ...interface{}) (interface{}, error)
Redo 在pool加入TestOnBorrow方法来去除扫描坏连接,并重新连接redis
Click to show internal directories.
Click to hide internal directories.