Versions in this module Expand all Collapse all v1 v1.1.0 May 17, 2022 Changes in this version + const DistributeByKetama + const DistributeByModular + const PollByRandom + const PollByRoundRobin + const PollByWeight + type ConnFactory interface + type HAConfig struct + AutoEjectHost bool + Master string + MinServerNum int + Options *redis.Options + Password string + PollType int + ReadonlyPassword string + ServerFailureLimit int32 + ServerRetryTimeout time.Duration + Slaves []string + type HAConnFactory struct + func NewHAConnFactory(cfg *HAConfig) (*HAConnFactory, error) + type Pool struct + func NewHA(cfg *HAConfig) (*Pool, error) + func NewShard(cfg *ShardConfig) (*Pool, error) + func (p *Pool) Append(key, value string) *redis.IntCmd + func (p *Pool) BLPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd + func (p *Pool) BRPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd + func (p *Pool) BRPopLPush(source, destination string, timeout time.Duration) *redis.StringCmd + func (p *Pool) BitCount(key string, bitCount *redis.BitCount) *redis.IntCmd + func (p *Pool) BitField(key string, args ...interface{}) *redis.IntSliceCmd + func (p *Pool) BitOp(op int, destKey string, keys ...string) *redis.IntCmd + func (p *Pool) BitOpAnd(destKey string, keys ...string) *redis.IntCmd + func (p *Pool) BitOpNot(destKey string, key string) *redis.IntCmd + func (p *Pool) BitOpOr(destKey string, keys ...string) *redis.IntCmd + func (p *Pool) BitOpXor(destKey string, keys ...string) *redis.IntCmd + func (p *Pool) BitPos(key string, bit int64, pos ...int64) *redis.IntCmd + func (p *Pool) Close() + func (p *Pool) DebugObject(key string) *redis.StringCmd + func (p *Pool) Decr(key string) *redis.IntCmd + func (p *Pool) DecrBy(key string, decrement int64) *redis.IntCmd + func (p *Pool) Del(keys ...string) (int64, error) + func (p *Pool) Dump(key string) *redis.StringCmd + func (p *Pool) Echo(message interface{}) *redis.StringCmd + func (p *Pool) Eval(script string, keys []string, args ...interface{}) *redis.Cmd + func (p *Pool) EvalSha(sha1 string, keys []string, args ...interface{}) *redis.Cmd + func (p *Pool) Exists(keys ...string) (int64, error) + func (p *Pool) Expire(key string, expiration time.Duration) *redis.BoolCmd + func (p *Pool) ExpireAt(key string, tm time.Time) *redis.BoolCmd + func (p *Pool) GeoAdd(key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd + func (p *Pool) GeoDist(key string, member1, member2, unit string) *redis.FloatCmd + func (p *Pool) GeoHash(key string, members ...string) *redis.StringSliceCmd + func (p *Pool) GeoPos(key string, members ...string) *redis.GeoPosCmd + func (p *Pool) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd + func (p *Pool) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd + func (p *Pool) GeoRadiusByMemberStore(key, member string, query *redis.GeoRadiusQuery) *redis.IntCmd + func (p *Pool) GeoRadiusStore(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.IntCmd + func (p *Pool) Get(key string) *redis.StringCmd + func (p *Pool) GetBit(key string, offset int64) *redis.IntCmd + func (p *Pool) GetRange(key string, start, end int64) *redis.StringCmd + func (p *Pool) GetSet(key string, value interface{}) *redis.StringCmd + func (p *Pool) HDel(key string, fields ...string) *redis.IntCmd + func (p *Pool) HExists(key, field string) *redis.BoolCmd + func (p *Pool) HGet(key, field string) *redis.StringCmd + func (p *Pool) HGetAll(key string) *redis.StringStringMapCmd + func (p *Pool) HIncrBy(key, field string, incr int64) *redis.IntCmd + func (p *Pool) HIncrByFloat(key, field string, incr float64) *redis.FloatCmd + func (p *Pool) HKeys(key string) *redis.StringSliceCmd + func (p *Pool) HLen(key string) *redis.IntCmd + func (p *Pool) HMGet(key string, fields ...string) *redis.SliceCmd + func (p *Pool) HMSet(key string, values ...interface{}) *redis.IntCmd + func (p *Pool) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd + func (p *Pool) HSet(key, field string, value interface{}) *redis.BoolCmd + func (p *Pool) HSetNX(key, field string, value interface{}) *redis.BoolCmd + func (p *Pool) HVals(key string) *redis.StringSliceCmd + func (p *Pool) Incr(key string) *redis.IntCmd + func (p *Pool) IncrBy(key string, increment int64) *redis.IntCmd + func (p *Pool) IncrByFloat(key string, value float64) *redis.FloatCmd + func (p *Pool) LIndex(key string, index int64) *redis.StringCmd + func (p *Pool) LInsert(key, op string, pivot, value interface{}) *redis.IntCmd + func (p *Pool) LInsertAfter(key string, pivot, value interface{}) *redis.IntCmd + func (p *Pool) LInsertBefore(key string, pivot, value interface{}) *redis.IntCmd + func (p *Pool) LLen(key string) *redis.IntCmd + func (p *Pool) LPop(key string) *redis.StringCmd + func (p *Pool) LPush(key string, values ...interface{}) *redis.IntCmd + func (p *Pool) LPushX(key string, values ...interface{}) *redis.IntCmd + func (p *Pool) LRange(key string, start, stop int64) *redis.StringSliceCmd + func (p *Pool) LRem(key string, count int64, value interface{}) *redis.IntCmd + func (p *Pool) LSet(key string, index int64, value interface{}) *redis.StatusCmd + func (p *Pool) LTrim(key string, start, stop int64) *redis.StatusCmd + func (p *Pool) MGet(keys ...string) ([]interface{}, error) + func (p *Pool) MGetWithGD(ctx context.Context, keys ...string) ([]interface{}, map[string]error) + func (p *Pool) MSet(values ...interface{}) *redis.StatusCmd + func (p *Pool) MSetNX(values ...interface{}) *redis.BoolCmd + func (p *Pool) MSetWithGD(values ...interface{}) []*redis.StatusCmd + func (p *Pool) MemoryUsage(key string, samples ...int) *redis.IntCmd + func (p *Pool) ObjectEncoding(key string) *redis.StringCmd + func (p *Pool) ObjectIdleTime(key string) *redis.DurationCmd + func (p *Pool) ObjectRefCount(key string) *redis.IntCmd + func (p *Pool) PFAdd(key string, els ...interface{}) *redis.IntCmd + func (p *Pool) PFCount(keys ...string) *redis.IntCmd + func (p *Pool) PFMerge(dest string, keys ...string) *redis.StatusCmd + func (p *Pool) Ping() *redis.StatusCmd + func (p *Pool) Pipeline() (redis.Pipeliner, error) + func (p *Pool) Pipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error) + func (p *Pool) PubSubChannels(pattern string) *redis.StringSliceCmd + func (p *Pool) PubSubNumPat() *redis.IntCmd + func (p *Pool) PubSubNumSub(channels ...string) *redis.StringIntMapCmd + func (p *Pool) Publish(channel string, message interface{}) *(redis.IntCmd) + func (p *Pool) RPop(key string) *redis.StringCmd + func (p *Pool) RPopLPush(source, destination string) *redis.StringCmd + func (p *Pool) RPush(key string, values ...interface{}) *redis.IntCmd + func (p *Pool) RPushX(key string, values ...interface{}) *redis.IntCmd + func (p *Pool) Rename(key, newkey string) *redis.StatusCmd + func (p *Pool) RenameNX(key, newkey string) *redis.BoolCmd + func (p *Pool) SAdd(key string, members ...interface{}) *redis.IntCmd + func (p *Pool) SCard(key string) *redis.IntCmd + func (p *Pool) SDiff(keys ...string) *redis.StringSliceCmd + func (p *Pool) SDiffStore(destination string, keys ...string) *redis.IntCmd + func (p *Pool) SInter(keys ...string) *redis.StringSliceCmd + func (p *Pool) SInterStore(destination string, keys ...string) *redis.IntCmd + func (p *Pool) SIsMember(key string, member interface{}) *redis.BoolCmd + func (p *Pool) SMembers(key string) *redis.StringSliceCmd + func (p *Pool) SMembersMap(key string) *redis.StringStructMapCmd + func (p *Pool) SMove(source, destination string, member interface{}) *redis.BoolCmd + func (p *Pool) SPop(key string) *redis.StringCmd + func (p *Pool) SPopN(key string, count int64) *redis.StringSliceCmd + func (p *Pool) SRandMember(key string) *redis.StringCmd + func (p *Pool) SRandMemberN(key string, count int64) *redis.StringSliceCmd + func (p *Pool) SRem(key string, members ...interface{}) *redis.IntCmd + func (p *Pool) SScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd + func (p *Pool) SUnion(keys ...string) *redis.StringSliceCmd + func (p *Pool) SUnionStore(destination string, keys ...string) *redis.IntCmd + func (p *Pool) Scan(cursor uint64, match string, count int64) *redis.ScanCmd + func (p *Pool) ScriptExists(hashes ...string) *redis.BoolSliceCmd + func (p *Pool) ScriptFlush() *redis.StatusCmd + func (p *Pool) ScriptKill() *redis.StatusCmd + func (p *Pool) ScriptLoad(script string) *redis.StringCmd + func (p *Pool) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd + func (p *Pool) SetBit(key string, offset int64, value int) *redis.IntCmd + func (p *Pool) SetNX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd + func (p *Pool) SetRange(key string, offset int64, value string) *redis.IntCmd + func (p *Pool) SetXX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd + func (p *Pool) Sort(key string, sort *redis.Sort) *redis.StringSliceCmd + func (p *Pool) SortInterfaces(key string, sort *redis.Sort) *redis.SliceCmd + func (p *Pool) SortStore(key, store string, sort *redis.Sort) *redis.IntCmd + func (p *Pool) Stats() (*redis.PoolStats, error) + func (p *Pool) StrLen(key string) *redis.IntCmd + func (p *Pool) TTL(key string) *redis.DurationCmd + func (p *Pool) Touch(keys ...string) (int64, error) + func (p *Pool) TxPipeline() (redis.Pipeliner, error) + func (p *Pool) TxPipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error) + func (p *Pool) Type(key string) *redis.StatusCmd + func (p *Pool) Unlink(keys ...string) (int64, error) + func (p *Pool) WithMaster(key ...string) (*redis.Client, error) + func (p *Pool) ZAdd(key string, members ...*redis.Z) *redis.IntCmd + func (p *Pool) ZAddCh(key string, members ...*redis.Z) *redis.IntCmd + func (p *Pool) ZAddNX(key string, members ...*redis.Z) *redis.IntCmd + func (p *Pool) ZAddNXCh(key string, members ...*redis.Z) *redis.IntCmd + func (p *Pool) ZAddXX(key string, members ...*redis.Z) *redis.IntCmd + func (p *Pool) ZAddXXCh(key string, members ...*redis.Z) *redis.IntCmd + func (p *Pool) ZCard(key string) *redis.IntCmd + func (p *Pool) ZCount(key, min, max string) *redis.IntCmd + func (p *Pool) ZIncr(key string, member *redis.Z) *redis.FloatCmd + func (p *Pool) ZIncrBy(key string, increment float64, member string) *redis.FloatCmd + func (p *Pool) ZIncrNX(key string, member *redis.Z) *redis.FloatCmd + func (p *Pool) ZIncrXX(key string, member *redis.Z) *redis.FloatCmd + func (p *Pool) ZInterStore(destination string, store *redis.ZStore) *redis.IntCmd + func (p *Pool) ZLexCount(key, min, max string) *redis.IntCmd + func (p *Pool) ZPopMax(key string, count ...int64) *redis.ZSliceCmd + func (p *Pool) ZPopMin(key string, count ...int64) *redis.ZSliceCmd + func (p *Pool) ZRange(key string, start, stop int64) *redis.StringSliceCmd + func (p *Pool) ZRangeByLex(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd + func (p *Pool) ZRangeByScore(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd + func (p *Pool) ZRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd + func (p *Pool) ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd + func (p *Pool) ZRank(key, member string) *redis.IntCmd + func (p *Pool) ZRem(key string, members ...interface{}) *redis.IntCmd + func (p *Pool) ZRemRangeByLex(key, min, max string) *redis.IntCmd + func (p *Pool) ZRemRangeByRank(key string, start, stop int64) *redis.IntCmd + func (p *Pool) ZRemRangeByScore(key, min, max string) *redis.IntCmd + func (p *Pool) ZRevRange(key string, start, stop int64) *redis.StringSliceCmd + func (p *Pool) ZRevRangeByLex(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd + func (p *Pool) ZRevRangeByScore(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd + func (p *Pool) ZRevRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd + func (p *Pool) ZRevRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd + func (p *Pool) ZRevRank(key, member string) *redis.IntCmd + func (p *Pool) ZScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd + func (p *Pool) ZScore(key, member string) *redis.FloatCmd + func (p *Pool) ZUnionStore(dest string, store *redis.ZStore) *redis.IntCmd + type ShardConfig struct + DistributeType int + HashFn func(key []byte) uint32 + Shards []*HAConfig + type ShardConnFactory struct + func NewShardConnFactory(cfg *ShardConfig) (*ShardConnFactory, error) Other modules containing this package github.com/bitleak/go-redis-pool/v2 github.com/bitleak/go-redis-pool/v3