xredis

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 20 Imported by: 1

README

clients

Documentation

Index

Constants

View Source
const (
	RedisTypeClient          = "client"
	RedisTypeCluster         = "cluster"
	RedisTypeSentinel        = "sentinel"
	RedisTypeShardedSentinel = "sharded_sentinel"
)
View Source
const (
	BIG_M = 0xc6a4a7935bd1e995
	BIG_R = 47
	SEED  = 0x1234ABCD
)

Variables

This section is empty.

Functions

func Find

func Find(slice []string, val string) (int, bool)

func MurmurHash64A

func MurmurHash64A(data []byte, seed int64) (h int64)

func MurmurHashBytes

func MurmurHashBytes(data []byte) (h int64)

func MurmurHashString

func MurmurHashString(data string) (h int64)

func NewShardedPipeline

func NewShardedPipeline(ctx context.Context, fn func(context.Context, []redis.Cmder) error) redis.Pipeliner

func SetClient

func SetClient(name string, client Redis)

Types

type Hashing

type Hashing interface {
	// contains filtered or unexported methods
}

type MurmurHash

type MurmurHash struct {
}

type Option

type Option struct {
	// 用户需要保证名字唯一
	Name string

	// 连接类型,必须指定。包含client、cluster、sentinel、sharded_sentinel四种类型。
	ConnType string

	// 地址列表,格式为host:port。如果是单实例只会取第一个。
	Addr []string

	// master 名称,只当sentinel、sharded_sentinel 类型必填。如果是sentinel只会取第一个。
	MasterNames []string

	// 自动生成分片名称,如果为false,默认使用MasterName, 只当sharded_sentinel 类型使用。
	// 该字段用来兼容旧项目,非特殊情况请勿设置成true,否则在MasterNames顺序变化时会造成分配rehash
	AutoGenShardName bool

	// 用于认证的用户名
	Username string

	// 用于认证的密码
	Password string

	// 所使用的数据库
	DB int

	// 最大重试次数
	MaxRetries int

	MinRetryBackoff time.Duration
	MaxRetryBackoff time.Duration

	// 超时时间
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration

	// 最大连接数
	PoolSize           int
	MinIdleConns       int
	MaxConnAge         time.Duration
	PoolTimeout        time.Duration
	IdleTimeout        time.Duration
	IdleCheckFrequency time.Duration

	// TODO: 未来增加
	TLSConfig    *tls.Config
	EnableTracer bool
}

Options 是redis客户端的通用配置选项,兼容单实例和cluster类型。

func NewDefaultOptions

func NewDefaultOptions() *Option

type Redis

type Redis interface {
	redis.Cmdable
	io.Closer
}

func GetClient

func GetClient(name string) Redis

func NewShardedClient

func NewShardedClient(sis []*ShardInfo) Redis

type RedisContainer

type RedisContainer struct {
	Redis
	Opt Option
	// contains filtered or unexported fields
}

RedisContainer 用来存储redis客户端及其额外信息

func New

func New(opt *Option, logger xlog.Logger, metrics metrics.Provider, tracer tracer.Provider) (*RedisContainer, error)

func NewClient

func NewClient(opt *Option, logger xlog.Logger, metrics metrics.Provider, tracer tracer.Provider) *RedisContainer

func NewClusterClient

func NewClusterClient(opt *Option, logger xlog.Logger, metrics metrics.Provider, tracer tracer.Provider) *RedisContainer

func NewSentinelClient

func NewSentinelClient(opt *Option, logger xlog.Logger, metrics metrics.Provider, tracer tracer.Provider) *RedisContainer

func NewShardedSentinelClient

func NewShardedSentinelClient(opt *Option, logger xlog.Logger, metrics metrics.Provider, tracer tracer.Provider) *RedisContainer

type ShardInfo

type ShardInfo struct {
	// contains filtered or unexported fields
}

type ShardedClient

type ShardedClient struct {
	Redis

	sync.RWMutex // 目前只有读 没有写
	// contains filtered or unexported fields
}

func (*ShardedClient) Append

func (c *ShardedClient) Append(ctx context.Context, key, value string) *redis.IntCmd

func (*ShardedClient) BLPop

func (c *ShardedClient) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *redis.StringSliceCmd

func (*ShardedClient) BRPop

func (c *ShardedClient) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *redis.StringSliceCmd

func (*ShardedClient) BRPopLPush

func (c *ShardedClient) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *redis.StringCmd

func (*ShardedClient) BZPopMax

func (c *ShardedClient) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *redis.ZWithKeyCmd

func (*ShardedClient) BZPopMin

func (c *ShardedClient) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *redis.ZWithKeyCmd

func (*ShardedClient) BgRewriteAOF

func (c *ShardedClient) BgRewriteAOF(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) BgSave

func (c *ShardedClient) BgSave(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) BitCount

func (c *ShardedClient) BitCount(ctx context.Context, key string, bitCount *redis.BitCount) *redis.IntCmd

func (*ShardedClient) BitField

func (c *ShardedClient) BitField(ctx context.Context, key string, args ...interface{}) *redis.IntSliceCmd

func (*ShardedClient) BitOpAnd

func (c *ShardedClient) BitOpAnd(ctx context.Context, destKey string, keys ...string) *redis.IntCmd

func (*ShardedClient) BitOpNot

func (c *ShardedClient) BitOpNot(ctx context.Context, destKey string, key string) *redis.IntCmd

func (*ShardedClient) BitOpOr

func (c *ShardedClient) BitOpOr(ctx context.Context, destKey string, keys ...string) *redis.IntCmd

func (*ShardedClient) BitOpXor

func (c *ShardedClient) BitOpXor(ctx context.Context, destKey string, keys ...string) *redis.IntCmd

func (*ShardedClient) BitPos

func (c *ShardedClient) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *redis.IntCmd

func (*ShardedClient) ChangeShardInfo

func (c *ShardedClient) ChangeShardInfo(id string, si *ShardInfo)

func (*ShardedClient) ClientGetName

func (c *ShardedClient) ClientGetName(ctx context.Context) *redis.StringCmd

func (*ShardedClient) ClientID

func (c *ShardedClient) ClientID(ctx context.Context) *redis.IntCmd

func (*ShardedClient) ClientKill

func (c *ShardedClient) ClientKill(ctx context.Context, ipPort string) *redis.StatusCmd

func (*ShardedClient) ClientKillByFilter

func (c *ShardedClient) ClientKillByFilter(ctx context.Context, keys ...string) *redis.IntCmd

func (*ShardedClient) ClientList

func (c *ShardedClient) ClientList(ctx context.Context) *redis.StringCmd

func (*ShardedClient) ClientPause

func (c *ShardedClient) ClientPause(ctx context.Context, dur time.Duration) *redis.BoolCmd

func (*ShardedClient) Close

func (c *ShardedClient) Close() error

--- commands --------------------------------------

func (*ShardedClient) ClusterAddSlots

func (c *ShardedClient) ClusterAddSlots(ctx context.Context, slots ...int) *redis.StatusCmd

func (*ShardedClient) ClusterAddSlotsRange

func (c *ShardedClient) ClusterAddSlotsRange(ctx context.Context, min, max int) *redis.StatusCmd

func (*ShardedClient) ClusterCountFailureReports

func (c *ShardedClient) ClusterCountFailureReports(ctx context.Context, nodeID string) *redis.IntCmd

func (*ShardedClient) ClusterCountKeysInSlot

func (c *ShardedClient) ClusterCountKeysInSlot(ctx context.Context, slot int) *redis.IntCmd

func (*ShardedClient) ClusterDelSlots

func (c *ShardedClient) ClusterDelSlots(ctx context.Context, slots ...int) *redis.StatusCmd

func (*ShardedClient) ClusterDelSlotsRange

func (c *ShardedClient) ClusterDelSlotsRange(ctx context.Context, min, max int) *redis.StatusCmd

func (*ShardedClient) ClusterFailover

func (c *ShardedClient) ClusterFailover(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ClusterForget

func (c *ShardedClient) ClusterForget(ctx context.Context, nodeID string) *redis.StatusCmd

func (*ShardedClient) ClusterGetKeysInSlot

func (c *ShardedClient) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *redis.StringSliceCmd

func (*ShardedClient) ClusterInfo

func (c *ShardedClient) ClusterInfo(ctx context.Context) *redis.StringCmd

func (*ShardedClient) ClusterKeySlot

func (c *ShardedClient) ClusterKeySlot(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) ClusterMeet

func (c *ShardedClient) ClusterMeet(ctx context.Context, host, port string) *redis.StatusCmd

func (*ShardedClient) ClusterNodes

func (c *ShardedClient) ClusterNodes(ctx context.Context) *redis.StringCmd

func (*ShardedClient) ClusterReplicate

func (c *ShardedClient) ClusterReplicate(ctx context.Context, nodeID string) *redis.StatusCmd

func (*ShardedClient) ClusterResetHard

func (c *ShardedClient) ClusterResetHard(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ClusterResetSoft

func (c *ShardedClient) ClusterResetSoft(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ClusterSaveConfig

func (c *ShardedClient) ClusterSaveConfig(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ClusterSlaves

func (c *ShardedClient) ClusterSlaves(ctx context.Context, nodeID string) *redis.StringSliceCmd

func (*ShardedClient) ClusterSlots

func (c *ShardedClient) ClusterSlots(ctx context.Context) *redis.ClusterSlotsCmd

func (*ShardedClient) Command

func (c *ShardedClient) Command(ctx context.Context) *redis.CommandsInfoCmd

func (*ShardedClient) ConfigGet

func (c *ShardedClient) ConfigGet(ctx context.Context, parameter string) *redis.SliceCmd

func (*ShardedClient) ConfigResetStat

func (c *ShardedClient) ConfigResetStat(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ConfigRewrite

func (c *ShardedClient) ConfigRewrite(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ConfigSet

func (c *ShardedClient) ConfigSet(ctx context.Context, parameter, value string) *redis.StatusCmd

func (*ShardedClient) DBSize

func (c *ShardedClient) DBSize(ctx context.Context) *redis.IntCmd

func (*ShardedClient) DebugObject

func (c *ShardedClient) DebugObject(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) Decr

func (c *ShardedClient) Decr(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) DecrBy

func (c *ShardedClient) DecrBy(ctx context.Context, key string, decrement int64) *redis.IntCmd

func (*ShardedClient) Del

func (c *ShardedClient) Del(ctx context.Context, keys ...string) *redis.IntCmd

func (*ShardedClient) Dump

func (c *ShardedClient) Dump(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) Echo

func (c *ShardedClient) Echo(ctx context.Context, message interface{}) *redis.StringCmd

func (*ShardedClient) Eval

func (c *ShardedClient) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *redis.Cmd

func (*ShardedClient) EvalSha

func (c *ShardedClient) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *redis.Cmd

func (*ShardedClient) Exists

func (c *ShardedClient) Exists(ctx context.Context, keys ...string) *redis.IntCmd

func (*ShardedClient) Expire

func (c *ShardedClient) Expire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*ShardedClient) ExpireAt

func (c *ShardedClient) ExpireAt(ctx context.Context, key string, tm time.Time) *redis.BoolCmd

func (*ShardedClient) FlushAll

func (c *ShardedClient) FlushAll(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) FlushAllAsync

func (c *ShardedClient) FlushAllAsync(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) FlushDB

func (c *ShardedClient) FlushDB(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) FlushDBAsync

func (c *ShardedClient) FlushDBAsync(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) GeoAdd

func (c *ShardedClient) GeoAdd(ctx context.Context, key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd

func (*ShardedClient) GeoDist

func (c *ShardedClient) GeoDist(ctx context.Context, key string, member1, member2, unit string) *redis.FloatCmd

func (*ShardedClient) GeoHash

func (c *ShardedClient) GeoHash(ctx context.Context, key string, members ...string) *redis.StringSliceCmd

func (*ShardedClient) GeoPos

func (c *ShardedClient) GeoPos(ctx context.Context, key string, members ...string) *redis.GeoPosCmd

func (*ShardedClient) GeoRadius

func (c *ShardedClient) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd

func (*ShardedClient) GeoRadiusByMember

func (c *ShardedClient) GeoRadiusByMember(ctx context.Context, key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd

func (*ShardedClient) GeoRadiusByMemberStore

func (c *ShardedClient) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *redis.GeoRadiusQuery) *redis.IntCmd

func (*ShardedClient) GeoRadiusStore

func (c *ShardedClient) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.IntCmd

func (*ShardedClient) Get

func (c *ShardedClient) Get(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) GetBit

func (c *ShardedClient) GetBit(ctx context.Context, key string, offset int64) *redis.IntCmd

func (*ShardedClient) GetRange

func (c *ShardedClient) GetRange(ctx context.Context, key string, start, end int64) *redis.StringCmd

func (*ShardedClient) GetSet

func (c *ShardedClient) GetSet(ctx context.Context, key string, value interface{}) *redis.StringCmd

func (*ShardedClient) HDel

func (c *ShardedClient) HDel(ctx context.Context, key string, fields ...string) *redis.IntCmd

func (*ShardedClient) HExists

func (c *ShardedClient) HExists(ctx context.Context, key, field string) *redis.BoolCmd

func (*ShardedClient) HGet

func (c *ShardedClient) HGet(ctx context.Context, key, field string) *redis.StringCmd

func (*ShardedClient) HGetAll

func (c *ShardedClient) HGetAll(ctx context.Context, key string) *redis.StringStringMapCmd

func (*ShardedClient) HIncrBy

func (c *ShardedClient) HIncrBy(ctx context.Context, key, field string, incr int64) *redis.IntCmd

func (*ShardedClient) HIncrByFloat

func (c *ShardedClient) HIncrByFloat(ctx context.Context, key, field string, incr float64) *redis.FloatCmd

func (*ShardedClient) HKeys

func (c *ShardedClient) HKeys(ctx context.Context, key string) *redis.StringSliceCmd

func (*ShardedClient) HLen

func (c *ShardedClient) HLen(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) HMGet

func (c *ShardedClient) HMGet(ctx context.Context, key string, fields ...string) *redis.SliceCmd

func (*ShardedClient) HMSet

func (c *ShardedClient) HMSet(ctx context.Context, key string, values ...interface{}) *redis.BoolCmd

func (*ShardedClient) HScan

func (c *ShardedClient) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*ShardedClient) HSet

func (c *ShardedClient) HSet(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*ShardedClient) HSetNX

func (c *ShardedClient) HSetNX(ctx context.Context, key, field string, value interface{}) *redis.BoolCmd

func (*ShardedClient) HVals

func (c *ShardedClient) HVals(ctx context.Context, key string) *redis.StringSliceCmd

func (*ShardedClient) Incr

func (c *ShardedClient) Incr(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) IncrBy

func (c *ShardedClient) IncrBy(ctx context.Context, key string, value int64) *redis.IntCmd

func (*ShardedClient) IncrByFloat

func (c *ShardedClient) IncrByFloat(ctx context.Context, key string, value float64) *redis.FloatCmd

func (*ShardedClient) Info

func (c *ShardedClient) Info(ctx context.Context, section ...string) *redis.StringCmd

func (*ShardedClient) Keys

func (c *ShardedClient) Keys(ctx context.Context, pattern string) *redis.StringSliceCmd

func (*ShardedClient) LIndex

func (c *ShardedClient) LIndex(ctx context.Context, key string, index int64) *redis.StringCmd

func (*ShardedClient) LInsert

func (c *ShardedClient) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *redis.IntCmd

func (*ShardedClient) LInsertAfter

func (c *ShardedClient) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *redis.IntCmd

func (*ShardedClient) LInsertBefore

func (c *ShardedClient) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *redis.IntCmd

func (*ShardedClient) LLen

func (c *ShardedClient) LLen(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) LPop

func (c *ShardedClient) LPop(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) LPush

func (c *ShardedClient) LPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*ShardedClient) LPushX

func (c *ShardedClient) LPushX(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*ShardedClient) LRange

func (c *ShardedClient) LRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

func (*ShardedClient) LRem

func (c *ShardedClient) LRem(ctx context.Context, key string, count int64, value interface{}) *redis.IntCmd

func (*ShardedClient) LSet

func (c *ShardedClient) LSet(ctx context.Context, key string, index int64, value interface{}) *redis.StatusCmd

func (*ShardedClient) LTrim

func (c *ShardedClient) LTrim(ctx context.Context, key string, start, stop int64) *redis.StatusCmd

func (*ShardedClient) LastSave

func (c *ShardedClient) LastSave(ctx context.Context) *redis.IntCmd

func (*ShardedClient) MGet

func (c *ShardedClient) MGet(ctx context.Context, keys ...string) *redis.SliceCmd

func (*ShardedClient) MSet

func (c *ShardedClient) MSet(ctx context.Context, values ...interface{}) *redis.StatusCmd

func (*ShardedClient) MSetNX

func (c *ShardedClient) MSetNX(ctx context.Context, values ...interface{}) *redis.BoolCmd

func (*ShardedClient) MemoryUsage

func (c *ShardedClient) MemoryUsage(ctx context.Context, key string, samples ...int) *redis.IntCmd

func (*ShardedClient) Migrate

func (c *ShardedClient) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *redis.StatusCmd

func (*ShardedClient) Move

func (c *ShardedClient) Move(ctx context.Context, key string, db int) *redis.BoolCmd

func (*ShardedClient) ObjectEncoding

func (c *ShardedClient) ObjectEncoding(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) ObjectIdleTime

func (c *ShardedClient) ObjectIdleTime(ctx context.Context, key string) *redis.DurationCmd

func (*ShardedClient) ObjectRefCount

func (c *ShardedClient) ObjectRefCount(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) PExpire

func (c *ShardedClient) PExpire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*ShardedClient) PExpireAt

func (c *ShardedClient) PExpireAt(ctx context.Context, key string, tm time.Time) *redis.BoolCmd

func (*ShardedClient) PFAdd

func (c *ShardedClient) PFAdd(ctx context.Context, key string, els ...interface{}) *redis.IntCmd

func (*ShardedClient) PFCount

func (c *ShardedClient) PFCount(ctx context.Context, keys ...string) *redis.IntCmd

func (*ShardedClient) PFMerge

func (c *ShardedClient) PFMerge(ctx context.Context, dest string, keys ...string) *redis.StatusCmd

func (*ShardedClient) PTTL

func (c *ShardedClient) PTTL(ctx context.Context, key string) *redis.DurationCmd

func (*ShardedClient) Persist

func (c *ShardedClient) Persist(ctx context.Context, key string) *redis.BoolCmd

func (*ShardedClient) Ping

func (c *ShardedClient) Ping(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) Pipeline

func (c *ShardedClient) Pipeline() redis.Pipeliner

func (*ShardedClient) Pipelined

func (c *ShardedClient) Pipelined(ctx context.Context, fn func(redis.Pipeliner) error) ([]redis.Cmder, error)

func (*ShardedClient) PubSubChannels

func (c *ShardedClient) PubSubChannels(ctx context.Context, pattern string) *redis.StringSliceCmd

func (*ShardedClient) PubSubNumPat

func (c *ShardedClient) PubSubNumPat(ctx context.Context) *redis.IntCmd

func (*ShardedClient) PubSubNumSub

func (c *ShardedClient) PubSubNumSub(ctx context.Context, channels ...string) *redis.StringIntMapCmd

func (*ShardedClient) Publish

func (c *ShardedClient) Publish(ctx context.Context, channel string, message interface{}) *redis.IntCmd

func (*ShardedClient) Quit

func (c *ShardedClient) Quit(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) RPop

func (c *ShardedClient) RPop(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) RPopLPush

func (c *ShardedClient) RPopLPush(ctx context.Context, source, destination string) *redis.StringCmd

func (*ShardedClient) RPush

func (c *ShardedClient) RPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*ShardedClient) RPushX

func (c *ShardedClient) RPushX(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*ShardedClient) RandomKey

func (c *ShardedClient) RandomKey(ctx context.Context) *redis.StringCmd

func (*ShardedClient) ReadOnly

func (c *ShardedClient) ReadOnly(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ReadWrite

func (c *ShardedClient) ReadWrite(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) Rename

func (c *ShardedClient) Rename(ctx context.Context, key, newkey string) *redis.StatusCmd

func (*ShardedClient) RenameNX

func (c *ShardedClient) RenameNX(ctx context.Context, key, newkey string) *redis.BoolCmd

func (*ShardedClient) Restore

func (c *ShardedClient) Restore(ctx context.Context, key string, ttl time.Duration, value string) *redis.StatusCmd

func (*ShardedClient) RestoreReplace

func (c *ShardedClient) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *redis.StatusCmd

func (*ShardedClient) SAdd

func (c *ShardedClient) SAdd(ctx context.Context, key string, members ...interface{}) *redis.IntCmd

func (*ShardedClient) SCard

func (c *ShardedClient) SCard(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) SDiff

func (c *ShardedClient) SDiff(ctx context.Context, keys ...string) *redis.StringSliceCmd

func (*ShardedClient) SDiffStore

func (c *ShardedClient) SDiffStore(ctx context.Context, destination string, keys ...string) *redis.IntCmd

func (*ShardedClient) SInter

func (c *ShardedClient) SInter(ctx context.Context, keys ...string) *redis.StringSliceCmd

func (*ShardedClient) SInterStore

func (c *ShardedClient) SInterStore(ctx context.Context, destination string, keys ...string) *redis.IntCmd

func (*ShardedClient) SIsMember

func (c *ShardedClient) SIsMember(ctx context.Context, key string, member interface{}) *redis.BoolCmd

func (*ShardedClient) SMembers

func (c *ShardedClient) SMembers(ctx context.Context, key string) *redis.StringSliceCmd

func (*ShardedClient) SMembersMap

func (c *ShardedClient) SMembersMap(ctx context.Context, key string) *redis.StringStructMapCmd

func (*ShardedClient) SMove

func (c *ShardedClient) SMove(ctx context.Context, source, destination string, member interface{}) *redis.BoolCmd

func (*ShardedClient) SPop

func (c *ShardedClient) SPop(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) SPopN

func (c *ShardedClient) SPopN(ctx context.Context, key string, count int64) *redis.StringSliceCmd

func (*ShardedClient) SRandMember

func (c *ShardedClient) SRandMember(ctx context.Context, key string) *redis.StringCmd

func (*ShardedClient) SRandMemberN

func (c *ShardedClient) SRandMemberN(ctx context.Context, key string, count int64) *redis.StringSliceCmd

func (*ShardedClient) SRem

func (c *ShardedClient) SRem(ctx context.Context, key string, members ...interface{}) *redis.IntCmd

func (*ShardedClient) SScan

func (c *ShardedClient) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*ShardedClient) SUnion

func (c *ShardedClient) SUnion(ctx context.Context, keys ...string) *redis.StringSliceCmd

func (*ShardedClient) SUnionStore

func (c *ShardedClient) SUnionStore(ctx context.Context, destination string, keys ...string) *redis.IntCmd

func (*ShardedClient) Save

func (c *ShardedClient) Save(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) Scan

func (c *ShardedClient) Scan(ctx context.Context, cursor uint64, match string, count int64) *redis.ScanCmd

func (*ShardedClient) ScriptExists

func (c *ShardedClient) ScriptExists(ctx context.Context, hashes ...string) *redis.BoolSliceCmd

func (*ShardedClient) ScriptFlush

func (c *ShardedClient) ScriptFlush(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ScriptKill

func (c *ShardedClient) ScriptKill(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ScriptLoad

func (c *ShardedClient) ScriptLoad(ctx context.Context, script string) *redis.StringCmd

func (*ShardedClient) Set

func (c *ShardedClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd

func (*ShardedClient) SetBit

func (c *ShardedClient) SetBit(ctx context.Context, key string, offset int64, value int) *redis.IntCmd

func (*ShardedClient) SetEX

func (c *ShardedClient) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd

func (*ShardedClient) SetNX

func (c *ShardedClient) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd

func (*ShardedClient) SetRange

func (c *ShardedClient) SetRange(ctx context.Context, key string, offset int64, value string) *redis.IntCmd

func (*ShardedClient) SetXX

func (c *ShardedClient) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd

func (*ShardedClient) Shutdown

func (c *ShardedClient) Shutdown(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ShutdownNoSave

func (c *ShardedClient) ShutdownNoSave(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) ShutdownSave

func (c *ShardedClient) ShutdownSave(ctx context.Context) *redis.StatusCmd

func (*ShardedClient) SlaveOf

func (c *ShardedClient) SlaveOf(ctx context.Context, host, port string) *redis.StatusCmd

func (*ShardedClient) Sort

func (c *ShardedClient) Sort(ctx context.Context, key string, sort *redis.Sort) *redis.StringSliceCmd

func (*ShardedClient) SortInterfaces

func (c *ShardedClient) SortInterfaces(ctx context.Context, key string, sort *redis.Sort) *redis.SliceCmd

func (*ShardedClient) SortStore

func (c *ShardedClient) SortStore(ctx context.Context, key, store string, sort *redis.Sort) *redis.IntCmd

func (*ShardedClient) StrLen

func (c *ShardedClient) StrLen(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) TTL

func (c *ShardedClient) TTL(ctx context.Context, key string) *redis.DurationCmd

func (*ShardedClient) Time

func (c *ShardedClient) Time(ctx context.Context) *redis.TimeCmd

func (*ShardedClient) Touch

func (c *ShardedClient) Touch(ctx context.Context, keys ...string) *redis.IntCmd

func (*ShardedClient) TxPipeline

func (c *ShardedClient) TxPipeline() redis.Pipeliner

func (*ShardedClient) TxPipelined

func (c *ShardedClient) TxPipelined(ctx context.Context, fn func(redis.Pipeliner) error) ([]redis.Cmder, error)

func (*ShardedClient) Type

func (c *ShardedClient) Type(ctx context.Context, key string) *redis.StatusCmd
func (c *ShardedClient) Unlink(ctx context.Context, keys ...string) *redis.IntCmd

func (*ShardedClient) XAck

func (c *ShardedClient) XAck(ctx context.Context, stream, group string, ids ...string) *redis.IntCmd

func (*ShardedClient) XAdd

func (c *ShardedClient) XAdd(ctx context.Context, a *redis.XAddArgs) *redis.StringCmd

func (*ShardedClient) XClaim

func (c *ShardedClient) XClaim(ctx context.Context, a *redis.XClaimArgs) *redis.XMessageSliceCmd

func (*ShardedClient) XClaimJustID

func (c *ShardedClient) XClaimJustID(ctx context.Context, a *redis.XClaimArgs) *redis.StringSliceCmd

func (*ShardedClient) XDel

func (c *ShardedClient) XDel(ctx context.Context, stream string, ids ...string) *redis.IntCmd

func (*ShardedClient) XGroupCreate

func (c *ShardedClient) XGroupCreate(ctx context.Context, stream, group, start string) *redis.StatusCmd

func (*ShardedClient) XGroupCreateMkStream

func (c *ShardedClient) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *redis.StatusCmd

func (*ShardedClient) XGroupDelConsumer

func (c *ShardedClient) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *redis.IntCmd

func (*ShardedClient) XGroupDestroy

func (c *ShardedClient) XGroupDestroy(ctx context.Context, stream, group string) *redis.IntCmd

func (*ShardedClient) XGroupSetID

func (c *ShardedClient) XGroupSetID(ctx context.Context, stream, group, start string) *redis.StatusCmd

func (*ShardedClient) XInfoGroups

func (c *ShardedClient) XInfoGroups(ctx context.Context, key string) *redis.XInfoGroupsCmd

func (*ShardedClient) XInfoStream

func (c *ShardedClient) XInfoStream(ctx context.Context, key string) *redis.XInfoStreamCmd

func (*ShardedClient) XLen

func (c *ShardedClient) XLen(ctx context.Context, stream string) *redis.IntCmd

func (*ShardedClient) XPending

func (c *ShardedClient) XPending(ctx context.Context, stream, group string) *redis.XPendingCmd

func (*ShardedClient) XPendingExt

func (c *ShardedClient) XPendingExt(ctx context.Context, a *redis.XPendingExtArgs) *redis.XPendingExtCmd

func (*ShardedClient) XRange

func (c *ShardedClient) XRange(ctx context.Context, stream, start, stop string) *redis.XMessageSliceCmd

func (*ShardedClient) XRangeN

func (c *ShardedClient) XRangeN(ctx context.Context, stream, start, stop string, count int64) *redis.XMessageSliceCmd

func (*ShardedClient) XRead

func (c *ShardedClient) XRead(ctx context.Context, a *redis.XReadArgs) *redis.XStreamSliceCmd

func (*ShardedClient) XReadGroup

func (c *ShardedClient) XReadGroup(ctx context.Context, a *redis.XReadGroupArgs) *redis.XStreamSliceCmd

func (*ShardedClient) XReadStreams

func (c *ShardedClient) XReadStreams(ctx context.Context, streams ...string) *redis.XStreamSliceCmd

func (*ShardedClient) XRevRange

func (c *ShardedClient) XRevRange(ctx context.Context, stream string, start, stop string) *redis.XMessageSliceCmd

func (*ShardedClient) XRevRangeN

func (c *ShardedClient) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *redis.XMessageSliceCmd

func (*ShardedClient) XTrim

func (c *ShardedClient) XTrim(ctx context.Context, key string, maxLen int64) *redis.IntCmd

func (*ShardedClient) XTrimApprox

func (c *ShardedClient) XTrimApprox(ctx context.Context, key string, maxLen int64) *redis.IntCmd

func (*ShardedClient) ZAdd

func (c *ShardedClient) ZAdd(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd

func (*ShardedClient) ZAddCh

func (c *ShardedClient) ZAddCh(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd

func (*ShardedClient) ZAddNX

func (c *ShardedClient) ZAddNX(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd

func (*ShardedClient) ZAddNXCh

func (c *ShardedClient) ZAddNXCh(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd

func (*ShardedClient) ZAddXX

func (c *ShardedClient) ZAddXX(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd

func (*ShardedClient) ZAddXXCh

func (c *ShardedClient) ZAddXXCh(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd

func (*ShardedClient) ZCard

func (c *ShardedClient) ZCard(ctx context.Context, key string) *redis.IntCmd

func (*ShardedClient) ZCount

func (c *ShardedClient) ZCount(ctx context.Context, key, min, max string) *redis.IntCmd

func (*ShardedClient) ZIncr

func (c *ShardedClient) ZIncr(ctx context.Context, key string, member *redis.Z) *redis.FloatCmd

func (*ShardedClient) ZIncrBy

func (c *ShardedClient) ZIncrBy(ctx context.Context, key string, increment float64, member string) *redis.FloatCmd

func (*ShardedClient) ZIncrNX

func (c *ShardedClient) ZIncrNX(ctx context.Context, key string, member *redis.Z) *redis.FloatCmd

func (*ShardedClient) ZIncrXX

func (c *ShardedClient) ZIncrXX(ctx context.Context, key string, member *redis.Z) *redis.FloatCmd

func (*ShardedClient) ZInterStore

func (c *ShardedClient) ZInterStore(ctx context.Context, destination string, store *redis.ZStore) *redis.IntCmd

func (*ShardedClient) ZLexCount

func (c *ShardedClient) ZLexCount(ctx context.Context, key, min, max string) *redis.IntCmd

func (*ShardedClient) ZPopMax

func (c *ShardedClient) ZPopMax(ctx context.Context, key string, count ...int64) *redis.ZSliceCmd

func (*ShardedClient) ZPopMin

func (c *ShardedClient) ZPopMin(ctx context.Context, key string, count ...int64) *redis.ZSliceCmd

func (*ShardedClient) ZRange

func (c *ShardedClient) ZRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

func (*ShardedClient) ZRangeByLex

func (c *ShardedClient) ZRangeByLex(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*ShardedClient) ZRangeByScore

func (c *ShardedClient) ZRangeByScore(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*ShardedClient) ZRangeByScoreWithScores

func (c *ShardedClient) ZRangeByScoreWithScores(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.ZSliceCmd

func (*ShardedClient) ZRangeWithScores

func (c *ShardedClient) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd

func (*ShardedClient) ZRank

func (c *ShardedClient) ZRank(ctx context.Context, key, member string) *redis.IntCmd

func (*ShardedClient) ZRem

func (c *ShardedClient) ZRem(ctx context.Context, key string, members ...interface{}) *redis.IntCmd

func (*ShardedClient) ZRemRangeByLex

func (c *ShardedClient) ZRemRangeByLex(ctx context.Context, key, min, max string) *redis.IntCmd

func (*ShardedClient) ZRemRangeByRank

func (c *ShardedClient) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *redis.IntCmd

func (*ShardedClient) ZRemRangeByScore

func (c *ShardedClient) ZRemRangeByScore(ctx context.Context, key, min, max string) *redis.IntCmd

func (*ShardedClient) ZRevRange

func (c *ShardedClient) ZRevRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

func (*ShardedClient) ZRevRangeByLex

func (c *ShardedClient) ZRevRangeByLex(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*ShardedClient) ZRevRangeByScore

func (c *ShardedClient) ZRevRangeByScore(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*ShardedClient) ZRevRangeByScoreWithScores

func (c *ShardedClient) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.ZSliceCmd

func (*ShardedClient) ZRevRangeWithScores

func (c *ShardedClient) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd

func (*ShardedClient) ZRevRank

func (c *ShardedClient) ZRevRank(ctx context.Context, key, member string) *redis.IntCmd

func (*ShardedClient) ZScan

func (c *ShardedClient) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*ShardedClient) ZScore

func (c *ShardedClient) ZScore(ctx context.Context, key, member string) *redis.FloatCmd

func (*ShardedClient) ZUnionStore

func (c *ShardedClient) ZUnionStore(ctx context.Context, dest string, store *redis.ZStore) *redis.IntCmd

type ShardedSentinelClient

type ShardedSentinelClient struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL