Versions in this module Expand all Collapse all v1 v1.0.3 Sep 12, 2024 v1.0.2 Sep 9, 2024 v1.0.1 Sep 8, 2024 Changes in this version + const C_CONN_IDLE_TIMEOVER + const C_DB_CLUSTER + const C_INF_MAX + const C_INF_MIN + const C_TICK_OUTPUT_STAT_INTERVAL + var ErrHashGetMapResultMismatch = errors.New("ErrHashGetMapResultMismatch") + var ErrInvalidCoding = errors.New("ErrInvalidCoding") + var ErrInvalidTTL = errors.New("ErrInvalidTTL") + var ErrNameRepeated = errors.New("ErrConfigNameRepeated") + var ErrNil = redis.ErrNil + var ErrZsetAddArrInvalid = errors.New("ErrZsetAddArrInvalid") + func Command(dbName string, coding ECoding, command string, args ...interface{}) *reply + func Connector(dbName string) redis.Conn + func Decode(encoding ECoding, b []byte, v interface{}) error + func Encode(encoding ECoding, v interface{}) (interface{}, error) + func Exec(sends ...sender) *reply + func Install(confs []*Config) ctl.IControler + func Pipe(sends ...sender) error + func RegistCoder(name ECoding, coder Coder) + func Reply(rep interface{}, err error, coding ECoding, fullCmd string) *reply + func Sender(k IKeyer, send func(), rep ...func(rps []*Resp)) sender + type Bit struct + func (k *Bit) BitCount(beginEnd ...int64) *reply + func (k *Bit) BitOpt(opt, destKey string, keys ...string) *reply + func (k *Bit) GetBit(offset int64) *reply + func (k *Bit) SetBit(offset, val_0_or_1 int64) *reply + type ClusterPool struct + func (*ClusterPool) Mode() EMode + type Coder struct + Decoder func(data []byte, v interface{}) error + Encoder func(v interface{}) ([]byte, error) + type Config struct + Addr string + DbIdx int64 + MaxActive int64 + MaxIdle int64 + Name string + Passwd string + Wait bool + type ECoding = string + const ECod_Json + const ECod_Msgpack + const ECod_None + const ECod_ProtoBuff + type EMode int + const EMode_Cluster + const EMode_Normal + type ESetMode int + const ESet_Update + const ESet_WhenExist + const ESet_WhenNoExist + const ESet_WhenValueGT + const ESet_WhenValueLT + type ESort int + const ESort_Asc + const ESort_Desc + type Hash struct + func (k *Hash) Del(fields ...interface{}) *reply + func (k *Hash) Exists(field interface{}) *reply + func (k *Hash) Fields() *reply + func (k *Hash) Get(field interface{}) *reply + func (k *Hash) GetAll() *reply + func (k *Hash) GetMap(fields ...interface{}) *reply + func (k *Hash) GetStruct() *reply + func (k *Hash) Getm(fields ...interface{}) *reply + func (k *Hash) IncrBy(field interface{}, increment interface{}) *reply + func (k *Hash) IncrByFloat(field interface{}, increment float64) *reply + func (k *Hash) Len() *reply + func (k *Hash) Set(field, value interface{}, noExist ...bool) *reply + func (k *Hash) SetMap(mp map[interface{}]interface{}) *reply + func (k *Hash) SetStruct(obj interface{}) *reply + func (k *Hash) Values() *reply + type IContrler interface + Use func(name string) IPooler + var Ctl IContrler + func Controller(confs []*Config) IContrler + type IKeyer interface + type IMutexer interface + Extend func() (bool, error) + Lock func() error + Unlock func() (bool, error) + func Mutex(dbName, key string) IMutexer + type IPooler interface + Close func() error + Get func() redis.Conn + Mode func() EMode + func Pool(dbName string) IPooler + type Key struct + Coding ECoding + DB string + K string + Ttl time.Duration + func (k *Key) Clusted() bool + func (k *Key) Delete(keys ...string) *reply + func (k *Key) Dump() *reply + func (k *Key) Existed() *reply + func (k *Key) Expire(seconds int64) *reply + func (k *Key) ExpireAt(timestamp int64) *reply + func (k *Key) Keys() *reply + func (k *Key) Move(db int64) *reply + func (k *Key) PExpire(millisecond int64) *reply + func (k *Key) PExpireAt(timestamp_ms int64) *reply + func (k *Key) PTTL() *reply + func (k *Key) Persist() *reply + func (k *Key) RandomKey() *reply + func (k *Key) Refresh(ttl ...time.Duration) *reply + func (k *Key) Rename(newKey string) *reply + func (k *Key) RenameNX(newKey string) *reply + func (k *Key) Restore(ttlMS, serializedValue interface{}) *reply + func (k *Key) Select(db int64) *reply + func (k *Key) TTL() *reply + func (k *Key) Type() *reply + func (k *Key) Valid() bool + type List struct + FixSize int + func (k *List) BLpop(timeout interface{}) *reply + func (k *List) BRpop(timeout interface{}) *reply + func (k *List) BRpoplpush(key, source, destination string, timeout interface{}) *reply + func (k *List) LIndex(index int) *reply + func (k *List) LInsert(position, pivot, value string) *reply + func (k *List) LPop() *reply + func (k *List) LPush(value interface{}, whenListExist ...bool) *reply + func (k *List) LRange(start, stop interface{}) *reply + func (k *List) LRem(count, value interface{}) *reply + func (k *List) LSet(index, value interface{}) *reply + func (k *List) LTrim(start, stop interface{}) *reply + func (k *List) RPop() *reply + func (k *List) RPoplpush(key, source, destination string) *reply + func (k *List) RPush(value interface{}, whenListExist ...bool) *reply + type NormalPool struct + func (*NormalPool) Mode() EMode + type Resp = reply + type Set struct + func (k *Set) Add(members ...interface{}) *reply + func (k *Set) Count() *reply + func (k *Set) Diff(keys []string) *reply + func (k *Set) DiffStore(destinationKey string, keys []string) *reply + func (k *Set) Inter(keys []string) *reply + func (k *Set) InterStore(destinationKey string, keys []string) *reply + func (k *Set) IsMember(member interface{}) *reply + func (k *Set) Members() *reply + func (k *Set) Move(sourceKey, destinationKey string, member interface{}) *reply + func (k *Set) Pop() *reply + func (k *Set) RandMember(count ...int64) *reply + func (k *Set) Rem(members ...interface{}) *reply + func (k *Set) Union(keys []string) *reply + func (k *Set) UnionStore(destinationKey string, keys []string) *reply + type String struct + func (k *String) Append(value interface{}) *reply + func (k *String) Decr() *reply + func (k *String) DecrBy(increment int64) *reply + func (k *String) Get() *reply + func (k *String) GetRange(start, end int64) *reply + func (k *String) GetSet(value interface{}) *reply + func (k *String) Getm(keys []string) *reply + func (k *String) Getms(args [][]interface{}) *reply + func (k *String) Incr() *reply + func (k *String) IncrBy(increment int64) *reply + func (k *String) IncrByFloat(increment float64) *reply + func (k *String) LuaIncrBy(amount int) *reply + func (k *String) Set(mode ESetMode, value interface{}, expire ...time.Duration) *reply + func (k *String) SetRange(value interface{}, offset int64) *reply + func (k *String) Setm(kv map[string]interface{}) *reply + func (k *String) SetmNx(kv map[string]interface{}) *reply + func (k *String) Setms(args [][]interface{}, vals []interface{}) *reply + func (k *String) Upd(mode ESetMode, value interface{}) *reply + type Zset struct + func (k *Zset) Add(mode ESetMode, member, score interface{}) *reply + func (k *Zset) AddArr(ar ...interface{}) *reply + func (k *Zset) AddMap(mp map[interface{}]interface{}) *reply + func (k *Zset) Card() *reply + func (k *Zset) Count(min, max interface{}) *reply + func (k *Zset) Del(members ...interface{}) *reply + func (k *Zset) DelRange(min_start, max_stop interface{}, byScore ...bool) *reply + func (k *Zset) Incr(member, increment interface{}) *reply + func (k *Zset) Range(start, stop interface{}, withScore ...bool) *reply + func (k *Zset) Rangebyscore(min, max interface{}, withScore ...bool) *reply + func (k *Zset) Rank(e ESort, member interface{}) *reply + func (k *Zset) Revrange(start, stop interface{}, withScore ...bool) *reply + func (k *Zset) Revrangebyscore(min, max interface{}, withScore ...bool) *reply + func (k *Zset) Score(member interface{}) *reply + func (k *Zset) Topn(e ESort, start, stopN int, withScore ...bool) *reply + func (k *Zset) TopnByScore(e ESort, min, max interface{}, withScore ...bool) *reply