package redis

Import Path
	github.com/go-redis/redis/v8 (on go.dev)

Dependency Relation
	imports 28 packages, and imported by 7 packages


Code Examples { err := rdb.Set(ctx, "key", "value", 0).Err() if err != nil { panic(err) } val, err := rdb.Get(ctx, "key").Result() if err != nil { panic(err) } fmt.Println("key", val) val2, err := rdb.Get(ctx, "missing_key").Result() if err == redis.Nil { fmt.Println("missing_key does not exist") } else if err != nil { panic(err) } else { fmt.Println("missing_key", val2) } } { if err := rdb.RPush(ctx, "queue", "message").Err(); err != nil { panic(err) } result, err := rdb.BLPop(ctx, 1*time.Second, "queue").Result() if err != nil { panic(err) } fmt.Println(result[0], result[1]) } { result, err := rdb.Incr(ctx, "counter").Result() if err != nil { panic(err) } fmt.Println(result) } { pipe := rdb.Pipeline() incr := pipe.Incr(ctx, "pipeline_counter") pipe.Expire(ctx, "pipeline_counter", time.Hour) _, err := pipe.Exec(ctx) fmt.Println(incr.Val(), err) } { var incr *redis.IntCmd _, err := rdb.Pipelined(ctx, func(pipe redis.Pipeliner) error { incr = pipe.Incr(ctx, "pipelined_counter") pipe.Expire(ctx, "pipelined_counter", time.Hour) return nil }) fmt.Println(incr.Val(), err) } { rdb.FlushDB(ctx) for i := 0; i < 33; i++ { err := rdb.Set(ctx, fmt.Sprintf("key%d", i), "value", 0).Err() if err != nil { panic(err) } } var cursor uint64 var n int for { var keys []string var err error keys, cursor, err = rdb.Scan(ctx, cursor, "key*", 10).Result() if err != nil { panic(err) } n += len(keys) if cursor == 0 { break } } fmt.Printf("found %d keys\n", n) } { err := rdb.Set(ctx, "key", "value", 0).Err() if err != nil { panic(err) } err = rdb.Set(ctx, "key2", "value", time.Hour).Err() if err != nil { panic(err) } } { const key = "slowlog-log-slower-than" old := rdb.ConfigGet(ctx, key).Val() rdb.ConfigSet(ctx, key, "0") defer rdb.ConfigSet(ctx, key, old[1].(string)) if err := rdb.Do(ctx, "slowlog", "reset").Err(); err != nil { panic(err) } rdb.Set(ctx, "test", "true", 0) result, err := rdb.SlowLogGet(ctx, -1).Result() if err != nil { panic(err) } fmt.Println(len(result)) } { pipe := rdb.TxPipeline() incr := pipe.Incr(ctx, "tx_pipeline_counter") pipe.Expire(ctx, "tx_pipeline_counter", time.Hour) _, err := pipe.Exec(ctx) fmt.Println(incr.Val(), err) } { var incr *redis.IntCmd _, err := rdb.TxPipelined(ctx, func(pipe redis.Pipeliner) error { incr = pipe.Incr(ctx, "tx_pipelined_counter") pipe.Expire(ctx, "tx_pipelined_counter", time.Hour) return nil }) fmt.Println(incr.Val(), err) } { const maxRetries = 1000 increment := func(key string) error { txf := func(tx *redis.Tx) error { n, err := tx.Get(ctx, key).Int() if err != nil && err != redis.Nil { return err } n++ _, err = tx.TxPipelined(ctx, func(pipe redis.Pipeliner) error { pipe.Set(ctx, key, n, 0) return nil }) return err } for i := 0; i < maxRetries; i++ { err := rdb.Watch(ctx, txf, key) if err == nil { return nil } if err == redis.TxFailedErr { continue } return err } return errors.New("increment reached maximum number of retries") } var wg sync.WaitGroup for i := 0; i < 100; i++ { wg.Add(1) go func() { defer wg.Done() if err := increment("counter3"); err != nil { fmt.Println("increment error:", err) } }() } wg.Wait() n, err := rdb.Get(ctx, "counter3").Int() fmt.Println("ended with", n, err) } { conn := rdb.Conn(context.Background()) err := conn.ClientSetName(ctx, "foobar").Err() if err != nil { panic(err) } for i := 0; i < 10; i++ { go rdb.Ping(ctx) } s, err := conn.ClientGetName(ctx).Result() if err != nil { panic(err) } fmt.Println(s) } { rdb := redis.NewClient(&redis.Options{ Addr: "localhost:6379", Password: "", DB: 0, }) pong, err := rdb.Ping(ctx).Result() fmt.Println(pong, err) } { rdb := redis.NewClusterClient(&redis.ClusterOptions{ Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"}, }) rdb.Ping(ctx) } { clusterSlots := func(ctx context.Context) ([]redis.ClusterSlot, error) { slots := []redis.ClusterSlot{ { Start: 0, End: 8191, Nodes: []redis.ClusterNode{{ Addr: ":7000", }, { Addr: ":8000", }}, }, { Start: 8192, End: 16383, Nodes: []redis.ClusterNode{{ Addr: ":7001", }, { Addr: ":8001", }}, }, } return slots, nil } rdb := redis.NewClusterClient(&redis.ClusterOptions{ ClusterSlots: clusterSlots, RouteRandomly: true, }) rdb.Ping(ctx) rdb.ReloadState(ctx) } { rdb := redis.NewFailoverClient(&redis.FailoverOptions{ MasterName: "master", SentinelAddrs: []string{":26379"}, }) rdb.Ping(ctx) } { rdb := redis.NewRing(&redis.RingOptions{ Addrs: map[string]string{ "shard1": ":7000", "shard2": ":7001", "shard3": ":7002", }, }) rdb.Ping(ctx) } { rdb := redis.NewUniversalClient(&redis.UniversalOptions{ Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"}, }) defer rdb.Close() rdb.Ping(ctx) } { rdb := redis.NewUniversalClient(&redis.UniversalOptions{ MasterName: "master", Addrs: []string{":26379"}, }) defer rdb.Close() rdb.Ping(ctx) } { rdb := redis.NewUniversalClient(&redis.UniversalOptions{ Addrs: []string{":6379"}, }) defer rdb.Close() rdb.Ping(ctx) } { opt, err := redis.ParseURL("redis://:qwerty@localhost:6379/1") if err != nil { panic(err) } fmt.Println("addr is", opt.Addr) fmt.Println("db is", opt.DB) fmt.Println("password is", opt.Password) _ = redis.NewClient(opt) } { rdb := redis.NewClient(&redis.Options{ Addr: ":6379", }) rdb.AddHook(redisHook{}) rdb.Pipelined(ctx, func(pipe redis.Pipeliner) error { pipe.Ping(ctx) pipe.Ping(ctx) return nil }) } { pubsub := rdb.Subscribe(ctx, "mychannel1") _, err := pubsub.Receive(ctx) if err != nil { panic(err) } ch := pubsub.Channel() err = rdb.Publish(ctx, "mychannel1", "hello").Err() if err != nil { panic(err) } time.AfterFunc(time.Second, func() { _ = pubsub.Close() }) for msg := range ch { fmt.Println(msg.Channel, msg.Payload) } } { pubsub := rdb.Subscribe(ctx, "mychannel2") defer pubsub.Close() for i := 0; i < 2; i++ { msgi, err := pubsub.ReceiveTimeout(ctx, time.Second) if err != nil { break } switch msg := msgi.(type) { case *redis.Subscription: fmt.Println("subscribed to", msg.Channel) _, err := rdb.Publish(ctx, "mychannel2", "hello").Result() if err != nil { panic(err) } case *redis.Message: fmt.Println("received", msg.Payload, "from", msg.Channel) default: panic("unreached") } } } { iter := rdb.Scan(ctx, 0, "", 0).Iterator() for iter.Next(ctx) { fmt.Println(iter.Val()) } if err := iter.Err(); err != nil { panic(err) } } { iter := rdb.Scan(ctx, 0, "", 0).Iterator() for iter.Next(ctx) { fmt.Println(iter.Val()) } if err := iter.Err(); err != nil { panic(err) } } { IncrByXX := redis.NewScript(` if redis.call("GET", KEYS[1]) ~= false then return redis.call("INCRBY", KEYS[1], ARGV[1]) end return false `) n, err := IncrByXX.Run(ctx, rdb, []string{"xx_counter"}, 2).Result() fmt.Println(n, err) err = rdb.Set(ctx, "xx_counter", "40", 0).Err() if err != nil { panic(err) } n, err = IncrByXX.Run(ctx, rdb, []string{"xx_counter"}, 2).Result() fmt.Println(n, err) } { rdb := redis.NewClient(&redis.Options{ Addr: ":6379", }) rdb.AddHook(redisHook{}) rdb.Watch(ctx, func(tx *redis.Tx) error { tx.Ping(ctx) tx.Ping(ctx) return nil }, "foo") } { Get := func(ctx context.Context, rdb *redis.Client, key string) *redis.StringCmd { cmd := redis.NewStringCmd(ctx, "get", key) rdb.Process(ctx, cmd) return cmd } v, err := Get(ctx, rdb, "key_does_not_exist").Result() fmt.Printf("%q %s", v, err) } { v, err := rdb.Do(ctx, "get", "key_does_not_exist").Text() fmt.Printf("%q %s", v, err) } { rdb := redis.NewClient(&redis.Options{ Addr: ":6379", }) rdb.AddHook(redisHook{}) rdb.Ping(ctx) }
Package-Level Type Names (total 103, in which 79 are exported)
/* sort exporteds by: | */
End int64 Start int64 func Cmdable.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd func Pipeliner.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd func StatefulCmdable.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd func UniversalClient.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (bool, error) (*T) SetErr(e error) (*T) String() string (*T) Val() bool *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewBoolCmd(ctx context.Context, args ...interface{}) *BoolCmd func NewBoolResult(val bool, err error) *BoolCmd func Cmdable.ClientPause(ctx context.Context, dur time.Duration) *BoolCmd func Cmdable.Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Cmdable.ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func Cmdable.HExists(ctx context.Context, key, field string) *BoolCmd func Cmdable.HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd func Cmdable.HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd func Cmdable.Move(ctx context.Context, key string, db int) *BoolCmd func Cmdable.MSetNX(ctx context.Context, values ...interface{}) *BoolCmd func Cmdable.Persist(ctx context.Context, key string) *BoolCmd func Cmdable.PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Cmdable.PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func Cmdable.RenameNX(ctx context.Context, key, newkey string) *BoolCmd func Cmdable.SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func Cmdable.SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func Cmdable.SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd func Cmdable.SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd func Pipeliner.ClientPause(ctx context.Context, dur time.Duration) *BoolCmd func Pipeliner.ClientSetName(ctx context.Context, name string) *BoolCmd func Pipeliner.Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Pipeliner.ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func Pipeliner.HExists(ctx context.Context, key, field string) *BoolCmd func Pipeliner.HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd func Pipeliner.HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd func Pipeliner.Move(ctx context.Context, key string, db int) *BoolCmd func Pipeliner.MSetNX(ctx context.Context, values ...interface{}) *BoolCmd func Pipeliner.Persist(ctx context.Context, key string) *BoolCmd func Pipeliner.PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Pipeliner.PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func Pipeliner.RenameNX(ctx context.Context, key, newkey string) *BoolCmd func Pipeliner.SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func Pipeliner.SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func Pipeliner.SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd func Pipeliner.SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd func StatefulCmdable.ClientPause(ctx context.Context, dur time.Duration) *BoolCmd func StatefulCmdable.ClientSetName(ctx context.Context, name string) *BoolCmd func StatefulCmdable.Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func StatefulCmdable.ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func StatefulCmdable.HExists(ctx context.Context, key, field string) *BoolCmd func StatefulCmdable.HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd func StatefulCmdable.HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd func StatefulCmdable.Move(ctx context.Context, key string, db int) *BoolCmd func StatefulCmdable.MSetNX(ctx context.Context, values ...interface{}) *BoolCmd func StatefulCmdable.Persist(ctx context.Context, key string) *BoolCmd func StatefulCmdable.PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func StatefulCmdable.PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func StatefulCmdable.RenameNX(ctx context.Context, key, newkey string) *BoolCmd func StatefulCmdable.SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func StatefulCmdable.SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func StatefulCmdable.SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd func StatefulCmdable.SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd func UniversalClient.ClientPause(ctx context.Context, dur time.Duration) *BoolCmd func UniversalClient.Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func UniversalClient.ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func UniversalClient.HExists(ctx context.Context, key, field string) *BoolCmd func UniversalClient.HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd func UniversalClient.HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd func UniversalClient.Move(ctx context.Context, key string, db int) *BoolCmd func UniversalClient.MSetNX(ctx context.Context, values ...interface{}) *BoolCmd func UniversalClient.Persist(ctx context.Context, key string) *BoolCmd func UniversalClient.PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd func UniversalClient.PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd func UniversalClient.RenameNX(ctx context.Context, key, newkey string) *BoolCmd func UniversalClient.SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func UniversalClient.SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd func UniversalClient.SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd func UniversalClient.SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]bool, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []bool *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewBoolSliceCmd(ctx context.Context, args ...interface{}) *BoolSliceCmd func NewBoolSliceResult(val []bool, err error) *BoolSliceCmd func Cmdable.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func Pipeliner.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func (*Script).Exists(ctx context.Context, c scripter) *BoolSliceCmd func StatefulCmdable.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func UniversalClient.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
Client is a Redis client representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines. (*T) AddHook(hook Hook) ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd Redis `BZPOPMAX key [key ...] timeout` command. Redis `BZPOPMIN key [key ...] timeout` command. ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ClientGetName returns the name of the connection. ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( T) ClientUnblock(ctx context.Context, id int64) *IntCmd ( T) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd Close closes the client, releasing any open resources. It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines. ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd (*T) Conn(ctx context.Context) *Conn (*T) Context() context.Context ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd Do creates a Cmd from the args and processes the cmd. ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadius is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. Redis `GET key` command. It returns redis.Nil error when key does not exist. ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd HMGet returns the values for the specified fields in the hash stored at key. It returns an interface{} to distinguish between empty string and nil value. HMSet is a deprecated version of HSet left for compatibility with Redis 3. ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HSet accepts values in following formats: - HSet("myhash", "key1", "value1", "key2", "value2") - HSet("myhash", []string{"key1", "value1", "key2", "value2"}) - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"}) Note that it requires Redis v4 for multiple field/value pairs support. ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd MSet is like Set but accepts multiple values: - MSet("key1", "value1", "key2", "value2") - MSet([]string{"key1", "value1", "key2", "value2"}) - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"}) MSetNX is like SetNX but accepts multiple values: - MSetNX("key1", "value1", "key2", "value2") - MSetNX([]string{"key1", "value1", "key2", "value2"}) - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"}) ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd Options returns read-only Options that were used to create the client. ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription. ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd (*T) Pipeline() Pipeliner (*T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) PoolStats returns connection pool stats. (*T) Process(ctx context.Context, cmd Cmder) error ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd Publish posts the message to the channel. ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd Redis `SMEMBERS key` command output as a slice. Redis `SMEMBERS key` command output as a map. ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd Redis `SPOP key` command. Redis `SPOP key count` command. Redis `SRANDMEMBER key` command. Redis `SRANDMEMBER key count` command. ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd Redis `SET key value [expiration]` command. Use expiration for `SETEX`-like behavior. Zero expiration means the key has no expiration time. ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd ( T) String() string Subscribe subscribes the client to the specified channels. Channels can be omitted to create empty subscription. Note that this method does not wait on a response from Redis, so the subscription may not be active immediately. To force the connection to wait, you may call the Receive() method on the returned *PubSub like so: sub := client.Subscribe(queryResp) iface, err := sub.Receive() if err != nil { // handle error } // Should be *Subscription, but others are possible if other actions have been // taken on sub since it was created. switch iface.(type) { case *Subscription: // subscribe succeeded case *Message: // received first message case *Pong: // pong received default: // handle error } ch := sub.Channel() ( T) Sync(ctx context.Context) ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. (*T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd Watch prepares a transaction and marks the keys to be watched for conditional execution if there are any keys. The transaction is automatically closed when fn exits. (*T) WithContext(ctx context.Context) *Client (*T) WithTimeout(timeout time.Duration) *Client ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd Redis `ZADD key score member [score member ...]` command. Redis `ZADD key CH score member [score member ...]` command. Redis `ZADD key NX score member [score member ...]` command. Redis `ZADD key NX CH score member [score member ...]` command. Redis `ZADD key XX score member [score member ...]` command. Redis `ZADD key XX CH score member [score member ...]` command. ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd Redis `ZADD key INCR score member` command. ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd Redis `ZADD key NX INCR score member` command. Redis `ZADD key XX INCR score member` command. ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *T : Cmdable *T : UniversalClient T : expvar.Var T : fmt.Stringer T : io.Closer func NewClient(opt *Options) *Client func NewFailoverClient(failoverOpt *FailoverOptions) *Client func (*Client).WithContext(ctx context.Context) *Client func (*Client).WithTimeout(timeout time.Duration) *Client func golang.org/x/pkgsite/internal/cache.New(client *Client) *cache.Cache func golang.org/x/pkgsite/internal/frontend.(*Server).Install(handle func(string, http.Handler), redisClient *Client, authValues []string) func golang.org/x/pkgsite/internal/middleware.Cache(name string, client *Client, expirer middleware.Expirer, authValues []string) middleware.Middleware func golang.org/x/pkgsite/internal/middleware.Quota(settings config.QuotaSettings, client *Client) middleware.Middleware
ClusterClient is a Redis Cluster client representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines. (*T) AddHook(hook Hook) ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd Redis `BZPOPMAX key [key ...] timeout` command. Redis `BZPOPMIN key [key ...] timeout` command. ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ClientGetName returns the name of the connection. ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( T) ClientUnblock(ctx context.Context, id int64) *IntCmd ( T) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd Close closes the cluster client, releasing any open resources. It is rare to Close a ClusterClient, as the ClusterClient is meant to be long-lived and shared between many goroutines. ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd (*T) Context() context.Context (*T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd Do creates a Cmd from the args and processes the cmd. ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ForEachMaster concurrently calls the fn on each master node in the cluster. It returns the first error if any. ForEachShard concurrently calls the fn on each known node in the cluster. It returns the first error if any. ForEachSlave concurrently calls the fn on each slave node in the cluster. It returns the first error if any. ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadius is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. Redis `GET key` command. It returns redis.Nil error when key does not exist. ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd HMGet returns the values for the specified fields in the hash stored at key. It returns an interface{} to distinguish between empty string and nil value. HMSet is a deprecated version of HSet left for compatibility with Redis 3. ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HSet accepts values in following formats: - HSet("myhash", "key1", "value1", "key2", "value2") - HSet("myhash", []string{"key1", "value1", "key2", "value2"}) - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"}) Note that it requires Redis v4 for multiple field/value pairs support. ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd MSet is like Set but accepts multiple values: - MSet("key1", "value1", "key2", "value2") - MSet([]string{"key1", "value1", "key2", "value2"}) - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"}) MSetNX is like SetNX but accepts multiple values: - MSetNX("key1", "value1", "key2", "value2") - MSetNX([]string{"key1", "value1", "key2", "value2"}) - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"}) ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd Options returns read-only Options that were used to create the client. ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription. ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd (*T) Pipeline() Pipeliner (*T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) PoolStats returns accumulated connection pool stats. (*T) Process(ctx context.Context, cmd Cmder) error ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd Publish posts the message to the channel. ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ReloadState reloads cluster state. If available it calls ClusterSlots func to get cluster slots information. ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd Redis `SMEMBERS key` command output as a slice. Redis `SMEMBERS key` command output as a map. ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd Redis `SPOP key` command. Redis `SPOP key count` command. Redis `SRANDMEMBER key` command. Redis `SRANDMEMBER key count` command. ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd Redis `SET key value [expiration]` command. Use expiration for `SETEX`-like behavior. Zero expiration means the key has no expiration time. ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd Subscribe subscribes the client to the specified channels. Channels can be omitted to create empty subscription. ( T) Sync(ctx context.Context) ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. (*T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd (*T) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error (*T) WithContext(ctx context.Context) *ClusterClient ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd Redis `ZADD key score member [score member ...]` command. Redis `ZADD key CH score member [score member ...]` command. Redis `ZADD key NX score member [score member ...]` command. Redis `ZADD key NX CH score member [score member ...]` command. Redis `ZADD key XX score member [score member ...]` command. Redis `ZADD key XX CH score member [score member ...]` command. ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd Redis `ZADD key INCR score member` command. ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd Redis `ZADD key NX INCR score member` command. Redis `ZADD key XX INCR score member` command. ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *T : Cmdable *T : UniversalClient *T : io.Closer func NewClusterClient(opt *ClusterOptions) *ClusterClient func NewFailoverClusterClient(failoverOpt *FailoverOptions) *ClusterClient func (*ClusterClient).WithContext(ctx context.Context) *ClusterClient
Addr string ID string
ClusterOptions are used to configure a cluster client and should be passed to NewClusterClient. A seed list of host:port addresses of cluster nodes. Optional function that returns cluster slots information. It is useful to manually create cluster of standalone Redis servers and load-balance read/write operations between master and slaves. It can use service like ZooKeeper to maintain configuration information and Cluster.ReloadState to manually trigger state reloading. DialTimeout time.Duration Dialer func(ctx context.Context, network, addr string) (net.Conn, error) IdleCheckFrequency time.Duration IdleTimeout time.Duration MaxConnAge time.Duration The maximum number of retries before giving up. Command is retried on network errors and MOVED/ASK redirects. Default is 3 retries. MaxRetries int MaxRetryBackoff time.Duration MinIdleConns int MinRetryBackoff time.Duration NewClient creates a cluster node client with provided name and options. OnConnect func(ctx context.Context, cn *Conn) error Password string PoolSize applies per cluster node and not for the whole cluster. PoolTimeout time.Duration Enables read-only commands on slave nodes. ReadTimeout time.Duration Allows routing read-only commands to the closest master or slave node. It automatically enables ReadOnly. Allows routing read-only commands to the random master or slave node. It automatically enables ReadOnly. TLSConfig *tls.Config Username string WriteTimeout time.Duration func (*ClusterClient).Options() *ClusterOptions func (*UniversalOptions).Cluster() *ClusterOptions func NewClusterClient(opt *ClusterOptions) *ClusterClient
End int Nodes []ClusterNode Start int func (*ClusterSlotsCmd).Result() ([]ClusterSlot, error) func (*ClusterSlotsCmd).Val() []ClusterSlot func NewClusterSlotsCmdResult(val []ClusterSlot, err error) *ClusterSlotsCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]ClusterSlot, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []ClusterSlot *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewClusterSlotsCmd(ctx context.Context, args ...interface{}) *ClusterSlotsCmd func NewClusterSlotsCmdResult(val []ClusterSlot, err error) *ClusterSlotsCmd func Cmdable.ClusterSlots(ctx context.Context) *ClusterSlotsCmd func Pipeliner.ClusterSlots(ctx context.Context) *ClusterSlotsCmd func StatefulCmdable.ClusterSlots(ctx context.Context) *ClusterSlotsCmd func UniversalClient.ClusterSlots(ctx context.Context) *ClusterSlotsCmd
(*T) Args() []interface{} (*T) Bool() (bool, error) (*T) Err() error (*T) Float32() (float32, error) (*T) Float64() (float64, error) (*T) FullName() string (*T) Int() (int, error) (*T) Int64() (int64, error) (*T) Name() string (*T) Result() (interface{}, error) (*T) SetErr(e error) (*T) String() string (*T) Text() (string, error) (*T) Uint64() (uint64, error) (*T) Val() interface{} *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewCmd(ctx context.Context, args ...interface{}) *Cmd func NewCmdResult(val interface{}, err error) *Cmd func (*Client).Do(ctx context.Context, args ...interface{}) *Cmd func (*ClusterClient).Do(ctx context.Context, args ...interface{}) *Cmd func Cmdable.Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func Cmdable.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func (*Pipeline).Do(ctx context.Context, args ...interface{}) *Cmd func Pipeliner.Do(ctx context.Context, args ...interface{}) *Cmd func Pipeliner.Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func Pipeliner.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func (*Ring).Do(ctx context.Context, args ...interface{}) *Cmd func (*Script).Eval(ctx context.Context, c scripter, keys []string, args ...interface{}) *Cmd func (*Script).EvalSha(ctx context.Context, c scripter, keys []string, args ...interface{}) *Cmd func (*Script).Run(ctx context.Context, c scripter, keys []string, args ...interface{}) *Cmd func StatefulCmdable.Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func StatefulCmdable.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func UniversalClient.Do(ctx context.Context, args ...interface{}) *Cmd func UniversalClient.Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func UniversalClient.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
( T) Append(ctx context.Context, key, value string) *IntCmd ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( T) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( T) ClientGetName(ctx context.Context) *StringCmd ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( T) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( T) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( T) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( T) Get(ctx context.Context, key string) *StringCmd ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd ( T) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( T) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd ( T) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( T) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd ( T) Pipeline() Pipeliner ( T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd ( T) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( T) SMembers(ctx context.Context, key string) *StringSliceCmd ( T) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( T) SPop(ctx context.Context, key string) *StringCmd ( T) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRandMember(ctx context.Context, key string) *StringCmd ( T) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd ( T) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( T) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( T) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd ( T) TxPipeline() Pipeliner ( T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd ( T) ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( T) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *Client *ClusterClient *Conn *Pipeline Pipeliner (interface) *Ring StatefulCmdable (interface) *Tx UniversalClient (interface)
( T) Args() []interface{} ( T) Err() error ( T) FullName() string ( T) Name() string ( T) SetErr(error) ( T) String() string *BoolCmd *BoolSliceCmd *ClusterSlotsCmd *Cmd *CommandsInfoCmd *DurationCmd *FloatCmd *GeoLocationCmd *GeoPosCmd *IntCmd *IntSliceCmd *ScanCmd *SliceCmd *SlowLogCmd *StatusCmd *StringCmd *StringIntMapCmd *StringSliceCmd *StringStringMapCmd *StringStructMapCmd *TimeCmd *XInfoGroupsCmd *XMessageSliceCmd *XPendingCmd *XPendingExtCmd *XStreamSliceCmd *ZSliceCmd *ZWithKeyCmd T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod T : expvar.Var T : fmt.Stringer func (*Client).Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Client).TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*ClusterClient).Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*ClusterClient).TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func Cmdable.Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func Cmdable.TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Conn).Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Conn).TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Pipeline).Exec(ctx context.Context) ([]Cmder, error) func (*Pipeline).Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Pipeline).TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func Pipeliner.Exec(ctx context.Context) ([]Cmder, error) func Pipeliner.Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func Pipeliner.TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Ring).Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Ring).TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func StatefulCmdable.Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func StatefulCmdable.TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Tx).Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Tx).TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func UniversalClient.Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func UniversalClient.TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) func (*Client).Process(ctx context.Context, cmd Cmder) error func (*ClusterClient).Process(ctx context.Context, cmd Cmder) error func (*Conn).Process(ctx context.Context, cmd Cmder) error func Hook.AfterProcess(ctx context.Context, cmd Cmder) error func Hook.AfterProcessPipeline(ctx context.Context, cmds []Cmder) error func Hook.BeforeProcess(ctx context.Context, cmd Cmder) (context.Context, error) func Hook.BeforeProcessPipeline(ctx context.Context, cmds []Cmder) (context.Context, error) func (*Pipeline).Process(ctx context.Context, cmd Cmder) error func Pipeliner.Process(ctx context.Context, cmd Cmder) error func (*Ring).Process(ctx context.Context, cmd Cmder) error func (*SentinelClient).Process(ctx context.Context, cmd Cmder) error func (*Tx).Process(ctx context.Context, cmd Cmder) error func UniversalClient.Process(ctx context.Context, cmd Cmder) error
ACLFlags []string Arity int8 FirstKeyPos int8 Flags []string LastKeyPos int8 Name string ReadOnly bool StepCount int8 func (*CommandsInfoCmd).Result() (map[string]*CommandInfo, error) func (*CommandsInfoCmd).Val() map[string]*CommandInfo func NewCommandsInfoCmdResult(val map[string]*CommandInfo, err error) *CommandsInfoCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (map[string]*CommandInfo, error) (*T) SetErr(e error) (*T) String() string (*T) Val() map[string]*CommandInfo *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewCommandsInfoCmd(ctx context.Context, args ...interface{}) *CommandsInfoCmd func NewCommandsInfoCmdResult(val map[string]*CommandInfo, err error) *CommandsInfoCmd func Cmdable.Command(ctx context.Context) *CommandsInfoCmd func Pipeliner.Command(ctx context.Context) *CommandsInfoCmd func StatefulCmdable.Command(ctx context.Context) *CommandsInfoCmd func UniversalClient.Command(ctx context.Context) *CommandsInfoCmd
Conn is like Client, but its pool contains single connection. ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) Auth(ctx context.Context, password string) *StatusCmd Perform an AUTH command, using the given user and pass. Should be used to authenticate the current connection with one of the connections defined in the ACL list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd Redis `BZPOPMAX key [key ...] timeout` command. Redis `BZPOPMIN key [key ...] timeout` command. ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ClientGetName returns the name of the connection. ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ClientSetName assigns a name to the connection. ( T) ClientUnblock(ctx context.Context, id int64) *IntCmd ( T) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd Close closes the client, releasing any open resources. It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines. ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadius is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. Redis `GET key` command. It returns redis.Nil error when key does not exist. ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd HMGet returns the values for the specified fields in the hash stored at key. It returns an interface{} to distinguish between empty string and nil value. HMSet is a deprecated version of HSet left for compatibility with Redis 3. ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HSet accepts values in following formats: - HSet("myhash", "key1", "value1", "key2", "value2") - HSet("myhash", []string{"key1", "value1", "key2", "value2"}) - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"}) Note that it requires Redis v4 for multiple field/value pairs support. ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd MSet is like Set but accepts multiple values: - MSet("key1", "value1", "key2", "value2") - MSet([]string{"key1", "value1", "key2", "value2"}) - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"}) MSetNX is like SetNX but accepts multiple values: - MSetNX("key1", "value1", "key2", "value2") - MSetNX([]string{"key1", "value1", "key2", "value2"}) - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"}) ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd (*T) Pipeline() Pipeliner (*T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) (*T) Process(ctx context.Context, cmd Cmder) error ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd Publish posts the message to the channel. ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd Redis `SMEMBERS key` command output as a slice. Redis `SMEMBERS key` command output as a map. ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd Redis `SPOP key` command. Redis `SPOP key count` command. Redis `SRANDMEMBER key` command. Redis `SRANDMEMBER key count` command. ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd ( T) Select(ctx context.Context, index int) *StatusCmd Redis `SET key value [expiration]` command. Use expiration for `SETEX`-like behavior. Zero expiration means the key has no expiration time. ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd ( T) String() string ( T) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( T) Sync(ctx context.Context) ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. (*T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd Redis `ZADD key score member [score member ...]` command. Redis `ZADD key CH score member [score member ...]` command. Redis `ZADD key NX score member [score member ...]` command. Redis `ZADD key NX CH score member [score member ...]` command. Redis `ZADD key XX score member [score member ...]` command. Redis `ZADD key XX CH score member [score member ...]` command. ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd Redis `ZADD key INCR score member` command. ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd Redis `ZADD key NX INCR score member` command. Redis `ZADD key XX INCR score member` command. ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *T : Cmdable *T : StatefulCmdable T : expvar.Var T : fmt.Stringer T : io.Closer func (*Client).Conn(ctx context.Context) *Conn
( T) Get(string) string github.com/go-git/go-git/v5/plumbing/format/config.Options go.opentelemetry.io/otel/api/propagation.HTTPSupplier (interface) google.golang.org/api/internal/gensupport.URLParams net/http.Header net/textproto.MIMEHeader net/url.Values reflect.StructTag
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (time.Duration, error) (*T) SetErr(e error) (*T) String() string (*T) Val() time.Duration *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewDurationCmd(ctx context.Context, precision time.Duration, args ...interface{}) *DurationCmd func NewDurationResult(val time.Duration, err error) *DurationCmd func Cmdable.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func Cmdable.PTTL(ctx context.Context, key string) *DurationCmd func Cmdable.TTL(ctx context.Context, key string) *DurationCmd func Pipeliner.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func Pipeliner.PTTL(ctx context.Context, key string) *DurationCmd func Pipeliner.TTL(ctx context.Context, key string) *DurationCmd func StatefulCmdable.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func StatefulCmdable.PTTL(ctx context.Context, key string) *DurationCmd func StatefulCmdable.TTL(ctx context.Context, key string) *DurationCmd func UniversalClient.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func UniversalClient.PTTL(ctx context.Context, key string) *DurationCmd func UniversalClient.TTL(ctx context.Context, key string) *DurationCmd
( T) Error() builtin.string RedisError is a no-op function but serves to distinguish types that are Redis errors from ordinary errors: a type is a Redis error if it has a RedisError method. github.com/go-redis/redis/v8/internal/proto.RedisError T : error
FailoverOptions are used to configure a failover client and should be passed to NewFailoverClient. DB int DialTimeout time.Duration Dialer func(ctx context.Context, network, addr string) (net.Conn, error) IdleCheckFrequency time.Duration IdleTimeout time.Duration The master name. MaxConnAge time.Duration MaxRetries int MaxRetryBackoff time.Duration MinIdleConns int MinRetryBackoff time.Duration OnConnect func(ctx context.Context, cn *Conn) error Password string PoolSize int PoolTimeout time.Duration ReadTimeout time.Duration Allows routing read-only commands to the closest master or slave node. This option only works with NewFailoverClusterClient. Allows routing read-only commands to the random master or slave node. This option only works with NewFailoverClusterClient. A seed list of host:port addresses of sentinel nodes. Sentinel password from "requirepass <password>" (if enabled) in Sentinel configuration Route all commands to slave read-only nodes. TLSConfig *tls.Config Username string WriteTimeout time.Duration func (*UniversalOptions).Failover() *FailoverOptions func NewFailoverClient(failoverOpt *FailoverOptions) *Client func NewFailoverClusterClient(failoverOpt *FailoverOptions) *ClusterClient
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (float64, error) (*T) SetErr(e error) (*T) String() string (*T) Val() float64 *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewFloatCmd(ctx context.Context, args ...interface{}) *FloatCmd func NewFloatResult(val float64, err error) *FloatCmd func Cmdable.GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd func Cmdable.HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd func Cmdable.IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd func Cmdable.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func Cmdable.ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd func Cmdable.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func Cmdable.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd func Cmdable.ZScore(ctx context.Context, key, member string) *FloatCmd func Pipeliner.GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd func Pipeliner.HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd func Pipeliner.IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd func Pipeliner.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func Pipeliner.ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd func Pipeliner.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func Pipeliner.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd func Pipeliner.ZScore(ctx context.Context, key, member string) *FloatCmd func StatefulCmdable.GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd func StatefulCmdable.HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd func StatefulCmdable.IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd func StatefulCmdable.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func StatefulCmdable.ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd func StatefulCmdable.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func StatefulCmdable.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd func StatefulCmdable.ZScore(ctx context.Context, key, member string) *FloatCmd func UniversalClient.GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd func UniversalClient.HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd func UniversalClient.IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd func UniversalClient.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func UniversalClient.ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd func UniversalClient.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func UniversalClient.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd func UniversalClient.ZScore(ctx context.Context, key, member string) *FloatCmd
GeoLocation is used with GeoAdd to add geospatial location. Dist float64 GeoHash int64 Latitude float64 Longitude float64 Name string func (*GeoLocationCmd).Result() ([]GeoLocation, error) func (*GeoLocationCmd).Val() []GeoLocation func NewGeoLocationCmdResult(val []GeoLocation, err error) *GeoLocationCmd func Cmdable.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func Pipeliner.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func StatefulCmdable.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func UniversalClient.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]GeoLocation, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []GeoLocation *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewGeoLocationCmd(ctx context.Context, q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd func NewGeoLocationCmdResult(val []GeoLocation, err error) *GeoLocationCmd func Cmdable.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func Cmdable.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd func Pipeliner.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func Pipeliner.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd func StatefulCmdable.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func StatefulCmdable.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd func UniversalClient.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func UniversalClient.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd
Latitude float64 Longitude float64 func (*GeoPosCmd).Result() ([]*GeoPos, error) func (*GeoPosCmd).Val() []*GeoPos func NewGeoPosCmdResult(val []*GeoPos, err error) *GeoPosCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]*GeoPos, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []*GeoPos *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewGeoPosCmd(ctx context.Context, args ...interface{}) *GeoPosCmd func NewGeoPosCmdResult(val []*GeoPos, err error) *GeoPosCmd func Cmdable.GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd func Pipeliner.GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd func StatefulCmdable.GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd func UniversalClient.GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd
GeoRadiusQuery is used with GeoRadius to query geospatial index. Count int Radius float64 Can be ASC or DESC. Default is no sort order. Store string StoreDist string Can be m, km, ft, or mi. Default is km. WithCoord bool WithDist bool WithGeoHash bool func NewGeoLocationCmd(ctx context.Context, q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd func Cmdable.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func Cmdable.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd func Cmdable.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func Cmdable.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd func Pipeliner.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func Pipeliner.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd func Pipeliner.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func Pipeliner.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd func StatefulCmdable.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func StatefulCmdable.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd func StatefulCmdable.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func StatefulCmdable.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd func UniversalClient.GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd func UniversalClient.GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd func UniversalClient.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func UniversalClient.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd
( T) AfterProcess(ctx context.Context, cmd Cmder) error ( T) AfterProcessPipeline(ctx context.Context, cmds []Cmder) error ( T) BeforeProcess(ctx context.Context, cmd Cmder) (context.Context, error) ( T) BeforeProcessPipeline(ctx context.Context, cmds []Cmder) (context.Context, error) func UniversalClient.AddHook(Hook)
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (int64, error) (*T) SetErr(e error) (*T) String() string (*T) Uint64() (uint64, error) (*T) Val() int64 *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewIntCmd(ctx context.Context, args ...interface{}) *IntCmd func NewIntResult(val int64, err error) *IntCmd func (*ClusterClient).DBSize(ctx context.Context) *IntCmd func Cmdable.Append(ctx context.Context, key, value string) *IntCmd func Cmdable.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd func Cmdable.BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd func Cmdable.BitOpNot(ctx context.Context, destKey string, key string) *IntCmd func Cmdable.BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd func Cmdable.BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd func Cmdable.BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd func Cmdable.ClientID(ctx context.Context) *IntCmd func Cmdable.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func Cmdable.ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd func Cmdable.ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd func Cmdable.ClusterKeySlot(ctx context.Context, key string) *IntCmd func Cmdable.DBSize(ctx context.Context) *IntCmd func Cmdable.Decr(ctx context.Context, key string) *IntCmd func Cmdable.DecrBy(ctx context.Context, key string, decrement int64) *IntCmd func Cmdable.Del(ctx context.Context, keys ...string) *IntCmd func Cmdable.Exists(ctx context.Context, keys ...string) *IntCmd func Cmdable.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func Cmdable.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func Cmdable.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd func Cmdable.GetBit(ctx context.Context, key string, offset int64) *IntCmd func Cmdable.HDel(ctx context.Context, key string, fields ...string) *IntCmd func Cmdable.HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd func Cmdable.HLen(ctx context.Context, key string) *IntCmd func Cmdable.HSet(ctx context.Context, key string, values ...interface{}) *IntCmd func Cmdable.Incr(ctx context.Context, key string) *IntCmd func Cmdable.IncrBy(ctx context.Context, key string, value int64) *IntCmd func Cmdable.LastSave(ctx context.Context) *IntCmd func Cmdable.LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd func Cmdable.LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd func Cmdable.LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd func Cmdable.LLen(ctx context.Context, key string) *IntCmd func Cmdable.LPush(ctx context.Context, key string, values ...interface{}) *IntCmd func Cmdable.LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func Cmdable.LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd func Cmdable.MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd func Cmdable.ObjectRefCount(ctx context.Context, key string) *IntCmd func Cmdable.PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd func Cmdable.PFCount(ctx context.Context, keys ...string) *IntCmd func Cmdable.Publish(ctx context.Context, channel string, message interface{}) *IntCmd func Cmdable.PubSubNumPat(ctx context.Context) *IntCmd func Cmdable.RPush(ctx context.Context, key string, values ...interface{}) *IntCmd func Cmdable.RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func Cmdable.SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd func Cmdable.SCard(ctx context.Context, key string) *IntCmd func Cmdable.SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func Cmdable.SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd func Cmdable.SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd func Cmdable.SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd func Cmdable.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd func Cmdable.SRem(ctx context.Context, key string, members ...interface{}) *IntCmd func Cmdable.StrLen(ctx context.Context, key string) *IntCmd func Cmdable.SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd func Cmdable.Touch(ctx context.Context, keys ...string) *IntCmd func Cmdable.Unlink(ctx context.Context, keys ...string) *IntCmd func Cmdable.XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd func Cmdable.XDel(ctx context.Context, stream string, ids ...string) *IntCmd func Cmdable.XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd func Cmdable.XGroupDestroy(ctx context.Context, stream, group string) *IntCmd func Cmdable.XLen(ctx context.Context, stream string) *IntCmd func Cmdable.XTrim(ctx context.Context, key string, maxLen int64) *IntCmd func Cmdable.XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd func Cmdable.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZCard(ctx context.Context, key string) *IntCmd func Cmdable.ZCount(ctx context.Context, key, min, max string) *IntCmd func Cmdable.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func Cmdable.ZLexCount(ctx context.Context, key, min, max string) *IntCmd func Cmdable.ZRank(ctx context.Context, key, member string) *IntCmd func Cmdable.ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd func Cmdable.ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd func Cmdable.ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd func Cmdable.ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd func Cmdable.ZRevRank(ctx context.Context, key, member string) *IntCmd func Cmdable.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func Pipeliner.Append(ctx context.Context, key, value string) *IntCmd func Pipeliner.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd func Pipeliner.BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd func Pipeliner.BitOpNot(ctx context.Context, destKey string, key string) *IntCmd func Pipeliner.BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd func Pipeliner.BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd func Pipeliner.BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd func Pipeliner.ClientID(ctx context.Context) *IntCmd func Pipeliner.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func Pipeliner.ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd func Pipeliner.ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd func Pipeliner.ClusterKeySlot(ctx context.Context, key string) *IntCmd func Pipeliner.DBSize(ctx context.Context) *IntCmd func Pipeliner.Decr(ctx context.Context, key string) *IntCmd func Pipeliner.DecrBy(ctx context.Context, key string, decrement int64) *IntCmd func Pipeliner.Del(ctx context.Context, keys ...string) *IntCmd func Pipeliner.Exists(ctx context.Context, keys ...string) *IntCmd func Pipeliner.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func Pipeliner.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func Pipeliner.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd func Pipeliner.GetBit(ctx context.Context, key string, offset int64) *IntCmd func Pipeliner.HDel(ctx context.Context, key string, fields ...string) *IntCmd func Pipeliner.HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd func Pipeliner.HLen(ctx context.Context, key string) *IntCmd func Pipeliner.HSet(ctx context.Context, key string, values ...interface{}) *IntCmd func Pipeliner.Incr(ctx context.Context, key string) *IntCmd func Pipeliner.IncrBy(ctx context.Context, key string, value int64) *IntCmd func Pipeliner.LastSave(ctx context.Context) *IntCmd func Pipeliner.LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd func Pipeliner.LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd func Pipeliner.LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd func Pipeliner.LLen(ctx context.Context, key string) *IntCmd func Pipeliner.LPush(ctx context.Context, key string, values ...interface{}) *IntCmd func Pipeliner.LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func Pipeliner.LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd func Pipeliner.MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd func Pipeliner.ObjectRefCount(ctx context.Context, key string) *IntCmd func Pipeliner.PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd func Pipeliner.PFCount(ctx context.Context, keys ...string) *IntCmd func Pipeliner.Publish(ctx context.Context, channel string, message interface{}) *IntCmd func Pipeliner.PubSubNumPat(ctx context.Context) *IntCmd func Pipeliner.RPush(ctx context.Context, key string, values ...interface{}) *IntCmd func Pipeliner.RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func Pipeliner.SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd func Pipeliner.SCard(ctx context.Context, key string) *IntCmd func Pipeliner.SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func Pipeliner.SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd func Pipeliner.SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd func Pipeliner.SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd func Pipeliner.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd func Pipeliner.SRem(ctx context.Context, key string, members ...interface{}) *IntCmd func Pipeliner.StrLen(ctx context.Context, key string) *IntCmd func Pipeliner.SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd func Pipeliner.Touch(ctx context.Context, keys ...string) *IntCmd func Pipeliner.Unlink(ctx context.Context, keys ...string) *IntCmd func Pipeliner.XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd func Pipeliner.XDel(ctx context.Context, stream string, ids ...string) *IntCmd func Pipeliner.XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd func Pipeliner.XGroupDestroy(ctx context.Context, stream, group string) *IntCmd func Pipeliner.XLen(ctx context.Context, stream string) *IntCmd func Pipeliner.XTrim(ctx context.Context, key string, maxLen int64) *IntCmd func Pipeliner.XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd func Pipeliner.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZCard(ctx context.Context, key string) *IntCmd func Pipeliner.ZCount(ctx context.Context, key, min, max string) *IntCmd func Pipeliner.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func Pipeliner.ZLexCount(ctx context.Context, key, min, max string) *IntCmd func Pipeliner.ZRank(ctx context.Context, key, member string) *IntCmd func Pipeliner.ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd func Pipeliner.ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd func Pipeliner.ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd func Pipeliner.ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd func Pipeliner.ZRevRank(ctx context.Context, key, member string) *IntCmd func Pipeliner.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func (*SentinelClient).Reset(ctx context.Context, pattern string) *IntCmd func StatefulCmdable.Append(ctx context.Context, key, value string) *IntCmd func StatefulCmdable.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd func StatefulCmdable.BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd func StatefulCmdable.BitOpNot(ctx context.Context, destKey string, key string) *IntCmd func StatefulCmdable.BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd func StatefulCmdable.BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd func StatefulCmdable.BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd func StatefulCmdable.ClientID(ctx context.Context) *IntCmd func StatefulCmdable.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func StatefulCmdable.ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd func StatefulCmdable.ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd func StatefulCmdable.ClusterKeySlot(ctx context.Context, key string) *IntCmd func StatefulCmdable.DBSize(ctx context.Context) *IntCmd func StatefulCmdable.Decr(ctx context.Context, key string) *IntCmd func StatefulCmdable.DecrBy(ctx context.Context, key string, decrement int64) *IntCmd func StatefulCmdable.Del(ctx context.Context, keys ...string) *IntCmd func StatefulCmdable.Exists(ctx context.Context, keys ...string) *IntCmd func StatefulCmdable.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func StatefulCmdable.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func StatefulCmdable.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd func StatefulCmdable.GetBit(ctx context.Context, key string, offset int64) *IntCmd func StatefulCmdable.HDel(ctx context.Context, key string, fields ...string) *IntCmd func StatefulCmdable.HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd func StatefulCmdable.HLen(ctx context.Context, key string) *IntCmd func StatefulCmdable.HSet(ctx context.Context, key string, values ...interface{}) *IntCmd func StatefulCmdable.Incr(ctx context.Context, key string) *IntCmd func StatefulCmdable.IncrBy(ctx context.Context, key string, value int64) *IntCmd func StatefulCmdable.LastSave(ctx context.Context) *IntCmd func StatefulCmdable.LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd func StatefulCmdable.LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd func StatefulCmdable.LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd func StatefulCmdable.LLen(ctx context.Context, key string) *IntCmd func StatefulCmdable.LPush(ctx context.Context, key string, values ...interface{}) *IntCmd func StatefulCmdable.LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func StatefulCmdable.LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd func StatefulCmdable.MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd func StatefulCmdable.ObjectRefCount(ctx context.Context, key string) *IntCmd func StatefulCmdable.PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd func StatefulCmdable.PFCount(ctx context.Context, keys ...string) *IntCmd func StatefulCmdable.Publish(ctx context.Context, channel string, message interface{}) *IntCmd func StatefulCmdable.PubSubNumPat(ctx context.Context) *IntCmd func StatefulCmdable.RPush(ctx context.Context, key string, values ...interface{}) *IntCmd func StatefulCmdable.RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func StatefulCmdable.SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd func StatefulCmdable.SCard(ctx context.Context, key string) *IntCmd func StatefulCmdable.SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func StatefulCmdable.SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd func StatefulCmdable.SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd func StatefulCmdable.SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd func StatefulCmdable.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd func StatefulCmdable.SRem(ctx context.Context, key string, members ...interface{}) *IntCmd func StatefulCmdable.StrLen(ctx context.Context, key string) *IntCmd func StatefulCmdable.SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd func StatefulCmdable.Touch(ctx context.Context, keys ...string) *IntCmd func StatefulCmdable.Unlink(ctx context.Context, keys ...string) *IntCmd func StatefulCmdable.XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd func StatefulCmdable.XDel(ctx context.Context, stream string, ids ...string) *IntCmd func StatefulCmdable.XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd func StatefulCmdable.XGroupDestroy(ctx context.Context, stream, group string) *IntCmd func StatefulCmdable.XLen(ctx context.Context, stream string) *IntCmd func StatefulCmdable.XTrim(ctx context.Context, key string, maxLen int64) *IntCmd func StatefulCmdable.XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd func StatefulCmdable.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZCard(ctx context.Context, key string) *IntCmd func StatefulCmdable.ZCount(ctx context.Context, key, min, max string) *IntCmd func StatefulCmdable.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func StatefulCmdable.ZLexCount(ctx context.Context, key, min, max string) *IntCmd func StatefulCmdable.ZRank(ctx context.Context, key, member string) *IntCmd func StatefulCmdable.ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd func StatefulCmdable.ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd func StatefulCmdable.ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd func StatefulCmdable.ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd func StatefulCmdable.ZRevRank(ctx context.Context, key, member string) *IntCmd func StatefulCmdable.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func UniversalClient.Append(ctx context.Context, key, value string) *IntCmd func UniversalClient.BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd func UniversalClient.BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd func UniversalClient.BitOpNot(ctx context.Context, destKey string, key string) *IntCmd func UniversalClient.BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd func UniversalClient.BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd func UniversalClient.BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd func UniversalClient.ClientID(ctx context.Context) *IntCmd func UniversalClient.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func UniversalClient.ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd func UniversalClient.ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd func UniversalClient.ClusterKeySlot(ctx context.Context, key string) *IntCmd func UniversalClient.DBSize(ctx context.Context) *IntCmd func UniversalClient.Decr(ctx context.Context, key string) *IntCmd func UniversalClient.DecrBy(ctx context.Context, key string, decrement int64) *IntCmd func UniversalClient.Del(ctx context.Context, keys ...string) *IntCmd func UniversalClient.Exists(ctx context.Context, keys ...string) *IntCmd func UniversalClient.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func UniversalClient.GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd func UniversalClient.GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd func UniversalClient.GetBit(ctx context.Context, key string, offset int64) *IntCmd func UniversalClient.HDel(ctx context.Context, key string, fields ...string) *IntCmd func UniversalClient.HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd func UniversalClient.HLen(ctx context.Context, key string) *IntCmd func UniversalClient.HSet(ctx context.Context, key string, values ...interface{}) *IntCmd func UniversalClient.Incr(ctx context.Context, key string) *IntCmd func UniversalClient.IncrBy(ctx context.Context, key string, value int64) *IntCmd func UniversalClient.LastSave(ctx context.Context) *IntCmd func UniversalClient.LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd func UniversalClient.LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd func UniversalClient.LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd func UniversalClient.LLen(ctx context.Context, key string) *IntCmd func UniversalClient.LPush(ctx context.Context, key string, values ...interface{}) *IntCmd func UniversalClient.LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func UniversalClient.LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd func UniversalClient.MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd func UniversalClient.ObjectRefCount(ctx context.Context, key string) *IntCmd func UniversalClient.PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd func UniversalClient.PFCount(ctx context.Context, keys ...string) *IntCmd func UniversalClient.Publish(ctx context.Context, channel string, message interface{}) *IntCmd func UniversalClient.PubSubNumPat(ctx context.Context) *IntCmd func UniversalClient.RPush(ctx context.Context, key string, values ...interface{}) *IntCmd func UniversalClient.RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd func UniversalClient.SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd func UniversalClient.SCard(ctx context.Context, key string) *IntCmd func UniversalClient.SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func UniversalClient.SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd func UniversalClient.SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd func UniversalClient.SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd func UniversalClient.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd func UniversalClient.SRem(ctx context.Context, key string, members ...interface{}) *IntCmd func UniversalClient.StrLen(ctx context.Context, key string) *IntCmd func UniversalClient.SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd func UniversalClient.Touch(ctx context.Context, keys ...string) *IntCmd func UniversalClient.Unlink(ctx context.Context, keys ...string) *IntCmd func UniversalClient.XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd func UniversalClient.XDel(ctx context.Context, stream string, ids ...string) *IntCmd func UniversalClient.XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd func UniversalClient.XGroupDestroy(ctx context.Context, stream, group string) *IntCmd func UniversalClient.XLen(ctx context.Context, stream string) *IntCmd func UniversalClient.XTrim(ctx context.Context, key string, maxLen int64) *IntCmd func UniversalClient.XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd func UniversalClient.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZCard(ctx context.Context, key string) *IntCmd func UniversalClient.ZCount(ctx context.Context, key, min, max string) *IntCmd func UniversalClient.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func UniversalClient.ZLexCount(ctx context.Context, key, min, max string) *IntCmd func UniversalClient.ZRank(ctx context.Context, key, member string) *IntCmd func UniversalClient.ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd func UniversalClient.ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd func UniversalClient.ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd func UniversalClient.ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd func UniversalClient.ZRevRank(ctx context.Context, key, member string) *IntCmd func UniversalClient.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]int64, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []int64 *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewIntSliceCmd(ctx context.Context, args ...interface{}) *IntSliceCmd func Cmdable.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd func Pipeliner.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd func StatefulCmdable.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd func UniversalClient.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd
Limiter is the interface of a rate limiter or a circuit breaker. Allow returns nil if operation is allowed or an error otherwise. If operation is allowed client must ReportResult of the operation whether it is a success or a failure. ReportResult reports the result of the previously allowed operation. nil indicates a success, non-nil error usually indicates a failure.
Message received as result of a PUBLISH command issued by another client. Channel string Pattern string Payload string PayloadSlice []string (*T) String() string *T : expvar.Var *T : fmt.Stringer func (*PubSub).Channel() <-chan *Message func (*PubSub).ChannelSize(size int) <-chan *Message func (*PubSub).ReceiveMessage(ctx context.Context) (*Message, error)
host:port address. Database to be selected after connecting to the server. Dial timeout for establishing new connections. Default is 5 seconds. Dialer creates new network connection and has priority over Network and Addr options. Frequency of idle checks made by idle connections reaper. Default is 1 minute. -1 disables idle connections reaper, but idle connections are still discarded by the client if IdleTimeout is set. Amount of time after which client closes idle connections. Should be less than server's timeout. Default is 5 minutes. -1 disables idle timeout check. Limiter interface used to implemented circuit breaker or rate limiter. Connection age at which client retires (closes) the connection. Default is to not close aged connections. Maximum number of retries before giving up. Default is 3 retries. Maximum backoff between each retry. Default is 512 milliseconds; -1 disables backoff. Minimum number of idle connections which is useful when establishing new connection is slow. Minimum backoff between each retry. Default is 8 milliseconds; -1 disables backoff. The network type, either tcp or unix. Default is tcp. Hook that is called when new connection is established. Optional password. Must match the password specified in the requirepass server configuration option (if connecting to a Redis 5.0 instance, or lower), or the User Password when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. Maximum number of socket connections. Default is 10 connections per every CPU as reported by runtime.NumCPU. Amount of time client waits for connection if all connections are busy before returning an error. Default is ReadTimeout + 1 second. Timeout for socket reads. If reached, commands will fail with a timeout instead of blocking. Use value -1 for no timeout and 0 for default. Default is 3 seconds. TLS Config to use. When set TLS will be negotiated. Use the specified Username to authenticate the current connection with one of the connections defined in the ACL list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. Timeout for socket writes. If reached, commands will fail with a timeout instead of blocking. Default is ReadTimeout. func ParseURL(redisURL string) (*Options, error) func (*Client).Options() *Options func (*UniversalOptions).Simple() *Options func NewClient(opt *Options) *Client func NewSentinelClient(opt *Options) *SentinelClient
Pipeline implements pipelining as described in http://redis.io/topics/pipelining. It's safe for concurrent use by multiple goroutines. ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) Auth(ctx context.Context, password string) *StatusCmd Perform an AUTH command, using the given user and pass. Should be used to authenticate the current connection with one of the connections defined in the ACL list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd Redis `BZPOPMAX key [key ...] timeout` command. Redis `BZPOPMIN key [key ...] timeout` command. ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ClientGetName returns the name of the connection. ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ClientSetName assigns a name to the connection. ( T) ClientUnblock(ctx context.Context, id int64) *IntCmd ( T) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd Close closes the pipeline, releasing any open resources. ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd Discard resets the pipeline and discards queued commands. (*T) Do(ctx context.Context, args ...interface{}) *Cmd ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd Exec executes all previously queued commands using one client-server roundtrip. Exec always returns list of commands and error of the first failed command if any. ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadius is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. Redis `GET key` command. It returns redis.Nil error when key does not exist. ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd HMGet returns the values for the specified fields in the hash stored at key. It returns an interface{} to distinguish between empty string and nil value. HMSet is a deprecated version of HSet left for compatibility with Redis 3. ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HSet accepts values in following formats: - HSet("myhash", "key1", "value1", "key2", "value2") - HSet("myhash", []string{"key1", "value1", "key2", "value2"}) - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"}) Note that it requires Redis v4 for multiple field/value pairs support. ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd MSet is like Set but accepts multiple values: - MSet("key1", "value1", "key2", "value2") - MSet([]string{"key1", "value1", "key2", "value2"}) - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"}) MSetNX is like SetNX but accepts multiple values: - MSetNX("key1", "value1", "key2", "value2") - MSetNX([]string{"key1", "value1", "key2", "value2"}) - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"}) ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd (*T) Pipeline() Pipeliner (*T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) Process queues the cmd for later execution. ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd Publish posts the message to the channel. ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd Redis `SMEMBERS key` command output as a slice. Redis `SMEMBERS key` command output as a map. ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd Redis `SPOP key` command. Redis `SPOP key count` command. Redis `SRANDMEMBER key` command. Redis `SRANDMEMBER key count` command. ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd ( T) Select(ctx context.Context, index int) *StatusCmd Redis `SET key value [expiration]` command. Use expiration for `SETEX`-like behavior. Zero expiration means the key has no expiration time. ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd ( T) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( T) Sync(ctx context.Context) ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd (*T) TxPipeline() Pipeliner (*T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd Redis `ZADD key score member [score member ...]` command. Redis `ZADD key CH score member [score member ...]` command. Redis `ZADD key NX score member [score member ...]` command. Redis `ZADD key NX CH score member [score member ...]` command. Redis `ZADD key XX score member [score member ...]` command. Redis `ZADD key XX CH score member [score member ...]` command. ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd Redis `ZADD key INCR score member` command. ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd Redis `ZADD key NX INCR score member` command. Redis `ZADD key XX INCR score member` command. ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *T : Cmdable *T : Pipeliner *T : StatefulCmdable *T : io.Closer
Pipeliner is an mechanism to realise Redis Pipeline technique. Pipelining is a technique to extremely speed up processing by packing operations to batches, send them at once to Redis and read a replies in a singe step. See https://redis.io/topics/pipelining Pay attention, that Pipeline is not a transaction, so you can get unexpected results in case of big pipelines and small read/write timeouts. Redis client has retransmission logic in case of timeouts, pipeline can be retransmitted and commands can be executed more then once. To avoid this: it is good idea to use reasonable bigger read/write timeouts depends of your batch size and/or use TxPipeline. ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) Auth(ctx context.Context, password string) *StatusCmd ( T) AuthACL(ctx context.Context, username, password string) *StatusCmd ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( T) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( T) ClientGetName(ctx context.Context) *StringCmd ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( T) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( T) ClientSetName(ctx context.Context, name string) *BoolCmd ( T) Close() error ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd ( T) Discard() error ( T) Do(ctx context.Context, args ...interface{}) *Cmd ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exec(ctx context.Context) ([]Cmder, error) ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( T) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( T) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( T) Get(ctx context.Context, key string) *StringCmd ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd ( T) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( T) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd ( T) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( T) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd ( T) Pipeline() Pipeliner ( T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Process(ctx context.Context, cmd Cmder) error ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd ( T) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( T) SMembers(ctx context.Context, key string) *StringSliceCmd ( T) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( T) SPop(ctx context.Context, key string) *StringCmd ( T) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRandMember(ctx context.Context, key string) *StringCmd ( T) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd ( T) Select(ctx context.Context, index int) *StatusCmd ( T) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( T) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( T) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd ( T) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd ( T) TxPipeline() Pipeliner ( T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd ( T) ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( T) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *Pipeline T : Cmdable T : StatefulCmdable T : io.Closer func (*Client).Pipeline() Pipeliner func (*Client).TxPipeline() Pipeliner func (*ClusterClient).Pipeline() Pipeliner func (*ClusterClient).TxPipeline() Pipeliner func Cmdable.Pipeline() Pipeliner func Cmdable.TxPipeline() Pipeliner func (*Conn).Pipeline() Pipeliner func (*Conn).TxPipeline() Pipeliner func (*Pipeline).Pipeline() Pipeliner func (*Pipeline).TxPipeline() Pipeliner func Pipeliner.Pipeline() Pipeliner func Pipeliner.TxPipeline() Pipeliner func (*Ring).Pipeline() Pipeliner func (*Ring).TxPipeline() Pipeliner func StatefulCmdable.Pipeline() Pipeliner func StatefulCmdable.TxPipeline() Pipeliner func (*Tx).Pipeline() Pipeliner func (*Tx).TxPipeline() Pipeliner func UniversalClient.Pipeline() Pipeliner func UniversalClient.TxPipeline() Pipeliner
Pong received as result of a PING command issued by another client. Payload string (*T) String() string *T : expvar.Var *T : fmt.Stringer
// number of times free connection was found in the pool // number of idle connections in the pool // number of times free connection was NOT found in the pool // number of stale connections removed from the pool // number of times a wait timeout occurred // number of total connections in the pool func (*Client).PoolStats() *PoolStats func (*ClusterClient).PoolStats() *PoolStats func (*Ring).PoolStats() *PoolStats
PubSub implements Pub/Sub commands as described in http://redis.io/topics/pubsub. Message receiving is NOT safe for concurrent use by multiple goroutines. PubSub automatically reconnects to Redis Server and resubscribes to the channels in case of network errors. Channel returns a Go channel for concurrently receiving messages. The channel is closed together with the PubSub. If the Go channel is blocked full for 30 seconds the message is dropped. Receive* APIs can not be used after channel is created. go-redis periodically sends ping messages to test connection health and re-subscribes if ping can not not received for 30 seconds. ChannelSize is like Channel, but creates a Go channel with specified buffer size. ChannelWithSubscriptions is like Channel, but message type can be either *Subscription or *Message. Subscription messages can be used to detect reconnections. ChannelWithSubscriptions can not be used together with Channel or ChannelSize. (*T) Close() error PSubscribe the client to the given patterns. It returns empty subscription if there are no patterns. PUnsubscribe the client from the given patterns, or from all of them if none is given. (*T) Ping(ctx context.Context, payload ...string) error Receive returns a message as a Subscription, Message, Pong or error. See PubSub example for details. This is low-level API and in most cases Channel should be used instead. ReceiveMessage returns a Message or error ignoring Subscription and Pong messages. This is low-level API and in most cases Channel should be used instead. ReceiveTimeout acts like Receive but returns an error if message is not received in time. This is low-level API and in most cases Channel should be used instead. (*T) String() string Subscribe the client to the specified channels. It returns empty subscription if there are no channels. Unsubscribe the client from the given channels, or from all of them if none is given. *T : expvar.Var *T : fmt.Stringer *T : io.Closer func (*Client).PSubscribe(ctx context.Context, channels ...string) *PubSub func (*Client).Subscribe(ctx context.Context, channels ...string) *PubSub func (*ClusterClient).PSubscribe(ctx context.Context, channels ...string) *PubSub func (*ClusterClient).Subscribe(ctx context.Context, channels ...string) *PubSub func (*Ring).PSubscribe(ctx context.Context, channels ...string) *PubSub func (*Ring).Subscribe(ctx context.Context, channels ...string) *PubSub func (*SentinelClient).PSubscribe(ctx context.Context, channels ...string) *PubSub func (*SentinelClient).Subscribe(ctx context.Context, channels ...string) *PubSub func UniversalClient.PSubscribe(ctx context.Context, channels ...string) *PubSub func UniversalClient.Subscribe(ctx context.Context, channels ...string) *PubSub
Ring is a Redis client that uses consistent hashing to distribute keys across multiple Redis servers (shards). It's safe for concurrent use by multiple goroutines. Ring monitors the state of each shard and removes dead shards from the ring. When a shard comes online it is added back to the ring. This gives you maximum availability and partition tolerance, but no consistency between different shards or even clients. Each client uses shards that are available to the client and does not do any coordination when shard state is changed. Ring should be used when you need multiple Redis servers for caching and can tolerate losing data when one of the servers dies. Otherwise you should use Redis Cluster. (*T) AddHook(hook Hook) ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd Redis `BZPOPMAX key [key ...] timeout` command. Redis `BZPOPMIN key [key ...] timeout` command. ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ClientGetName returns the name of the connection. ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( T) ClientUnblock(ctx context.Context, id int64) *IntCmd ( T) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd Close closes the ring client, releasing any open resources. It is rare to Close a Ring, as the Ring is meant to be long-lived and shared between many goroutines. ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd (*T) Context() context.Context ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd Do creates a Cmd from the args and processes the cmd. ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ForEachShard concurrently calls the fn on each live shard in the ring. It returns the first error if any. ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadius is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. Redis `GET key` command. It returns redis.Nil error when key does not exist. ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd HMGet returns the values for the specified fields in the hash stored at key. It returns an interface{} to distinguish between empty string and nil value. HMSet is a deprecated version of HSet left for compatibility with Redis 3. ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HSet accepts values in following formats: - HSet("myhash", "key1", "value1", "key2", "value2") - HSet("myhash", []string{"key1", "value1", "key2", "value2"}) - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"}) Note that it requires Redis v4 for multiple field/value pairs support. ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd Len returns the current number of shards in the ring. ( T) MGet(ctx context.Context, keys ...string) *SliceCmd MSet is like Set but accepts multiple values: - MSet("key1", "value1", "key2", "value2") - MSet([]string{"key1", "value1", "key2", "value2"}) - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"}) MSetNX is like SetNX but accepts multiple values: - MSetNX("key1", "value1", "key2", "value2") - MSetNX([]string{"key1", "value1", "key2", "value2"}) - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"}) ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd Options returns read-only Options that were used to create the client. ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd PSubscribe subscribes the client to the given patterns. ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd (*T) Pipeline() Pipeliner (*T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) PoolStats returns accumulated connection pool stats. (*T) Process(ctx context.Context, cmd Cmder) error ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd Publish posts the message to the channel. ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd Redis `SMEMBERS key` command output as a slice. Redis `SMEMBERS key` command output as a map. ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd Redis `SPOP key` command. Redis `SPOP key count` command. Redis `SRANDMEMBER key` command. Redis `SRANDMEMBER key count` command. ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd Redis `SET key value [expiration]` command. Use expiration for `SETEX`-like behavior. Zero expiration means the key has no expiration time. ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd Subscribe subscribes the client to the specified channels. ( T) Sync(ctx context.Context) ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd (*T) TxPipeline() Pipeliner (*T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd (*T) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error (*T) WithContext(ctx context.Context) *Ring ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd Redis `ZADD key score member [score member ...]` command. Redis `ZADD key CH score member [score member ...]` command. Redis `ZADD key NX score member [score member ...]` command. Redis `ZADD key NX CH score member [score member ...]` command. Redis `ZADD key XX score member [score member ...]` command. Redis `ZADD key XX CH score member [score member ...]` command. ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd Redis `ZADD key INCR score member` command. ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd Redis `ZADD key NX INCR score member` command. Redis `ZADD key XX INCR score member` command. ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *T : Cmdable *T : UniversalClient *T : io.Closer func NewRing(opt *RingOptions) *Ring func (*Ring).WithContext(ctx context.Context) *Ring
RingOptions are used to configure a ring client and should be passed to NewRing. Map of name => host:port addresses of ring shards. DB int DialTimeout time.Duration Dialer func(ctx context.Context, network, addr string) (net.Conn, error) Frequency of PING commands sent to check shards availability. Shard is considered down after 3 subsequent failed checks. IdleCheckFrequency time.Duration IdleTimeout time.Duration Limiter Limiter MaxConnAge time.Duration MaxRetries int MaxRetryBackoff time.Duration MinIdleConns int MinRetryBackoff time.Duration NewClient creates a shard client with provided name and options. NewConsistentHash returns a consistent hash that is used to distribute keys across the shards. See https://medium.com/@dgryski/consistent-hashing-algorithmic-tradeoffs-ef6b8e2fcae8 for consistent hashing algorithmic tradeoffs. OnConnect func(ctx context.Context, cn *Conn) error Password string PoolSize int PoolTimeout time.Duration ReadTimeout time.Duration TLSConfig *tls.Config Username string WriteTimeout time.Duration func (*Ring).Options() *RingOptions func NewRing(opt *RingOptions) *Ring
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string Iterator creates a new ScanIterator. (*T) Name() string (*T) Result() (keys []string, cursor uint64, err error) (*T) SetErr(e error) (*T) String() string (*T) Val() (keys []string, cursor uint64) *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewScanCmd(ctx context.Context, process cmdable, args ...interface{}) *ScanCmd func NewScanCmdResult(keys []string, cursor uint64, err error) *ScanCmd func Cmdable.HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func Cmdable.Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd func Cmdable.SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func Cmdable.ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func Pipeliner.HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func Pipeliner.Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd func Pipeliner.SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func Pipeliner.ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func StatefulCmdable.HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func StatefulCmdable.Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd func StatefulCmdable.SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func StatefulCmdable.ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func UniversalClient.HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func UniversalClient.Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd func UniversalClient.SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd func UniversalClient.ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
ScanIterator is used to incrementally iterate over a collection of elements. It's safe for concurrent use by multiple goroutines. Err returns the last iterator error, if any. Next advances the cursor and returns true if more values can be read. Val returns the key/field at the current cursor position. func (*ScanCmd).Iterator() *ScanIterator
(*T) Eval(ctx context.Context, c scripter, keys []string, args ...interface{}) *Cmd (*T) EvalSha(ctx context.Context, c scripter, keys []string, args ...interface{}) *Cmd (*T) Exists(ctx context.Context, c scripter) *BoolSliceCmd (*T) Hash() string (*T) Load(ctx context.Context, c scripter) *StringCmd Run optimistically uses EVALSHA to run the script. If script does not exist it is retried using EVAL. func NewScript(src string) *Script
SentinelClient is a client for a Redis Sentinel. CkQuorum checks if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover. This command should be used in monitoring systems to check if a Sentinel deployment is ok. Close closes the client, releasing any open resources. It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines. (*T) Context() context.Context Failover forces a failover as if the master was not reachable, and without asking for agreement to other Sentinels. FlushConfig forces Sentinel to rewrite its configuration on disk, including the current Sentinel state. (*T) GetMasterAddrByName(ctx context.Context, name string) *StringSliceCmd Master shows the state and info of the specified master. Masters shows a list of monitored masters and their state. Monitor tells the Sentinel to start monitoring a new master with the specified name, ip, port, and quorum. PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription. Ping is used to test if a connection is still alive, or to measure latency. (*T) Process(ctx context.Context, cmd Cmder) error Remove is used in order to remove the specified master: the master will no longer be monitored, and will totally be removed from the internal state of the Sentinel. Reset resets all the masters with matching name. The pattern argument is a glob-style pattern. The reset process clears any previous state in a master (including a failover in progress), and removes every slave and sentinel already discovered and associated with the master. (*T) Sentinels(ctx context.Context, name string) *SliceCmd Set is used in order to change configuration parameters of a specific master. Slaves shows a list of slaves for the specified master and their state. ( T) String() string Subscribe subscribes the client to the specified channels. Channels can be omitted to create empty subscription. (*T) WithContext(ctx context.Context) *SentinelClient T : expvar.Var T : fmt.Stringer T : io.Closer func NewSentinelClient(opt *Options) *SentinelClient func (*SentinelClient).WithContext(ctx context.Context) *SentinelClient
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]interface{}, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []interface{} *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewSliceCmd(ctx context.Context, args ...interface{}) *SliceCmd func NewSliceResult(val []interface{}, err error) *SliceCmd func Cmdable.ConfigGet(ctx context.Context, parameter string) *SliceCmd func Cmdable.HMGet(ctx context.Context, key string, fields ...string) *SliceCmd func Cmdable.MGet(ctx context.Context, keys ...string) *SliceCmd func Cmdable.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd func Pipeliner.ConfigGet(ctx context.Context, parameter string) *SliceCmd func Pipeliner.HMGet(ctx context.Context, key string, fields ...string) *SliceCmd func Pipeliner.MGet(ctx context.Context, keys ...string) *SliceCmd func Pipeliner.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd func (*SentinelClient).Masters(ctx context.Context) *SliceCmd func (*SentinelClient).Sentinels(ctx context.Context, name string) *SliceCmd func (*SentinelClient).Slaves(ctx context.Context, name string) *SliceCmd func StatefulCmdable.ConfigGet(ctx context.Context, parameter string) *SliceCmd func StatefulCmdable.HMGet(ctx context.Context, key string, fields ...string) *SliceCmd func StatefulCmdable.MGet(ctx context.Context, keys ...string) *SliceCmd func StatefulCmdable.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd func UniversalClient.ConfigGet(ctx context.Context, parameter string) *SliceCmd func UniversalClient.HMGet(ctx context.Context, key string, fields ...string) *SliceCmd func UniversalClient.MGet(ctx context.Context, keys ...string) *SliceCmd func UniversalClient.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd
Args []string These are also optional fields emitted only by Redis 4.0 or greater: https://redis.io/commands/slowlog#output-format ClientName string Duration time.Duration ID int64 Time time.Time func (*SlowLogCmd).Result() ([]SlowLog, error) func (*SlowLogCmd).Val() []SlowLog
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]SlowLog, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []SlowLog *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewSlowLogCmd(ctx context.Context, args ...interface{}) *SlowLogCmd
Alpha bool By string Count int64 Get []string Offset int64 Order string func Cmdable.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func Cmdable.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd func Cmdable.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd func Pipeliner.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func Pipeliner.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd func Pipeliner.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd func StatefulCmdable.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func StatefulCmdable.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd func StatefulCmdable.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd func UniversalClient.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func UniversalClient.SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd func UniversalClient.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
( T) Append(ctx context.Context, key, value string) *IntCmd ( T) Auth(ctx context.Context, password string) *StatusCmd ( T) AuthACL(ctx context.Context, username, password string) *StatusCmd ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( T) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( T) ClientGetName(ctx context.Context) *StringCmd ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( T) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( T) ClientSetName(ctx context.Context, name string) *BoolCmd ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( T) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( T) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( T) Get(ctx context.Context, key string) *StringCmd ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd ( T) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( T) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd ( T) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( T) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd ( T) Pipeline() Pipeliner ( T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd ( T) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( T) SMembers(ctx context.Context, key string) *StringSliceCmd ( T) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( T) SPop(ctx context.Context, key string) *StringCmd ( T) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRandMember(ctx context.Context, key string) *StringCmd ( T) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd ( T) Select(ctx context.Context, index int) *StatusCmd ( T) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( T) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( T) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd ( T) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd ( T) TxPipeline() Pipeliner ( T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd ( T) ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( T) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *Conn *Pipeline Pipeliner (interface) *Tx T : Cmdable
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (string, error) (*T) SetErr(e error) (*T) String() string (*T) Val() string *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewStatusCmd(ctx context.Context, args ...interface{}) *StatusCmd func NewStatusResult(val string, err error) *StatusCmd func Cmdable.BgRewriteAOF(ctx context.Context) *StatusCmd func Cmdable.BgSave(ctx context.Context) *StatusCmd func Cmdable.ClientKill(ctx context.Context, ipPort string) *StatusCmd func Cmdable.ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd func Cmdable.ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd func Cmdable.ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd func Cmdable.ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd func Cmdable.ClusterFailover(ctx context.Context) *StatusCmd func Cmdable.ClusterForget(ctx context.Context, nodeID string) *StatusCmd func Cmdable.ClusterMeet(ctx context.Context, host, port string) *StatusCmd func Cmdable.ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd func Cmdable.ClusterResetHard(ctx context.Context) *StatusCmd func Cmdable.ClusterResetSoft(ctx context.Context) *StatusCmd func Cmdable.ClusterSaveConfig(ctx context.Context) *StatusCmd func Cmdable.ConfigResetStat(ctx context.Context) *StatusCmd func Cmdable.ConfigRewrite(ctx context.Context) *StatusCmd func Cmdable.ConfigSet(ctx context.Context, parameter, value string) *StatusCmd func Cmdable.FlushAll(ctx context.Context) *StatusCmd func Cmdable.FlushAllAsync(ctx context.Context) *StatusCmd func Cmdable.FlushDB(ctx context.Context) *StatusCmd func Cmdable.FlushDBAsync(ctx context.Context) *StatusCmd func Cmdable.LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd func Cmdable.LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd func Cmdable.Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd func Cmdable.MSet(ctx context.Context, values ...interface{}) *StatusCmd func Cmdable.PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd func Cmdable.Ping(ctx context.Context) *StatusCmd func Cmdable.Quit(ctx context.Context) *StatusCmd func Cmdable.ReadOnly(ctx context.Context) *StatusCmd func Cmdable.ReadWrite(ctx context.Context) *StatusCmd func Cmdable.Rename(ctx context.Context, key, newkey string) *StatusCmd func Cmdable.Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func Cmdable.RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func Cmdable.Save(ctx context.Context) *StatusCmd func Cmdable.ScriptFlush(ctx context.Context) *StatusCmd func Cmdable.ScriptKill(ctx context.Context) *StatusCmd func Cmdable.Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd func Cmdable.Shutdown(ctx context.Context) *StatusCmd func Cmdable.ShutdownNoSave(ctx context.Context) *StatusCmd func Cmdable.ShutdownSave(ctx context.Context) *StatusCmd func Cmdable.SlaveOf(ctx context.Context, host, port string) *StatusCmd func Cmdable.Type(ctx context.Context, key string) *StatusCmd func Cmdable.XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd func Cmdable.XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd func Cmdable.XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd func Pipeliner.Auth(ctx context.Context, password string) *StatusCmd func Pipeliner.AuthACL(ctx context.Context, username, password string) *StatusCmd func Pipeliner.BgRewriteAOF(ctx context.Context) *StatusCmd func Pipeliner.BgSave(ctx context.Context) *StatusCmd func Pipeliner.ClientKill(ctx context.Context, ipPort string) *StatusCmd func Pipeliner.ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd func Pipeliner.ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd func Pipeliner.ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd func Pipeliner.ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd func Pipeliner.ClusterFailover(ctx context.Context) *StatusCmd func Pipeliner.ClusterForget(ctx context.Context, nodeID string) *StatusCmd func Pipeliner.ClusterMeet(ctx context.Context, host, port string) *StatusCmd func Pipeliner.ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd func Pipeliner.ClusterResetHard(ctx context.Context) *StatusCmd func Pipeliner.ClusterResetSoft(ctx context.Context) *StatusCmd func Pipeliner.ClusterSaveConfig(ctx context.Context) *StatusCmd func Pipeliner.ConfigResetStat(ctx context.Context) *StatusCmd func Pipeliner.ConfigRewrite(ctx context.Context) *StatusCmd func Pipeliner.ConfigSet(ctx context.Context, parameter, value string) *StatusCmd func Pipeliner.FlushAll(ctx context.Context) *StatusCmd func Pipeliner.FlushAllAsync(ctx context.Context) *StatusCmd func Pipeliner.FlushDB(ctx context.Context) *StatusCmd func Pipeliner.FlushDBAsync(ctx context.Context) *StatusCmd func Pipeliner.LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd func Pipeliner.LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd func Pipeliner.Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd func Pipeliner.MSet(ctx context.Context, values ...interface{}) *StatusCmd func Pipeliner.PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd func Pipeliner.Ping(ctx context.Context) *StatusCmd func Pipeliner.Quit(ctx context.Context) *StatusCmd func Pipeliner.ReadOnly(ctx context.Context) *StatusCmd func Pipeliner.ReadWrite(ctx context.Context) *StatusCmd func Pipeliner.Rename(ctx context.Context, key, newkey string) *StatusCmd func Pipeliner.Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func Pipeliner.RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func Pipeliner.Save(ctx context.Context) *StatusCmd func Pipeliner.ScriptFlush(ctx context.Context) *StatusCmd func Pipeliner.ScriptKill(ctx context.Context) *StatusCmd func Pipeliner.Select(ctx context.Context, index int) *StatusCmd func Pipeliner.Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd func Pipeliner.Shutdown(ctx context.Context) *StatusCmd func Pipeliner.ShutdownNoSave(ctx context.Context) *StatusCmd func Pipeliner.ShutdownSave(ctx context.Context) *StatusCmd func Pipeliner.SlaveOf(ctx context.Context, host, port string) *StatusCmd func Pipeliner.SwapDB(ctx context.Context, index1, index2 int) *StatusCmd func Pipeliner.Type(ctx context.Context, key string) *StatusCmd func Pipeliner.XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd func Pipeliner.XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd func Pipeliner.XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd func (*SentinelClient).Failover(ctx context.Context, name string) *StatusCmd func (*SentinelClient).FlushConfig(ctx context.Context) *StatusCmd func StatefulCmdable.Auth(ctx context.Context, password string) *StatusCmd func StatefulCmdable.AuthACL(ctx context.Context, username, password string) *StatusCmd func StatefulCmdable.BgRewriteAOF(ctx context.Context) *StatusCmd func StatefulCmdable.BgSave(ctx context.Context) *StatusCmd func StatefulCmdable.ClientKill(ctx context.Context, ipPort string) *StatusCmd func StatefulCmdable.ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd func StatefulCmdable.ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd func StatefulCmdable.ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd func StatefulCmdable.ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd func StatefulCmdable.ClusterFailover(ctx context.Context) *StatusCmd func StatefulCmdable.ClusterForget(ctx context.Context, nodeID string) *StatusCmd func StatefulCmdable.ClusterMeet(ctx context.Context, host, port string) *StatusCmd func StatefulCmdable.ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd func StatefulCmdable.ClusterResetHard(ctx context.Context) *StatusCmd func StatefulCmdable.ClusterResetSoft(ctx context.Context) *StatusCmd func StatefulCmdable.ClusterSaveConfig(ctx context.Context) *StatusCmd func StatefulCmdable.ConfigResetStat(ctx context.Context) *StatusCmd func StatefulCmdable.ConfigRewrite(ctx context.Context) *StatusCmd func StatefulCmdable.ConfigSet(ctx context.Context, parameter, value string) *StatusCmd func StatefulCmdable.FlushAll(ctx context.Context) *StatusCmd func StatefulCmdable.FlushAllAsync(ctx context.Context) *StatusCmd func StatefulCmdable.FlushDB(ctx context.Context) *StatusCmd func StatefulCmdable.FlushDBAsync(ctx context.Context) *StatusCmd func StatefulCmdable.LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd func StatefulCmdable.LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd func StatefulCmdable.Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd func StatefulCmdable.MSet(ctx context.Context, values ...interface{}) *StatusCmd func StatefulCmdable.PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd func StatefulCmdable.Ping(ctx context.Context) *StatusCmd func StatefulCmdable.Quit(ctx context.Context) *StatusCmd func StatefulCmdable.ReadOnly(ctx context.Context) *StatusCmd func StatefulCmdable.ReadWrite(ctx context.Context) *StatusCmd func StatefulCmdable.Rename(ctx context.Context, key, newkey string) *StatusCmd func StatefulCmdable.Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func StatefulCmdable.RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func StatefulCmdable.Save(ctx context.Context) *StatusCmd func StatefulCmdable.ScriptFlush(ctx context.Context) *StatusCmd func StatefulCmdable.ScriptKill(ctx context.Context) *StatusCmd func StatefulCmdable.Select(ctx context.Context, index int) *StatusCmd func StatefulCmdable.Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd func StatefulCmdable.Shutdown(ctx context.Context) *StatusCmd func StatefulCmdable.ShutdownNoSave(ctx context.Context) *StatusCmd func StatefulCmdable.ShutdownSave(ctx context.Context) *StatusCmd func StatefulCmdable.SlaveOf(ctx context.Context, host, port string) *StatusCmd func StatefulCmdable.SwapDB(ctx context.Context, index1, index2 int) *StatusCmd func StatefulCmdable.Type(ctx context.Context, key string) *StatusCmd func StatefulCmdable.XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd func StatefulCmdable.XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd func StatefulCmdable.XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd func (*Tx).Unwatch(ctx context.Context, keys ...string) *StatusCmd func (*Tx).Watch(ctx context.Context, keys ...string) *StatusCmd func UniversalClient.BgRewriteAOF(ctx context.Context) *StatusCmd func UniversalClient.BgSave(ctx context.Context) *StatusCmd func UniversalClient.ClientKill(ctx context.Context, ipPort string) *StatusCmd func UniversalClient.ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd func UniversalClient.ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd func UniversalClient.ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd func UniversalClient.ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd func UniversalClient.ClusterFailover(ctx context.Context) *StatusCmd func UniversalClient.ClusterForget(ctx context.Context, nodeID string) *StatusCmd func UniversalClient.ClusterMeet(ctx context.Context, host, port string) *StatusCmd func UniversalClient.ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd func UniversalClient.ClusterResetHard(ctx context.Context) *StatusCmd func UniversalClient.ClusterResetSoft(ctx context.Context) *StatusCmd func UniversalClient.ClusterSaveConfig(ctx context.Context) *StatusCmd func UniversalClient.ConfigResetStat(ctx context.Context) *StatusCmd func UniversalClient.ConfigRewrite(ctx context.Context) *StatusCmd func UniversalClient.ConfigSet(ctx context.Context, parameter, value string) *StatusCmd func UniversalClient.FlushAll(ctx context.Context) *StatusCmd func UniversalClient.FlushAllAsync(ctx context.Context) *StatusCmd func UniversalClient.FlushDB(ctx context.Context) *StatusCmd func UniversalClient.FlushDBAsync(ctx context.Context) *StatusCmd func UniversalClient.LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd func UniversalClient.LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd func UniversalClient.Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd func UniversalClient.MSet(ctx context.Context, values ...interface{}) *StatusCmd func UniversalClient.PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd func UniversalClient.Ping(ctx context.Context) *StatusCmd func UniversalClient.Quit(ctx context.Context) *StatusCmd func UniversalClient.ReadOnly(ctx context.Context) *StatusCmd func UniversalClient.ReadWrite(ctx context.Context) *StatusCmd func UniversalClient.Rename(ctx context.Context, key, newkey string) *StatusCmd func UniversalClient.Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func UniversalClient.RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd func UniversalClient.Save(ctx context.Context) *StatusCmd func UniversalClient.ScriptFlush(ctx context.Context) *StatusCmd func UniversalClient.ScriptKill(ctx context.Context) *StatusCmd func UniversalClient.Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd func UniversalClient.Shutdown(ctx context.Context) *StatusCmd func UniversalClient.ShutdownNoSave(ctx context.Context) *StatusCmd func UniversalClient.ShutdownSave(ctx context.Context) *StatusCmd func UniversalClient.SlaveOf(ctx context.Context, host, port string) *StatusCmd func UniversalClient.Type(ctx context.Context, key string) *StatusCmd func UniversalClient.XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd func UniversalClient.XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd func UniversalClient.XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd
(*T) Args() []interface{} (*T) Bytes() ([]byte, error) (*T) Err() error (*T) Float32() (float32, error) (*T) Float64() (float64, error) (*T) FullName() string (*T) Int() (int, error) (*T) Int64() (int64, error) (*T) Name() string (*T) Result() (string, error) (*T) Scan(val interface{}) error (*T) SetErr(e error) (*T) String() string (*T) Time() (time.Time, error) (*T) Uint64() (uint64, error) (*T) Val() string *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : database/sql.Scanner *T : expvar.Var *T : fmt.Stringer func NewStringCmd(ctx context.Context, args ...interface{}) *StringCmd func NewStringResult(val string, err error) *StringCmd func Cmdable.BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd func Cmdable.ClientGetName(ctx context.Context) *StringCmd func Cmdable.ClientList(ctx context.Context) *StringCmd func Cmdable.ClusterInfo(ctx context.Context) *StringCmd func Cmdable.ClusterNodes(ctx context.Context) *StringCmd func Cmdable.DebugObject(ctx context.Context, key string) *StringCmd func Cmdable.Dump(ctx context.Context, key string) *StringCmd func Cmdable.Echo(ctx context.Context, message interface{}) *StringCmd func Cmdable.Get(ctx context.Context, key string) *StringCmd func Cmdable.GetRange(ctx context.Context, key string, start, end int64) *StringCmd func Cmdable.GetSet(ctx context.Context, key string, value interface{}) *StringCmd func Cmdable.HGet(ctx context.Context, key, field string) *StringCmd func Cmdable.Info(ctx context.Context, section ...string) *StringCmd func Cmdable.LIndex(ctx context.Context, key string, index int64) *StringCmd func Cmdable.LPop(ctx context.Context, key string) *StringCmd func Cmdable.ObjectEncoding(ctx context.Context, key string) *StringCmd func Cmdable.RandomKey(ctx context.Context) *StringCmd func Cmdable.RPop(ctx context.Context, key string) *StringCmd func Cmdable.RPopLPush(ctx context.Context, source, destination string) *StringCmd func Cmdable.ScriptLoad(ctx context.Context, script string) *StringCmd func Cmdable.SPop(ctx context.Context, key string) *StringCmd func Cmdable.SRandMember(ctx context.Context, key string) *StringCmd func Cmdable.XAdd(ctx context.Context, a *XAddArgs) *StringCmd func Pipeliner.BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd func Pipeliner.ClientGetName(ctx context.Context) *StringCmd func Pipeliner.ClientList(ctx context.Context) *StringCmd func Pipeliner.ClusterInfo(ctx context.Context) *StringCmd func Pipeliner.ClusterNodes(ctx context.Context) *StringCmd func Pipeliner.DebugObject(ctx context.Context, key string) *StringCmd func Pipeliner.Dump(ctx context.Context, key string) *StringCmd func Pipeliner.Echo(ctx context.Context, message interface{}) *StringCmd func Pipeliner.Get(ctx context.Context, key string) *StringCmd func Pipeliner.GetRange(ctx context.Context, key string, start, end int64) *StringCmd func Pipeliner.GetSet(ctx context.Context, key string, value interface{}) *StringCmd func Pipeliner.HGet(ctx context.Context, key, field string) *StringCmd func Pipeliner.Info(ctx context.Context, section ...string) *StringCmd func Pipeliner.LIndex(ctx context.Context, key string, index int64) *StringCmd func Pipeliner.LPop(ctx context.Context, key string) *StringCmd func Pipeliner.ObjectEncoding(ctx context.Context, key string) *StringCmd func Pipeliner.RandomKey(ctx context.Context) *StringCmd func Pipeliner.RPop(ctx context.Context, key string) *StringCmd func Pipeliner.RPopLPush(ctx context.Context, source, destination string) *StringCmd func Pipeliner.ScriptLoad(ctx context.Context, script string) *StringCmd func Pipeliner.SPop(ctx context.Context, key string) *StringCmd func Pipeliner.SRandMember(ctx context.Context, key string) *StringCmd func Pipeliner.XAdd(ctx context.Context, a *XAddArgs) *StringCmd func (*Script).Load(ctx context.Context, c scripter) *StringCmd func (*SentinelClient).CkQuorum(ctx context.Context, name string) *StringCmd func (*SentinelClient).Monitor(ctx context.Context, name, ip, port, quorum string) *StringCmd func (*SentinelClient).Ping(ctx context.Context) *StringCmd func (*SentinelClient).Remove(ctx context.Context, name string) *StringCmd func (*SentinelClient).Set(ctx context.Context, name, option, value string) *StringCmd func StatefulCmdable.BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd func StatefulCmdable.ClientGetName(ctx context.Context) *StringCmd func StatefulCmdable.ClientList(ctx context.Context) *StringCmd func StatefulCmdable.ClusterInfo(ctx context.Context) *StringCmd func StatefulCmdable.ClusterNodes(ctx context.Context) *StringCmd func StatefulCmdable.DebugObject(ctx context.Context, key string) *StringCmd func StatefulCmdable.Dump(ctx context.Context, key string) *StringCmd func StatefulCmdable.Echo(ctx context.Context, message interface{}) *StringCmd func StatefulCmdable.Get(ctx context.Context, key string) *StringCmd func StatefulCmdable.GetRange(ctx context.Context, key string, start, end int64) *StringCmd func StatefulCmdable.GetSet(ctx context.Context, key string, value interface{}) *StringCmd func StatefulCmdable.HGet(ctx context.Context, key, field string) *StringCmd func StatefulCmdable.Info(ctx context.Context, section ...string) *StringCmd func StatefulCmdable.LIndex(ctx context.Context, key string, index int64) *StringCmd func StatefulCmdable.LPop(ctx context.Context, key string) *StringCmd func StatefulCmdable.ObjectEncoding(ctx context.Context, key string) *StringCmd func StatefulCmdable.RandomKey(ctx context.Context) *StringCmd func StatefulCmdable.RPop(ctx context.Context, key string) *StringCmd func StatefulCmdable.RPopLPush(ctx context.Context, source, destination string) *StringCmd func StatefulCmdable.ScriptLoad(ctx context.Context, script string) *StringCmd func StatefulCmdable.SPop(ctx context.Context, key string) *StringCmd func StatefulCmdable.SRandMember(ctx context.Context, key string) *StringCmd func StatefulCmdable.XAdd(ctx context.Context, a *XAddArgs) *StringCmd func UniversalClient.BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd func UniversalClient.ClientGetName(ctx context.Context) *StringCmd func UniversalClient.ClientList(ctx context.Context) *StringCmd func UniversalClient.ClusterInfo(ctx context.Context) *StringCmd func UniversalClient.ClusterNodes(ctx context.Context) *StringCmd func UniversalClient.DebugObject(ctx context.Context, key string) *StringCmd func UniversalClient.Dump(ctx context.Context, key string) *StringCmd func UniversalClient.Echo(ctx context.Context, message interface{}) *StringCmd func UniversalClient.Get(ctx context.Context, key string) *StringCmd func UniversalClient.GetRange(ctx context.Context, key string, start, end int64) *StringCmd func UniversalClient.GetSet(ctx context.Context, key string, value interface{}) *StringCmd func UniversalClient.HGet(ctx context.Context, key, field string) *StringCmd func UniversalClient.Info(ctx context.Context, section ...string) *StringCmd func UniversalClient.LIndex(ctx context.Context, key string, index int64) *StringCmd func UniversalClient.LPop(ctx context.Context, key string) *StringCmd func UniversalClient.ObjectEncoding(ctx context.Context, key string) *StringCmd func UniversalClient.RandomKey(ctx context.Context) *StringCmd func UniversalClient.RPop(ctx context.Context, key string) *StringCmd func UniversalClient.RPopLPush(ctx context.Context, source, destination string) *StringCmd func UniversalClient.ScriptLoad(ctx context.Context, script string) *StringCmd func UniversalClient.SPop(ctx context.Context, key string) *StringCmd func UniversalClient.SRandMember(ctx context.Context, key string) *StringCmd func UniversalClient.XAdd(ctx context.Context, a *XAddArgs) *StringCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (map[string]int64, error) (*T) SetErr(e error) (*T) String() string (*T) Val() map[string]int64 *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewStringIntMapCmd(ctx context.Context, args ...interface{}) *StringIntMapCmd func NewStringIntMapCmdResult(val map[string]int64, err error) *StringIntMapCmd func Cmdable.PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd func Pipeliner.PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd func StatefulCmdable.PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd func UniversalClient.PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]string, error) (*T) ScanSlice(container interface{}) error (*T) SetErr(e error) (*T) String() string (*T) Val() []string *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewStringSliceCmd(ctx context.Context, args ...interface{}) *StringSliceCmd func NewStringSliceResult(val []string, err error) *StringSliceCmd func Cmdable.BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func Cmdable.BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func Cmdable.ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd func Cmdable.ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd func Cmdable.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func Cmdable.HKeys(ctx context.Context, key string) *StringSliceCmd func Cmdable.HVals(ctx context.Context, key string) *StringSliceCmd func Cmdable.Keys(ctx context.Context, pattern string) *StringSliceCmd func Cmdable.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Cmdable.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func Cmdable.SDiff(ctx context.Context, keys ...string) *StringSliceCmd func Cmdable.SInter(ctx context.Context, keys ...string) *StringSliceCmd func Cmdable.SMembers(ctx context.Context, key string) *StringSliceCmd func Cmdable.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func Cmdable.SPopN(ctx context.Context, key string, count int64) *StringSliceCmd func Cmdable.SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd func Cmdable.SUnion(ctx context.Context, keys ...string) *StringSliceCmd func Cmdable.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd func Cmdable.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Cmdable.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Cmdable.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Cmdable.ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Cmdable.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Cmdable.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func Pipeliner.BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func Pipeliner.ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd func Pipeliner.ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd func Pipeliner.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func Pipeliner.HKeys(ctx context.Context, key string) *StringSliceCmd func Pipeliner.HVals(ctx context.Context, key string) *StringSliceCmd func Pipeliner.Keys(ctx context.Context, pattern string) *StringSliceCmd func Pipeliner.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Pipeliner.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func Pipeliner.SDiff(ctx context.Context, keys ...string) *StringSliceCmd func Pipeliner.SInter(ctx context.Context, keys ...string) *StringSliceCmd func Pipeliner.SMembers(ctx context.Context, key string) *StringSliceCmd func Pipeliner.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func Pipeliner.SPopN(ctx context.Context, key string, count int64) *StringSliceCmd func Pipeliner.SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd func Pipeliner.SUnion(ctx context.Context, keys ...string) *StringSliceCmd func Pipeliner.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd func Pipeliner.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Pipeliner.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Pipeliner.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func (*SentinelClient).GetMasterAddrByName(ctx context.Context, name string) *StringSliceCmd func StatefulCmdable.BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func StatefulCmdable.BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func StatefulCmdable.ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd func StatefulCmdable.ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd func StatefulCmdable.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func StatefulCmdable.HKeys(ctx context.Context, key string) *StringSliceCmd func StatefulCmdable.HVals(ctx context.Context, key string) *StringSliceCmd func StatefulCmdable.Keys(ctx context.Context, pattern string) *StringSliceCmd func StatefulCmdable.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func StatefulCmdable.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func StatefulCmdable.SDiff(ctx context.Context, keys ...string) *StringSliceCmd func StatefulCmdable.SInter(ctx context.Context, keys ...string) *StringSliceCmd func StatefulCmdable.SMembers(ctx context.Context, key string) *StringSliceCmd func StatefulCmdable.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func StatefulCmdable.SPopN(ctx context.Context, key string, count int64) *StringSliceCmd func StatefulCmdable.SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd func StatefulCmdable.SUnion(ctx context.Context, keys ...string) *StringSliceCmd func StatefulCmdable.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd func StatefulCmdable.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func StatefulCmdable.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func StatefulCmdable.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func StatefulCmdable.ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func StatefulCmdable.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func StatefulCmdable.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func UniversalClient.BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd func UniversalClient.ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd func UniversalClient.ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd func UniversalClient.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func UniversalClient.HKeys(ctx context.Context, key string) *StringSliceCmd func UniversalClient.HVals(ctx context.Context, key string) *StringSliceCmd func UniversalClient.Keys(ctx context.Context, pattern string) *StringSliceCmd func UniversalClient.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func UniversalClient.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func UniversalClient.SDiff(ctx context.Context, keys ...string) *StringSliceCmd func UniversalClient.SInter(ctx context.Context, keys ...string) *StringSliceCmd func UniversalClient.SMembers(ctx context.Context, key string) *StringSliceCmd func UniversalClient.Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd func UniversalClient.SPopN(ctx context.Context, key string, count int64) *StringSliceCmd func UniversalClient.SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd func UniversalClient.SUnion(ctx context.Context, keys ...string) *StringSliceCmd func UniversalClient.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd func UniversalClient.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func UniversalClient.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func UniversalClient.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (map[string]string, error) (*T) SetErr(e error) (*T) String() string (*T) Val() map[string]string *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewStringStringMapCmd(ctx context.Context, args ...interface{}) *StringStringMapCmd func NewStringStringMapResult(val map[string]string, err error) *StringStringMapCmd func Cmdable.HGetAll(ctx context.Context, key string) *StringStringMapCmd func Pipeliner.HGetAll(ctx context.Context, key string) *StringStringMapCmd func (*SentinelClient).Master(ctx context.Context, name string) *StringStringMapCmd func StatefulCmdable.HGetAll(ctx context.Context, key string) *StringStringMapCmd func UniversalClient.HGetAll(ctx context.Context, key string) *StringStringMapCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (map[string]struct{}, error) (*T) SetErr(e error) (*T) String() string (*T) Val() map[string]struct{} *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewStringStructMapCmd(ctx context.Context, args ...interface{}) *StringStructMapCmd func Cmdable.SMembersMap(ctx context.Context, key string) *StringStructMapCmd func Pipeliner.SMembersMap(ctx context.Context, key string) *StringStructMapCmd func StatefulCmdable.SMembersMap(ctx context.Context, key string) *StringStructMapCmd func UniversalClient.SMembersMap(ctx context.Context, key string) *StringStructMapCmd
Subscription received after a successful subscription to channel. Channel name we have subscribed to. Number of channels we are currently subscribed to. Can be "subscribe", "unsubscribe", "psubscribe" or "punsubscribe". (*T) String() string *T : expvar.Var *T : fmt.Stringer
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (time.Time, error) (*T) SetErr(e error) (*T) String() string (*T) Val() time.Time *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewTimeCmd(ctx context.Context, args ...interface{}) *TimeCmd func NewTimeCmdResult(val time.Time, err error) *TimeCmd func Cmdable.Time(ctx context.Context) *TimeCmd func Pipeliner.Time(ctx context.Context) *TimeCmd func StatefulCmdable.Time(ctx context.Context) *TimeCmd func UniversalClient.Time(ctx context.Context) *TimeCmd
Tx implements Redis transactions as described in http://redis.io/topics/transactions. It's NOT safe for concurrent use by multiple goroutines, because Exec resets list of watched keys. If you don't need WATCH it is better to use Pipeline. (*T) AddHook(hook Hook) ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) Auth(ctx context.Context, password string) *StatusCmd Perform an AUTH command, using the given user and pass. Should be used to authenticate the current connection with one of the connections defined in the ACL list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd Redis `BZPOPMAX key [key ...] timeout` command. Redis `BZPOPMIN key [key ...] timeout` command. ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ClientGetName returns the name of the connection. ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ClientSetName assigns a name to the connection. ( T) ClientUnblock(ctx context.Context, id int64) *IntCmd ( T) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd Close closes the transaction, releasing any open resources. ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd (*T) Context() context.Context ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadius is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. Redis `GET key` command. It returns redis.Nil error when key does not exist. ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd HMGet returns the values for the specified fields in the hash stored at key. It returns an interface{} to distinguish between empty string and nil value. HMSet is a deprecated version of HSet left for compatibility with Redis 3. ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HSet accepts values in following formats: - HSet("myhash", "key1", "value1", "key2", "value2") - HSet("myhash", []string{"key1", "value1", "key2", "value2"}) - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"}) Note that it requires Redis v4 for multiple field/value pairs support. ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd MSet is like Set but accepts multiple values: - MSet("key1", "value1", "key2", "value2") - MSet([]string{"key1", "value1", "key2", "value2"}) - MSet(map[string]interface{}{"key1": "value1", "key2": "value2"}) MSetNX is like SetNX but accepts multiple values: - MSetNX("key1", "value1", "key2", "value2") - MSetNX([]string{"key1", "value1", "key2", "value2"}) - MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"}) ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd Pipeline creates a pipeline. Usually it is more convenient to use Pipelined. Pipelined executes commands queued in the fn outside of the transaction. Use TxPipelined if you need transactional behavior. (*T) Process(ctx context.Context, cmd Cmder) error ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd Publish posts the message to the channel. ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd Redis `SMEMBERS key` command output as a slice. Redis `SMEMBERS key` command output as a map. ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd Redis `SPOP key` command. Redis `SPOP key count` command. Redis `SRANDMEMBER key` command. Redis `SRANDMEMBER key count` command. ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd ( T) Select(ctx context.Context, index int) *StatusCmd Redis `SET key value [expiration]` command. Use expiration for `SETEX`-like behavior. Zero expiration means the key has no expiration time. ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd (*T) String() string ( T) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( T) Sync(ctx context.Context) ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd TxPipeline creates a pipeline. Usually it is more convenient to use TxPipelined. TxPipelined executes commands queued in the fn in the transaction. When using WATCH, EXEC will execute commands only if the watched keys were not modified, allowing for a check-and-set mechanism. Exec always returns list of commands. If transaction fails TxFailedErr is returned. Otherwise Exec returns an error of the first failed command or nil. ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd Unwatch flushes all the previously watched keys for a transaction. ( T) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd Watch marks the keys to be watched for conditional execution of a transaction. (*T) WithContext(ctx context.Context) *Tx ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd Redis `ZADD key score member [score member ...]` command. Redis `ZADD key CH score member [score member ...]` command. Redis `ZADD key NX score member [score member ...]` command. Redis `ZADD key NX CH score member [score member ...]` command. Redis `ZADD key XX score member [score member ...]` command. Redis `ZADD key XX CH score member [score member ...]` command. ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd Redis `ZADD key INCR score member` command. ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd Redis `ZADD key NX INCR score member` command. Redis `ZADD key XX INCR score member` command. ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *T : Cmdable *T : StatefulCmdable *T : expvar.Var *T : fmt.Stringer func (*Tx).WithContext(ctx context.Context) *Tx
UniversalClient is an abstract client which - based on the provided options - can connect to either clusters, or sentinel-backed failover instances or simple single-instance servers. This can be useful for testing cluster-specific applications locally. ( T) AddHook(Hook) ( T) Append(ctx context.Context, key, value string) *IntCmd ( T) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( T) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( T) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( T) BgRewriteAOF(ctx context.Context) *StatusCmd ( T) BgSave(ctx context.Context) *StatusCmd ( T) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( T) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( T) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( T) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( T) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( T) ClientGetName(ctx context.Context) *StringCmd ( T) ClientID(ctx context.Context) *IntCmd ( T) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( T) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( T) ClientList(ctx context.Context) *StringCmd ( T) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( T) Close() error ( T) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( T) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( T) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( T) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( T) ClusterFailover(ctx context.Context) *StatusCmd ( T) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( T) ClusterInfo(ctx context.Context) *StringCmd ( T) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( T) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( T) ClusterNodes(ctx context.Context) *StringCmd ( T) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( T) ClusterResetHard(ctx context.Context) *StatusCmd ( T) ClusterResetSoft(ctx context.Context) *StatusCmd ( T) ClusterSaveConfig(ctx context.Context) *StatusCmd ( T) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( T) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( T) Command(ctx context.Context) *CommandsInfoCmd ( T) ConfigGet(ctx context.Context, parameter string) *SliceCmd ( T) ConfigResetStat(ctx context.Context) *StatusCmd ( T) ConfigRewrite(ctx context.Context) *StatusCmd ( T) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( T) Context() context.Context ( T) DBSize(ctx context.Context) *IntCmd ( T) DebugObject(ctx context.Context, key string) *StringCmd ( T) Decr(ctx context.Context, key string) *IntCmd ( T) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( T) Del(ctx context.Context, keys ...string) *IntCmd ( T) Do(ctx context.Context, args ...interface{}) *Cmd ( T) Dump(ctx context.Context, key string) *StringCmd ( T) Echo(ctx context.Context, message interface{}) *StringCmd ( T) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( T) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( T) Exists(ctx context.Context, keys ...string) *IntCmd ( T) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) FlushAll(ctx context.Context) *StatusCmd ( T) FlushAllAsync(ctx context.Context) *StatusCmd ( T) FlushDB(ctx context.Context) *StatusCmd ( T) FlushDBAsync(ctx context.Context) *StatusCmd ( T) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( T) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( T) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( T) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( T) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( T) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( T) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( T) Get(ctx context.Context, key string) *StringCmd ( T) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( T) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( T) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( T) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( T) HExists(ctx context.Context, key, field string) *BoolCmd ( T) HGet(ctx context.Context, key, field string) *StringCmd ( T) HGetAll(ctx context.Context, key string) *StringStringMapCmd ( T) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( T) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( T) HKeys(ctx context.Context, key string) *StringSliceCmd ( T) HLen(ctx context.Context, key string) *IntCmd ( T) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( T) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( T) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( T) HVals(ctx context.Context, key string) *StringSliceCmd ( T) Incr(ctx context.Context, key string) *IntCmd ( T) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( T) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( T) Info(ctx context.Context, section ...string) *StringCmd ( T) Keys(ctx context.Context, pattern string) *StringSliceCmd ( T) LIndex(ctx context.Context, key string, index int64) *StringCmd ( T) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( T) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( T) LLen(ctx context.Context, key string) *IntCmd ( T) LPop(ctx context.Context, key string) *StringCmd ( T) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( T) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( T) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( T) LastSave(ctx context.Context) *IntCmd ( T) MGet(ctx context.Context, keys ...string) *SliceCmd ( T) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( T) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( T) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( T) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( T) Move(ctx context.Context, key string, db int) *BoolCmd ( T) ObjectEncoding(ctx context.Context, key string) *StringCmd ( T) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( T) ObjectRefCount(ctx context.Context, key string) *IntCmd ( T) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( T) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( T) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( T) PFCount(ctx context.Context, keys ...string) *IntCmd ( T) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( T) PSubscribe(ctx context.Context, channels ...string) *PubSub ( T) PTTL(ctx context.Context, key string) *DurationCmd ( T) Persist(ctx context.Context, key string) *BoolCmd ( T) Ping(ctx context.Context) *StatusCmd ( T) Pipeline() Pipeliner ( T) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Process(ctx context.Context, cmd Cmder) error ( T) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( T) PubSubNumPat(ctx context.Context) *IntCmd ( T) PubSubNumSub(ctx context.Context, channels ...string) *StringIntMapCmd ( T) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( T) Quit(ctx context.Context) *StatusCmd ( T) RPop(ctx context.Context, key string) *StringCmd ( T) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( T) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( T) RandomKey(ctx context.Context) *StringCmd ( T) ReadOnly(ctx context.Context) *StatusCmd ( T) ReadWrite(ctx context.Context) *StatusCmd ( T) Rename(ctx context.Context, key, newkey string) *StatusCmd ( T) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( T) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( T) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SCard(ctx context.Context, key string) *IntCmd ( T) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( T) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( T) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( T) SMembers(ctx context.Context, key string) *StringSliceCmd ( T) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( T) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( T) SPop(ctx context.Context, key string) *StringCmd ( T) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRandMember(ctx context.Context, key string) *StringCmd ( T) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( T) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( T) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( T) Save(ctx context.Context) *StatusCmd ( T) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( T) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( T) ScriptFlush(ctx context.Context) *StatusCmd ( T) ScriptKill(ctx context.Context) *StatusCmd ( T) ScriptLoad(ctx context.Context, script string) *StringCmd ( T) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( T) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( T) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( T) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( T) Shutdown(ctx context.Context) *StatusCmd ( T) ShutdownNoSave(ctx context.Context) *StatusCmd ( T) ShutdownSave(ctx context.Context) *StatusCmd ( T) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( T) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( T) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( T) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( T) StrLen(ctx context.Context, key string) *IntCmd ( T) Subscribe(ctx context.Context, channels ...string) *PubSub ( T) TTL(ctx context.Context, key string) *DurationCmd ( T) Time(ctx context.Context) *TimeCmd ( T) Touch(ctx context.Context, keys ...string) *IntCmd ( T) TxPipeline() Pipeliner ( T) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( T) Type(ctx context.Context, key string) *StatusCmd ( T) Unlink(ctx context.Context, keys ...string) *IntCmd ( T) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error ( T) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( T) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( T) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( T) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( T) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( T) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( T) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( T) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( T) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( T) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( T) XLen(ctx context.Context, stream string) *IntCmd ( T) XPending(ctx context.Context, stream, group string) *XPendingCmd ( T) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( T) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( T) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( T) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( T) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( T) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( T) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( T) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( T) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd ( T) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd ( T) ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd ( T) ZCard(ctx context.Context, key string) *IntCmd ( T) ZCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( T) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd ( T) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( T) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( T) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( T) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRank(ctx context.Context, key, member string) *IntCmd ( T) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( T) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( T) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( T) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( T) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( T) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( T) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( T) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( T) ZRevRank(ctx context.Context, key, member string) *IntCmd ( T) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( T) ZScore(ctx context.Context, key, member string) *FloatCmd ( T) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd *Client *ClusterClient *Ring T : Cmdable T : io.Closer func NewUniversalClient(opts *UniversalOptions) UniversalClient
UniversalOptions information is required by UniversalClient to establish connections. Either a single address or a seed list of host:port addresses of cluster/sentinel nodes. Database to be selected after connecting to the server. Only single-node and failover clients. DialTimeout time.Duration Dialer func(ctx context.Context, network, addr string) (net.Conn, error) IdleCheckFrequency time.Duration IdleTimeout time.Duration The sentinel master name. Only failover clients. MaxConnAge time.Duration MaxRedirects int MaxRetries int MaxRetryBackoff time.Duration MinIdleConns int MinRetryBackoff time.Duration OnConnect func(ctx context.Context, cn *Conn) error Password string PoolSize int PoolTimeout time.Duration ReadOnly bool ReadTimeout time.Duration RouteByLatency bool RouteRandomly bool SentinelPassword string TLSConfig *tls.Config Username string WriteTimeout time.Duration Cluster returns cluster options created from the universal options. Failover returns failover options created from the universal options. Simple returns basic options created from the universal options. func NewUniversalClient(opts *UniversalOptions) UniversalClient
XAddArgs accepts values in the following formats: - XAddArgs.Values = []interface{}{"key1", "value1", "key2", "value2"} - XAddArgs.Values = []string("key1", "value1", "key2", "value2") - XAddArgs.Values = map[string]interface{}{"key1": "value1", "key2": "value2"} Note that map will not preserve the order of key-value pairs. ID string // MAXLEN N // MAXLEN ~ N Stream string Values interface{} func Cmdable.XAdd(ctx context.Context, a *XAddArgs) *StringCmd func Pipeliner.XAdd(ctx context.Context, a *XAddArgs) *StringCmd func StatefulCmdable.XAdd(ctx context.Context, a *XAddArgs) *StringCmd func UniversalClient.XAdd(ctx context.Context, a *XAddArgs) *StringCmd
Consumer string Group string Messages []string MinIdle time.Duration Stream string func Cmdable.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func Cmdable.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd func Pipeliner.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func Pipeliner.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd func StatefulCmdable.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func StatefulCmdable.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd func UniversalClient.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func UniversalClient.XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
Consumers int64 LastDeliveredID string Name string Pending int64 func (*XInfoGroupsCmd).Result() ([]XInfoGroups, error) func (*XInfoGroupsCmd).Val() []XInfoGroups
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]XInfoGroups, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []XInfoGroups *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewXInfoGroupsCmd(ctx context.Context, stream string) *XInfoGroupsCmd func Cmdable.XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd func Pipeliner.XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd func StatefulCmdable.XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd func UniversalClient.XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
ID string Values map[string]interface{} func (*XMessageSliceCmd).Result() ([]XMessage, error) func (*XMessageSliceCmd).Val() []XMessage func NewXMessageSliceCmdResult(val []XMessage, err error) *XMessageSliceCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]XMessage, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []XMessage *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewXMessageSliceCmd(ctx context.Context, args ...interface{}) *XMessageSliceCmd func NewXMessageSliceCmdResult(val []XMessage, err error) *XMessageSliceCmd func Cmdable.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func Cmdable.XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd func Cmdable.XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd func Cmdable.XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd func Cmdable.XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd func Pipeliner.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func Pipeliner.XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd func Pipeliner.XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd func Pipeliner.XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd func Pipeliner.XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd func StatefulCmdable.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func StatefulCmdable.XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd func StatefulCmdable.XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd func StatefulCmdable.XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd func StatefulCmdable.XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd func UniversalClient.XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd func UniversalClient.XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd func UniversalClient.XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd func UniversalClient.XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd func UniversalClient.XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd
Consumers map[string]int64 Count int64 Higher string Lower string func (*XPendingCmd).Result() (*XPending, error) func (*XPendingCmd).Val() *XPending
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (*XPending, error) (*T) SetErr(e error) (*T) String() string (*T) Val() *XPending *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewXPendingCmd(ctx context.Context, args ...interface{}) *XPendingCmd func Cmdable.XPending(ctx context.Context, stream, group string) *XPendingCmd func Pipeliner.XPending(ctx context.Context, stream, group string) *XPendingCmd func StatefulCmdable.XPending(ctx context.Context, stream, group string) *XPendingCmd func UniversalClient.XPending(ctx context.Context, stream, group string) *XPendingCmd
Consumer string ID string Idle time.Duration RetryCount int64 func (*XPendingExtCmd).Result() ([]XPendingExt, error) func (*XPendingExtCmd).Val() []XPendingExt
Consumer string Count int64 End string Group string Start string Stream string func Cmdable.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd func Pipeliner.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd func StatefulCmdable.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd func UniversalClient.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]XPendingExt, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []XPendingExt *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewXPendingExtCmd(ctx context.Context, args ...interface{}) *XPendingExtCmd func Cmdable.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd func Pipeliner.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd func StatefulCmdable.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd func UniversalClient.XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
Block time.Duration Count int64 // list of streams and ids, e.g. stream1 stream2 id1 id2 func Cmdable.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd func Pipeliner.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd func StatefulCmdable.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd func UniversalClient.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
Block time.Duration Consumer string Count int64 Group string NoAck bool // list of streams and ids, e.g. stream1 stream2 id1 id2 func Cmdable.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd func Pipeliner.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd func StatefulCmdable.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd func UniversalClient.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
Messages []XMessage Stream string func (*XStreamSliceCmd).Result() ([]XStream, error) func (*XStreamSliceCmd).Val() []XStream func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]XStream, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []XStream *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewXStreamSliceCmd(ctx context.Context, args ...interface{}) *XStreamSliceCmd func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd func Cmdable.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd func Cmdable.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd func Cmdable.XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd func Pipeliner.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd func Pipeliner.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd func Pipeliner.XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd func StatefulCmdable.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd func StatefulCmdable.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd func StatefulCmdable.XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd func UniversalClient.XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd func UniversalClient.XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd func UniversalClient.XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
Z represents sorted set member. Member interface{} Score float64 func (*ZSliceCmd).Result() ([]Z, error) func (*ZSliceCmd).Val() []Z func NewZSliceCmdResult(val []Z, err error) *ZSliceCmd func Cmdable.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Cmdable.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func Cmdable.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func Cmdable.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd func Pipeliner.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func Pipeliner.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func Pipeliner.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func Pipeliner.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd func StatefulCmdable.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func StatefulCmdable.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func StatefulCmdable.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func StatefulCmdable.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd func UniversalClient.ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd func UniversalClient.ZIncr(ctx context.Context, key string, member *Z) *FloatCmd func UniversalClient.ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd func UniversalClient.ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd
Count int64 Max string Min string Offset int64 func Cmdable.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Cmdable.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Cmdable.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func Cmdable.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Cmdable.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Cmdable.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func Pipeliner.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func Pipeliner.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func Pipeliner.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func StatefulCmdable.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func StatefulCmdable.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func StatefulCmdable.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func StatefulCmdable.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func StatefulCmdable.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func StatefulCmdable.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func UniversalClient.ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func UniversalClient.ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd func UniversalClient.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() ([]Z, error) (*T) SetErr(e error) (*T) String() string (*T) Val() []Z *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewZSliceCmd(ctx context.Context, args ...interface{}) *ZSliceCmd func NewZSliceCmdResult(val []Z, err error) *ZSliceCmd func Cmdable.ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd func Cmdable.ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd func Cmdable.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func Cmdable.ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd func Cmdable.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func Cmdable.ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd func Pipeliner.ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd func Pipeliner.ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd func Pipeliner.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func Pipeliner.ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd func Pipeliner.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func Pipeliner.ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd func StatefulCmdable.ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd func StatefulCmdable.ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd func StatefulCmdable.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func StatefulCmdable.ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd func StatefulCmdable.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func StatefulCmdable.ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd func UniversalClient.ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd func UniversalClient.ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd func UniversalClient.ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func UniversalClient.ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd func UniversalClient.ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd func UniversalClient.ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
ZStore is used as an arg to ZInterStore and ZUnionStore. Can be SUM, MIN or MAX. Keys []string Weights []float64 func Cmdable.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func Cmdable.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func Pipeliner.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func Pipeliner.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func StatefulCmdable.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func StatefulCmdable.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func UniversalClient.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func UniversalClient.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
ZWithKey represents sorted set member including the name of the key where it was popped. Key string Z Z Z.Member interface{} Z.Score float64 func (*ZWithKeyCmd).Result() (*ZWithKey, error) func (*ZWithKeyCmd).Val() *ZWithKey func NewZWithKeyCmdResult(val *ZWithKey, err error) *ZWithKeyCmd
(*T) Args() []interface{} (*T) Err() error (*T) FullName() string (*T) Name() string (*T) Result() (*ZWithKey, error) (*T) SetErr(e error) (*T) String() string (*T) Val() *ZWithKey *T : Cmder *T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod *T : expvar.Var *T : fmt.Stringer func NewZWithKeyCmd(ctx context.Context, args ...interface{}) *ZWithKeyCmd func NewZWithKeyCmdResult(val *ZWithKey, err error) *ZWithKeyCmd func Cmdable.BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd func Cmdable.BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd func Pipeliner.BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd func Pipeliner.BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd func StatefulCmdable.BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd func StatefulCmdable.BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd func UniversalClient.BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd func UniversalClient.BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
Package-Level Functions (total 110, in which 60 are exported)
func NewBoolCmd(ctx context.Context, args ...interface{}) *BoolCmd
NewBoolResult returns a BoolCmd initialised with val and err for testing.
func NewBoolSliceCmd(ctx context.Context, args ...interface{}) *BoolSliceCmd
NewBoolSliceResult returns a BoolSliceCmd initialised with val and err for testing.
NewClient returns a client to the Redis Server specified by Options.
NewClusterClient returns a Redis Cluster client as described in http://redis.io/topics/cluster-spec.
NewClusterSlotsCmdResult returns a ClusterSlotsCmd initialised with val and err for testing.
func NewCmd(ctx context.Context, args ...interface{}) *Cmd
NewCmdResult returns a Cmd initialised with val and err for testing.
NewCommandsInfoCmdResult returns a CommandsInfoCmd initialised with val and err for testing.
func NewDurationCmd(ctx context.Context, precision time.Duration, args ...interface{}) *DurationCmd
NewDurationResult returns a DurationCmd initialised with val and err for testing.
NewFailoverClient returns a Redis client that uses Redis Sentinel for automatic failover. It's safe for concurrent use by multiple goroutines.
NewFailoverClusterClient returns a client that supports routing read-only commands to a slave node.
func NewFloatCmd(ctx context.Context, args ...interface{}) *FloatCmd
NewFloatResult returns a FloatCmd initialised with val and err for testing.
NewGeoLocationCmdResult returns a GeoLocationCmd initialised with val and err for testing.
func NewGeoPosCmd(ctx context.Context, args ...interface{}) *GeoPosCmd
NewGeoPosCmdResult returns a GeoPosCmd initialised with val and err for testing.
func NewIntCmd(ctx context.Context, args ...interface{}) *IntCmd
NewIntResult returns an IntCmd initialised with val and err for testing.
func NewIntSliceCmd(ctx context.Context, args ...interface{}) *IntSliceCmd
func NewScanCmd(ctx context.Context, process cmdable, args ...interface{}) *ScanCmd
NewScanCmdResult returns a ScanCmd initialised with val and err for testing.
func NewSliceCmd(ctx context.Context, args ...interface{}) *SliceCmd
NewSliceResult returns a SliceCmd initialised with val and err for testing.
func NewSlowLogCmd(ctx context.Context, args ...interface{}) *SlowLogCmd
func NewStatusCmd(ctx context.Context, args ...interface{}) *StatusCmd
NewStatusResult returns a StatusCmd initialised with val and err for testing.
func NewStringCmd(ctx context.Context, args ...interface{}) *StringCmd
NewStringIntMapCmdResult returns a StringIntMapCmd initialised with val and err for testing.
NewStringResult returns a StringCmd initialised with val and err for testing.
NewStringSliceResult returns a StringSliceCmd initialised with val and err for testing.
NewStringStringMapResult returns a StringStringMapCmd initialised with val and err for testing.
func NewTimeCmd(ctx context.Context, args ...interface{}) *TimeCmd
NewTimeCmdResult returns a TimeCmd initialised with val and err for testing.
NewUniversalClient returns a new multi client. The type of client returned depends on the following three conditions: 1. if a MasterName is passed a sentinel-backed FailoverClient will be returned 2. if the number of Addrs is two or more, a ClusterClient will be returned 3. otherwise, a single-node redis Client will be returned.
NewXMessageSliceCmdResult returns a XMessageSliceCmd initialised with val and err for testing.
func NewXPendingCmd(ctx context.Context, args ...interface{}) *XPendingCmd
NewXStreamSliceCmdResult returns a XStreamSliceCmd initialised with val and err for testing.
func NewZSliceCmd(ctx context.Context, args ...interface{}) *ZSliceCmd
NewZSliceCmdResult returns a ZSliceCmd initialised with val and err for testing.
func NewZWithKeyCmd(ctx context.Context, args ...interface{}) *ZWithKeyCmd
NewZWithKeyCmdResult returns a NewZWithKeyCmd initialised with val and err for testing.
ParseURL parses an URL into Options that can be used to connect to Redis.
Package-Level Variables (total 4, in which 1 are exported)
Package-Level Constants (total 4, in which 2 are exported)
Nil reply returned by Redis when key does not exist.
TxFailedErr transaction redis failed.