Documentation ¶
Index ¶
- func Delete(key string) error
- func Do(commandName string, args ...interface{}) (reply interface{}, err error)
- func Get(key string) interface{}
- func HDel(key interface{}, fields ...interface{}) (res int, err error)
- func HGet(key, field string) (res string, err error)
- func HGetInt(key, field string) (res int, err error)
- func HMSet(key string, fields ...interface{}) (res string, err error)
- func HSet(key, field string, value interface{}) (res int, err error)
- func Init(c *config.Conf)
- func IsExist(key string) bool
- func SAdd(key string, members ...interface{}) (res int, err error)
- func SMembers(key string) (res []string, err error)
- func SRem(key string, members ...interface{}) (res int, err error)
- func Set(key string, val interface{}, timeout time.Duration) (err error)
- func ZAdd(key string, args ...interface{}) (res int, err error)
- func ZIncrby(key string, incr int, member string) (res int, err error)
- func ZRange(key string, args ...interface{}) (res []string, err error)
- func ZRem(key string, members ...interface{}) (res int, err error)
- func ZScore(key, member string) (res float64, err error)
- type Redis
- func (r *Redis) Delete(key string) error
- func (r *Redis) Do(commandName string, args ...interface{}) (reply interface{}, err error)
- func (r *Redis) Get(key string) interface{}
- func (r *Redis) IsExist(key string) bool
- func (r *Redis) Set(key string, val interface{}, timeout time.Duration) (err error)
- func (r *Redis) SetConn(conn *redis.Pool)
- type RedisOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis redis cache
type RedisOpts ¶
type RedisOpts struct { Host string `yml:"host" json:"host"` Password string `yml:"password" json:"password"` Database int `yml:"database" json:"database"` MaxIdle int `yml:"max_idle" json:"max_idle"` MaxActive int `yml:"max_active" json:"max_active"` IdleTimeout int32 `yml:"idle_timeout" json:"idle_timeout"` //second }
RedisOpts redis 连接属性
Click to show internal directories.
Click to hide internal directories.