Documentation ¶
Index ¶
- Variables
- func Bool(reply interface{}, err error) (interface{}, error)
- func ByteSlices(reply interface{}, err error) (interface{}, error)
- func Bytes(reply interface{}, err error) (interface{}, error)
- func Float64(reply interface{}, err error) (interface{}, error)
- func Int(reply interface{}, err error) (interface{}, error)
- func Int64(reply interface{}, err error) (interface{}, error)
- func Int64Map(reply interface{}, err error) (interface{}, error)
- func IntMap(reply interface{}, err error) (interface{}, error)
- func Ints(reply interface{}, err error) (interface{}, error)
- func String(reply interface{}, err error) (interface{}, error)
- func StringMap(reply interface{}, err error) (interface{}, error)
- func Strings(reply interface{}, err error) (interface{}, error)
- func Uint64(reply interface{}, err error) (uint64, error)
- type Config
- type Manager
- type Pipeline
- type Redis
- func (r *Redis) Del(args ...interface{}) (count int, err error)
- func (r *Redis) Do(cmd string, args ...interface{}) (reply interface{}, err error)
- func (r *Redis) DoCtx(ctx context.Context, cmd string, args ...interface{}) (reply interface{}, err error)
- func (r *Redis) Exists(key string) (res bool, err error)
- func (r *Redis) Expire(key string, expire time.Duration) error
- func (r *Redis) Get(key string) (ret []byte, err error)
- func (r *Redis) GetInt(key string) (ret int, err error)
- func (r *Redis) HDel(key interface{}, fields ...interface{}) (res int, err error)
- func (r *Redis) HGet(key, field string) (res string, err error)
- func (r *Redis) HGetAll(key string) (res map[string]string, err error)
- func (r *Redis) HGetInt(key, field string) (res int, err error)
- func (r *Redis) HKeys(key string) (res []string, err error)
- func (r *Redis) HMGet(key string, fields ...interface{}) (res []string, err error)
- func (r *Redis) HMSet(key string, fields ...interface{}) (res string, err error)
- func (r *Redis) HSet(key, fieldk string, fieldv interface{}) (res int, err error)
- func (r *Redis) Incrby(key string, incr int) (res int64, err error)
- func (r *Redis) LLen(key string) (res int64, err error)
- func (r *Redis) LPush(name string, fields ...interface{}) error
- func (r *Redis) MGet(keys ...interface{}) (ret [][]byte, err error)
- func (r *Redis) MSet(keys ...interface{}) (ret string, err error)
- func (r *Redis) NewPipelining() (*Pipeline, error)
- func (r *Redis) RPop(key string) (res string, err error)
- func (r *Redis) Receive(name string, closech chan struct{}, bufferSize int) chan []byte
- func (r *Redis) SAdd(key string, members ...interface{}) (res int, err error)
- func (r *Redis) SIsMember(key string, member string) (res bool, err error)
- func (r *Redis) SMembers(key string) (res []string, err error)
- func (r *Redis) SRem(key string, members ...interface{}) (res int, err error)
- func (r *Redis) Send(name string, fields ...interface{}) error
- func (r *Redis) Set(key, value interface{}) (ret bool, err error)
- func (r *Redis) SetExSecond(key, value interface{}, dur int) (ret string, err error)
- func (r *Redis) Subscribe(ctx context.Context, key string, maxSize int) (chan []byte, error)
- func (r *Redis) ZAdd(key string, args ...interface{}) (res int, err error)
- func (r *Redis) ZCard(key string) (res int, err error)
- func (r *Redis) ZCount(key string, min, max int) (res int, err error)
- func (r *Redis) ZIncrby(key string, incr int, member string) (res int, err error)
- func (r *Redis) ZRange(key string, args ...interface{}) (res []string, err error)
- func (r *Redis) ZRangeInt(key string, start, stop int) (res []int, err error)
- func (r *Redis) ZRangeWithScore(key string, start, stop int) (res []string, err error)
- func (r *Redis) ZRank(key string, member string) (res int, err error)
- func (r *Redis) ZRem(key string, members ...interface{}) (res int, err error)
- func (r *Redis) ZRemrangebyrank(key string, members ...interface{}) (res int, err error)
- func (r *Redis) ZScore(key, member string) (res float64, err error)
- func (r *Redis) Zrevrange(key string, args ...interface{}) (res []string, err error)
- func (r *Redis) Zrevrangebyscore(key string, args ...interface{}) (res []string, err error)
- func (r *Redis) ZrevrangebyscoreInt(key string, args ...interface{}) (res []int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConnExhausted = errors.New("redis: connection exhausted, please retry") ErrTimeout = errors.New("redis: i/o timeout, please retry") )
Functions ¶
func ByteSlices ¶
Types ¶
type Config ¶
type Config struct { Name string `json:"name"` Addr string `json:"addr"` Password string `json:"password"` MaxIdle int `json:"max_idle"` MaxActive int `json:"max_active"` IdleTimeout int `json:"idle_timeout"` ConnectTimeout int `json:"connect_timeout"` ReadTimeout int `json:"read_timeout"` WriteTimeout int `json:"write_timeout"` Database int `json:"database"` SlowTime int `json:"slow_time"` Retry int `json:"retry"` }
type Manager ¶
func NewManager ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) NewPipelining ¶
func (*Redis) SetExSecond ¶
func (*Redis) ZRangeWithScore ¶
func (*Redis) ZRemrangebyrank ¶
func (*Redis) Zrevrangebyscore ¶
Click to show internal directories.
Click to hide internal directories.