Documentation
¶
Index ¶
- Constants
- Variables
- func Close()
- func InitRedis(ctx context.Context, redisInfos []RedisInfo, rdc RedisDynamicConfiguration, ...) error
- type Redis
- func (r *Redis) Close() error
- func (r *Redis) Del(args ...interface{}) (count int64, err error)
- func (r *Redis) Exec(cmd string, key interface{}, args ...interface{}) (interface{}, error)
- func (r *Redis) GetInt64(key string) (int64, error)
- func (r *Redis) GetString(key string) (string, error)
- func (r *Redis) GetStringMap(key string) (map[string]string, error)
- func (r *Redis) Lock(key string, expired int64) (version int64, ok bool, err error)
- func (r *Redis) Script(keyCount int, data string, args []string) (interface{}, error)
- func (r *Redis) Set(key string, value interface{}) error
- func (r *Redis) Unlock(key string, version int64) (ok bool, err error)
- type RedisClients
- type RedisDynamicConfiguration
- type RedisInfo
- type RedisLog
Constants ¶
View Source
const ( MAX_IDLE = 50 MAX_ACTIVE = 100 IDLE_TIMEOUT = 300 READ_TIMEOUT = 500 WRITE_TIMEOUT = 500 CONNECT_TIMEOUT = 1000 )
View Source
const (
UnlockLua = `` /* 169-byte string literal not displayed */
)
Variables ¶
View Source
var ( ErrRespNil = errors.New("nil returned") ErrRedisNotInit = errors.New("Redis Not Init") ErrRedisLogNotInit = errors.New("Redis Logger Not Init") ErrRedisNotConfigured = errors.New("RedisName Is Not Configured") ErrRedisAddrNotConfigured = errors.New("Redis Addr Is Not Configured") )
Functions ¶
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
type RedisClients ¶
Click to show internal directories.
Click to hide internal directories.