package redis

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

Dependency Relation
	imports 28 packages, and imported by 3 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]) } { // Set "redis" tag for hash key type ExampleUser struct { Name string `redis:"name"` Age int `redis:"age"` } items := ExampleUser{"jane", 22} err := rdb.HSet(ctx, "user:1", items).Err() if err != nil { panic(err) } } { 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) } { 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.ScanType(ctx, cursor, "key*", 10, "string").Result() if err != nil { panic(err) } n += len(keys) if cursor == 0 { break } } fmt.Printf("found %d keys\n", n) } { rdb.FlushDB(ctx) for i := 0; i < 33; i++ { err := rdb.HSet(context.TODO(), fmt.Sprintf("key%d", i), "value", "foo").Err() if err != nil { panic(err) } } var allKeys []string var cursor uint64 var err error for { var keysFromScan []string keysFromScan, cursor, err = rdb.ScanType(context.TODO(), cursor, "key*", 10, "hash").Result() if err != nil { panic(err) } allKeys = append(allKeys, keysFromScan...) if cursor == 0 { break } } fmt.Printf("%d keys ready for use", len(allKeys)) } { 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) } } { err := rdb.SetEx(ctx, "key", "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[key]) 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 = 10000 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) } { 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") } { conn := rdb.Conn() 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.FlushDB(ctx) err := rdb.HMSet(ctx, "map", "name", "hello", "count", 123, "correct", true).Err() if err != nil { panic(err) } res := rdb.HGetAll(ctx, "map") if res.Err() != nil { panic(err) } type data struct { Name string `redis:"name"` Count int `redis:"count"` Correct bool `redis:"correct"` } // Scan the results into the struct. var d data if err := res.Scan(&d); err != nil { panic(err) } fmt.Println(d) } { 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?dial_timeout=5s") if err != nil { panic(err) } fmt.Println("addr is", opt.Addr) fmt.Println("db is", opt.DB) fmt.Println("password is", opt.Password) fmt.Println("dial timeout is", opt.DialTimeout) _ = 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.FlushDB(ctx) err := rdb.MSet(ctx, "name", "hello", "count", 123, "correct", true).Err() if err != nil { panic(err) } res := rdb.MGet(ctx, "name", "count", "empty", "correct") if res.Err() != nil { panic(err) } type data struct { Name string `redis:"name"` Count int `redis:"count"` Correct bool `redis:"correct"` } // Scan the results into the struct. var d data if err := res.Scan(&d); err != nil { panic(err) } fmt.Println(d) } { 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 135)
/* sort 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
(*BoolCmd) Args() []interface{} (*BoolCmd) Err() error (*BoolCmd) FullName() string (*BoolCmd) Name() string (*BoolCmd) Result() (bool, error) (*BoolCmd) SetErr(e error) (*BoolCmd) SetFirstKeyPos(keyPos int8) (*BoolCmd) SetVal(val bool) (*BoolCmd) String() string (*BoolCmd) Val() bool *BoolCmd : Cmder *BoolCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *BoolCmd : expvar.Var *BoolCmd : 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.ClientUnpause(ctx context.Context) *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.ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Cmdable.ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Cmdable.ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Cmdable.ExpireXX(ctx context.Context, key string, expiration time.Duration) *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.ClientUnpause(ctx context.Context) *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.ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Pipeliner.ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Pipeliner.ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd func Pipeliner.ExpireXX(ctx context.Context, key string, expiration time.Duration) *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.ClientUnpause(ctx context.Context) *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.ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func StatefulCmdable.ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func StatefulCmdable.ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd func StatefulCmdable.ExpireXX(ctx context.Context, key string, expiration time.Duration) *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.ClientUnpause(ctx context.Context) *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.ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func UniversalClient.ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd func UniversalClient.ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd func UniversalClient.ExpireXX(ctx context.Context, key string, expiration time.Duration) *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
(*BoolSliceCmd) Args() []interface{} (*BoolSliceCmd) Err() error (*BoolSliceCmd) FullName() string (*BoolSliceCmd) Name() string (*BoolSliceCmd) Result() ([]bool, error) (*BoolSliceCmd) SetErr(e error) (*BoolSliceCmd) SetFirstKeyPos(keyPos int8) (*BoolSliceCmd) SetVal(val []bool) (*BoolSliceCmd) String() string (*BoolSliceCmd) Val() []bool *BoolSliceCmd : Cmder *BoolSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *BoolSliceCmd : expvar.Var *BoolSliceCmd : fmt.Stringer func NewBoolSliceCmd(ctx context.Context, args ...interface{}) *BoolSliceCmd func NewBoolSliceResult(val []bool, err error) *BoolSliceCmd func (*ClusterClient).ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func Cmdable.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func Cmdable.SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd func Pipeliner.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func Pipeliner.SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd func (*Script).Exists(ctx context.Context, c Scripter) *BoolSliceCmd func Scripter.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func StatefulCmdable.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func StatefulCmdable.SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd func UniversalClient.ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd func UniversalClient.SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
func WithChannelHealthCheckInterval(d time.Duration) ChannelOption func WithChannelSendTimeout(d time.Duration) ChannelOption func WithChannelSize(size int) ChannelOption func (*PubSub).Channel(opts ...ChannelOption) <-chan *Message func (*PubSub).ChannelWithSubscriptions(opts ...ChannelOption) <-chan interface{}
Client is a Redis client representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines. Client creates and frees connections automatically; it also maintains a free pool of idle connections. You can control the pool size with Config.PoolSize option. ( Client) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2: client.AddHook(hook-1, hook-2) hook-1: func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } } hook-2: func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } } The execution sequence is: hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed. ( Client) Append(ctx context.Context, key, value string) *IntCmd ( Client) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( Client) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( Client) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Client) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Client) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set") BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. ( Client) BgRewriteAOF(ctx context.Context) *StatusCmd ( Client) BgSave(ctx context.Context) *StatusCmd ( Client) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( Client) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( Client) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( Client) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( Client) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( Client) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`. BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte ClientGetName returns the name of the connection. ( Client) ClientID(ctx context.Context) *IntCmd ( Client) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( Client) ClientList(ctx context.Context) *StringCmd ( Client) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( Client) ClientUnblock(ctx context.Context, id int64) *IntCmd ( Client) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( Client) ClientUnpause(ctx context.Context) *BoolCmd 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. ( Client) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( Client) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Client) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( Client) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( Client) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( Client) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Client) ClusterFailover(ctx context.Context) *StatusCmd ( Client) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( Client) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( Client) ClusterInfo(ctx context.Context) *StringCmd ( Client) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( Client) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( Client) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( Client) ClusterNodes(ctx context.Context) *StringCmd ( Client) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( Client) ClusterResetHard(ctx context.Context) *StatusCmd ( Client) ClusterResetSoft(ctx context.Context) *StatusCmd ( Client) ClusterSaveConfig(ctx context.Context) *StatusCmd ( Client) ClusterShards(ctx context.Context) *ClusterShardsCmd ( Client) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( Client) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( Client) Command(ctx context.Context) *CommandsInfoCmd ( Client) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( Client) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( Client) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( Client) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( Client) ConfigResetStat(ctx context.Context) *StatusCmd ( Client) ConfigRewrite(ctx context.Context) *StatusCmd ( Client) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd (*Client) Conn() *Conn ( Client) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd ( Client) DBSize(ctx context.Context) *IntCmd ( Client) DebugObject(ctx context.Context, key string) *StringCmd ( Client) Decr(ctx context.Context, key string) *IntCmd ( Client) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( Client) Del(ctx context.Context, keys ...string) *IntCmd Do create a Cmd from the args and processes the cmd. ( Client) Dump(ctx context.Context, key string) *StringCmd ( Client) Echo(ctx context.Context, message interface{}) *StringCmd ( Client) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Client) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Client) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Client) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Client) Exists(ctx context.Context, keys ...string) *IntCmd ( Client) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Client) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Client) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Client) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Client) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Client) ExpireTime(ctx context.Context, key string) *DurationCmd ( Client) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Client) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Client) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Client) FlushAll(ctx context.Context) *StatusCmd ( Client) FlushAllAsync(ctx context.Context) *StatusCmd ( Client) FlushDB(ctx context.Context) *StatusCmd ( Client) FlushDBAsync(ctx context.Context) *StatusCmd ( Client) FunctionDelete(ctx context.Context, libName string) *StringCmd ( Client) FunctionDump(ctx context.Context) *StringCmd ( Client) FunctionFlush(ctx context.Context) *StringCmd ( Client) FunctionFlushAsync(ctx context.Context) *StringCmd ( Client) FunctionKill(ctx context.Context) *StringCmd ( Client) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( Client) FunctionLoad(ctx context.Context, code string) *StringCmd ( Client) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( Client) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( Client) FunctionStats(ctx context.Context) *FunctionStatsCmd ( Client) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( Client) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( Client) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( Client) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. ( Client) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( Client) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( Client) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd Get Redis `GET key` command. It returns redis.Nil error when key does not exist. ( Client) GetBit(ctx context.Context, key string, offset int64) *IntCmd GetDel redis-server version >= 6.2.0. GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0. ( Client) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( Client) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( Client) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( Client) HExists(ctx context.Context, key, field string) *BoolCmd ( Client) HGet(ctx context.Context, key, field string) *StringCmd ( Client) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( Client) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( Client) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( Client) HKeys(ctx context.Context, key string) *StringSliceCmd ( Client) 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. HRandField redis-server version >= 6.2.0. HRandFieldWithValues redis-server version >= 6.2.0. ( Client) 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"}) Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` } - HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0 For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface. Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute. ( Client) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( Client) HVals(ctx context.Context, key string) *StringSliceCmd ( Client) Incr(ctx context.Context, key string) *IntCmd ( Client) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( Client) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( Client) Info(ctx context.Context, sections ...string) *StringCmd ( Client) Keys(ctx context.Context, pattern string) *StringSliceCmd ( Client) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( Client) LIndex(ctx context.Context, key string, index int64) *StringCmd ( Client) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( Client) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Client) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Client) LLen(ctx context.Context, key string) *IntCmd LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2") ( Client) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( Client) LPop(ctx context.Context, key string) *StringCmd ( Client) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Client) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd ( Client) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd ( Client) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Client) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Client) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Client) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( Client) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( Client) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( Client) LastSave(ctx context.Context) *IntCmd ( Client) 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"}) - MSet(struct), For struct types, see HSet description. 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"}) - MSetNX(struct), For struct types, see HSet description. ( Client) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( Client) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( Client) Move(ctx context.Context, key string, db int) *BoolCmd ( Client) ObjectEncoding(ctx context.Context, key string) *StringCmd ( Client) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( Client) ObjectRefCount(ctx context.Context, key string) *IntCmd Options returns read-only Options that were used to create the client. ( Client) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Client) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Client) PExpireTime(ctx context.Context, key string) *DurationCmd ( Client) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( Client) PFCount(ctx context.Context, keys ...string) *IntCmd ( Client) 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. ( Client) PTTL(ctx context.Context, key string) *DurationCmd ( Client) Persist(ctx context.Context, key string) *BoolCmd ( Client) Ping(ctx context.Context) *StatusCmd (*Client) Pipeline() Pipeliner (*Client) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) PoolStats returns connection pool stats. (*Client) Process(ctx context.Context, cmd Cmder) error ( Client) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( Client) PubSubNumPat(ctx context.Context) *IntCmd ( Client) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Client) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( Client) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd Publish posts the message to the channel. ( Client) Quit(_ context.Context) *StatusCmd ( Client) RPop(ctx context.Context, key string) *StringCmd ( Client) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Client) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( Client) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Client) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Client) RandomKey(ctx context.Context) *StringCmd ( Client) ReadOnly(ctx context.Context) *StatusCmd ( Client) ReadWrite(ctx context.Context) *StatusCmd ( Client) Rename(ctx context.Context, key, newkey string) *StatusCmd ( Client) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( Client) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Client) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Client) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( Client) SCard(ctx context.Context, key string) *IntCmd ( Client) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Client) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Client) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( Client) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Client) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Client) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd SMIsMember Redis `SMISMEMBER key member [member ...]` command. SMembers Redis `SMEMBERS key` command output as a slice. SMembersMap Redis `SMEMBERS key` command output as a map. ( Client) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd SPop Redis `SPOP key` command. SPopN Redis `SPOP key count` command. ( Client) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd SRandMember Redis `SRANDMEMBER key` command. SRandMemberN Redis `SRANDMEMBER key count` command. ( Client) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Client) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd SSubscribe Subscribes the client to the specified shard channels. Channels can be omitted to create empty subscription. ( Client) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( Client) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Client) Save(ctx context.Context) *StatusCmd ( Client) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( Client) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( Client) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Client) ScriptFlush(ctx context.Context) *StatusCmd ( Client) ScriptKill(ctx context.Context) *StatusCmd ( Client) ScriptLoad(ctx context.Context, script string) *StringCmd Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options. ( Client) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd SetEx Redis `SETEx key expiration value` command. SetNX Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Client) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd SetXX Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Client) Shutdown(ctx context.Context) *StatusCmd ( Client) ShutdownNoSave(ctx context.Context) *StatusCmd ( Client) ShutdownSave(ctx context.Context) *StatusCmd ( Client) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( Client) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( Client) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Client) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( Client) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Client) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( Client) StrLen(ctx context.Context, key string) *IntCmd ( Client) 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() ( Client) Sync(_ context.Context) ( Client) TTL(ctx context.Context, key string) *DurationCmd ( Client) Time(ctx context.Context) *TimeCmd ( Client) Touch(ctx context.Context, keys ...string) *IntCmd TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. (*Client) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( Client) Type(ctx context.Context, key string) *StatusCmd ( Client) Unlink(ctx context.Context, keys ...string) *IntCmd ( Client) 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. (*Client) WithTimeout(timeout time.Duration) *Client ( Client) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( Client) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( Client) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( Client) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( Client) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( Client) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( Client) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( Client) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( Client) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Client) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( Client) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Client) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( Client) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( Client) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( Client) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( Client) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0. ( Client) XLen(ctx context.Context, stream string) *IntCmd ( Client) XPending(ctx context.Context, stream, group string) *XPendingCmd ( Client) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( Client) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Client) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( Client) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( Client) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( Client) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( Client) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Client) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen ( Client) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( Client) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( Client) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ZAdd Redis `ZADD key score member [score member ...]` command. ( Client) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( Client) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZAddGT Redis `ZADD key GT score member [score member ...]` command. ZAddLT Redis `ZADD key LT score member [score member ...]` command. ZAddNX Redis `ZADD key NX score member [score member ...]` command. ZAddXX Redis `ZADD key XX score member [score member ...]` command. ( Client) ZCard(ctx context.Context, key string) *IntCmd ( Client) ZCount(ctx context.Context, key, min, max string) *IntCmd ZDiff redis-server version >= 6.2.0. ZDiffStore redis-server version >=6.2.0. ZDiffWithScores redis-server version >= 6.2.0. ( Client) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( Client) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( Client) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Client) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( Client) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( Client) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2") ( Client) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( Client) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Client) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ZRandMember redis-server version >= 6.2.0. ZRandMemberWithScores redis-server version >= 6.2.0. ( Client) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Client) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( Client) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( Client) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Client) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Client) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Client) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( Client) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Client) ZRank(ctx context.Context, key, member string) *IntCmd ( Client) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Client) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( Client) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( Client) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( Client) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Client) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Client) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Client) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Client) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Client) ZRevRank(ctx context.Context, key, member string) *IntCmd ( Client) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Client) ZScore(ctx context.Context, key, member string) *FloatCmd ( Client) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( Client) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( Client) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Client : Cmdable Client : Scripter *Client : UniversalClient Client : github.com/prometheus/common/expfmt.Closer Client : expvar.Var Client : fmt.Stringer Client : io.Closer func NewClient(opt *Options) *Client func NewFailoverClient(failoverOpt *FailoverOptions) *Client func (*Client).WithTimeout(timeout time.Duration) *Client func (*ClusterClient).MasterForKey(ctx context.Context, key string) (*Client, error) func (*ClusterClient).SlaveForKey(ctx context.Context, key string) (*Client, error)
ClusterClient is a Redis Cluster client representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines. ( ClusterClient) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2: client.AddHook(hook-1, hook-2) hook-1: func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } } hook-2: func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } } The execution sequence is: hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed. ( ClusterClient) Append(ctx context.Context, key, value string) *IntCmd ( ClusterClient) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( ClusterClient) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( ClusterClient) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( ClusterClient) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( ClusterClient) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set") BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. ( ClusterClient) BgRewriteAOF(ctx context.Context) *StatusCmd ( ClusterClient) BgSave(ctx context.Context) *StatusCmd ( ClusterClient) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( ClusterClient) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( ClusterClient) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( ClusterClient) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( ClusterClient) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( ClusterClient) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`. BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte ClientGetName returns the name of the connection. ( ClusterClient) ClientID(ctx context.Context) *IntCmd ( ClusterClient) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( ClusterClient) ClientList(ctx context.Context) *StringCmd ( ClusterClient) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( ClusterClient) ClientUnblock(ctx context.Context, id int64) *IntCmd ( ClusterClient) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( ClusterClient) ClientUnpause(ctx context.Context) *BoolCmd 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. ( ClusterClient) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( ClusterClient) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( ClusterClient) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( ClusterClient) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( ClusterClient) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( ClusterClient) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( ClusterClient) ClusterFailover(ctx context.Context) *StatusCmd ( ClusterClient) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( ClusterClient) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( ClusterClient) ClusterInfo(ctx context.Context) *StringCmd ( ClusterClient) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( ClusterClient) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( ClusterClient) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( ClusterClient) ClusterNodes(ctx context.Context) *StringCmd ( ClusterClient) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( ClusterClient) ClusterResetHard(ctx context.Context) *StatusCmd ( ClusterClient) ClusterResetSoft(ctx context.Context) *StatusCmd ( ClusterClient) ClusterSaveConfig(ctx context.Context) *StatusCmd ( ClusterClient) ClusterShards(ctx context.Context) *ClusterShardsCmd ( ClusterClient) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( ClusterClient) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( ClusterClient) Command(ctx context.Context) *CommandsInfoCmd ( ClusterClient) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( ClusterClient) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( ClusterClient) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( ClusterClient) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( ClusterClient) ConfigResetStat(ctx context.Context) *StatusCmd ( ClusterClient) ConfigRewrite(ctx context.Context) *StatusCmd ( ClusterClient) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( ClusterClient) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd (*ClusterClient) DBSize(ctx context.Context) *IntCmd ( ClusterClient) DebugObject(ctx context.Context, key string) *StringCmd ( ClusterClient) Decr(ctx context.Context, key string) *IntCmd ( ClusterClient) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( ClusterClient) Del(ctx context.Context, keys ...string) *IntCmd Do create a Cmd from the args and processes the cmd. ( ClusterClient) Dump(ctx context.Context, key string) *StringCmd ( ClusterClient) Echo(ctx context.Context, message interface{}) *StringCmd ( ClusterClient) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( ClusterClient) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( ClusterClient) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( ClusterClient) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( ClusterClient) Exists(ctx context.Context, keys ...string) *IntCmd ( ClusterClient) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( ClusterClient) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( ClusterClient) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( ClusterClient) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( ClusterClient) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( ClusterClient) ExpireTime(ctx context.Context, key string) *DurationCmd ( ClusterClient) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( ClusterClient) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( ClusterClient) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( ClusterClient) FlushAll(ctx context.Context) *StatusCmd ( ClusterClient) FlushAllAsync(ctx context.Context) *StatusCmd ( ClusterClient) FlushDB(ctx context.Context) *StatusCmd ( ClusterClient) 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. ( ClusterClient) FunctionDelete(ctx context.Context, libName string) *StringCmd ( ClusterClient) FunctionDump(ctx context.Context) *StringCmd ( ClusterClient) FunctionFlush(ctx context.Context) *StringCmd ( ClusterClient) FunctionFlushAsync(ctx context.Context) *StringCmd ( ClusterClient) FunctionKill(ctx context.Context) *StringCmd ( ClusterClient) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( ClusterClient) FunctionLoad(ctx context.Context, code string) *StringCmd ( ClusterClient) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( ClusterClient) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( ClusterClient) FunctionStats(ctx context.Context) *FunctionStatsCmd ( ClusterClient) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( ClusterClient) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( ClusterClient) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( ClusterClient) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. ( ClusterClient) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( ClusterClient) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( ClusterClient) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd Get Redis `GET key` command. It returns redis.Nil error when key does not exist. ( ClusterClient) GetBit(ctx context.Context, key string, offset int64) *IntCmd GetDel redis-server version >= 6.2.0. GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0. ( ClusterClient) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( ClusterClient) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( ClusterClient) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( ClusterClient) HExists(ctx context.Context, key, field string) *BoolCmd ( ClusterClient) HGet(ctx context.Context, key, field string) *StringCmd ( ClusterClient) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( ClusterClient) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( ClusterClient) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( ClusterClient) HKeys(ctx context.Context, key string) *StringSliceCmd ( ClusterClient) 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. HRandField redis-server version >= 6.2.0. HRandFieldWithValues redis-server version >= 6.2.0. ( ClusterClient) 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"}) Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` } - HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0 For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface. Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute. ( ClusterClient) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( ClusterClient) HVals(ctx context.Context, key string) *StringSliceCmd ( ClusterClient) Incr(ctx context.Context, key string) *IntCmd ( ClusterClient) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( ClusterClient) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( ClusterClient) Info(ctx context.Context, sections ...string) *StringCmd ( ClusterClient) Keys(ctx context.Context, pattern string) *StringSliceCmd ( ClusterClient) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( ClusterClient) LIndex(ctx context.Context, key string, index int64) *StringCmd ( ClusterClient) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( ClusterClient) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( ClusterClient) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( ClusterClient) LLen(ctx context.Context, key string) *IntCmd LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2") ( ClusterClient) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( ClusterClient) LPop(ctx context.Context, key string) *StringCmd ( ClusterClient) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( ClusterClient) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd ( ClusterClient) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd ( ClusterClient) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( ClusterClient) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( ClusterClient) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( ClusterClient) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( ClusterClient) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( ClusterClient) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( ClusterClient) LastSave(ctx context.Context) *IntCmd ( ClusterClient) 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"}) - MSet(struct), For struct types, see HSet description. 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"}) - MSetNX(struct), For struct types, see HSet description. MasterForKey return a client to the master node for a particular key. ( ClusterClient) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( ClusterClient) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( ClusterClient) Move(ctx context.Context, key string, db int) *BoolCmd ( ClusterClient) ObjectEncoding(ctx context.Context, key string) *StringCmd ( ClusterClient) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( ClusterClient) ObjectRefCount(ctx context.Context, key string) *IntCmd (*ClusterClient) OnNewNode(fn func(rdb *Client)) Options returns read-only Options that were used to create the client. ( ClusterClient) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( ClusterClient) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( ClusterClient) PExpireTime(ctx context.Context, key string) *DurationCmd ( ClusterClient) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( ClusterClient) PFCount(ctx context.Context, keys ...string) *IntCmd ( ClusterClient) 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. ( ClusterClient) PTTL(ctx context.Context, key string) *DurationCmd ( ClusterClient) Persist(ctx context.Context, key string) *BoolCmd ( ClusterClient) Ping(ctx context.Context) *StatusCmd (*ClusterClient) Pipeline() Pipeliner (*ClusterClient) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) PoolStats returns accumulated connection pool stats. (*ClusterClient) Process(ctx context.Context, cmd Cmder) error ( ClusterClient) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( ClusterClient) PubSubNumPat(ctx context.Context) *IntCmd ( ClusterClient) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( ClusterClient) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( ClusterClient) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd Publish posts the message to the channel. ( ClusterClient) Quit(_ context.Context) *StatusCmd ( ClusterClient) RPop(ctx context.Context, key string) *StringCmd ( ClusterClient) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( ClusterClient) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( ClusterClient) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( ClusterClient) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( ClusterClient) RandomKey(ctx context.Context) *StringCmd ( ClusterClient) ReadOnly(ctx context.Context) *StatusCmd ( ClusterClient) ReadWrite(ctx context.Context) *StatusCmd ReloadState reloads cluster state. If available it calls ClusterSlots func to get cluster slots information. ( ClusterClient) Rename(ctx context.Context, key, newkey string) *StatusCmd ( ClusterClient) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( ClusterClient) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( ClusterClient) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( ClusterClient) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( ClusterClient) SCard(ctx context.Context, key string) *IntCmd ( ClusterClient) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( ClusterClient) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( ClusterClient) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( ClusterClient) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( ClusterClient) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( ClusterClient) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd SMIsMember Redis `SMISMEMBER key member [member ...]` command. SMembers Redis `SMEMBERS key` command output as a slice. SMembersMap Redis `SMEMBERS key` command output as a map. ( ClusterClient) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd SPop Redis `SPOP key` command. SPopN Redis `SPOP key count` command. ( ClusterClient) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd SRandMember Redis `SRANDMEMBER key` command. SRandMemberN Redis `SRANDMEMBER key count` command. ( ClusterClient) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( ClusterClient) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd SSubscribe Subscribes the client to the specified shard channels. ( ClusterClient) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( ClusterClient) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( ClusterClient) Save(ctx context.Context) *StatusCmd ( ClusterClient) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( ClusterClient) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd (*ClusterClient) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd (*ClusterClient) ScriptFlush(ctx context.Context) *StatusCmd ( ClusterClient) ScriptKill(ctx context.Context) *StatusCmd (*ClusterClient) ScriptLoad(ctx context.Context, script string) *StringCmd Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options. ( ClusterClient) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd SetEx Redis `SETEx key expiration value` command. SetNX Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( ClusterClient) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd SetXX Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( ClusterClient) Shutdown(ctx context.Context) *StatusCmd ( ClusterClient) ShutdownNoSave(ctx context.Context) *StatusCmd ( ClusterClient) ShutdownSave(ctx context.Context) *StatusCmd SlaveForKey gets a client for a replica node to run any command on it. This is especially useful if we want to run a particular lua script which has only read only commands on the replica. This is because other redis commands generally have a flag that points that they are read only and automatically run on the replica nodes if ClusterOptions.ReadOnly flag is set to true. ( ClusterClient) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( ClusterClient) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( ClusterClient) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( ClusterClient) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( ClusterClient) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( ClusterClient) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( ClusterClient) StrLen(ctx context.Context, key string) *IntCmd Subscribe subscribes the client to the specified channels. Channels can be omitted to create empty subscription. ( ClusterClient) Sync(_ context.Context) ( ClusterClient) TTL(ctx context.Context, key string) *DurationCmd ( ClusterClient) Time(ctx context.Context) *TimeCmd ( ClusterClient) Touch(ctx context.Context, keys ...string) *IntCmd TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. (*ClusterClient) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( ClusterClient) Type(ctx context.Context, key string) *StatusCmd ( ClusterClient) Unlink(ctx context.Context, keys ...string) *IntCmd ( ClusterClient) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd (*ClusterClient) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error ( ClusterClient) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( ClusterClient) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( ClusterClient) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( ClusterClient) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( ClusterClient) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( ClusterClient) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( ClusterClient) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( ClusterClient) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( ClusterClient) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( ClusterClient) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( ClusterClient) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( ClusterClient) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( ClusterClient) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( ClusterClient) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( ClusterClient) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( ClusterClient) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0. ( ClusterClient) XLen(ctx context.Context, stream string) *IntCmd ( ClusterClient) XPending(ctx context.Context, stream, group string) *XPendingCmd ( ClusterClient) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( ClusterClient) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( ClusterClient) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( ClusterClient) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( ClusterClient) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( ClusterClient) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( ClusterClient) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( ClusterClient) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen ( ClusterClient) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( ClusterClient) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( ClusterClient) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ZAdd Redis `ZADD key score member [score member ...]` command. ( ClusterClient) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( ClusterClient) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZAddGT Redis `ZADD key GT score member [score member ...]` command. ZAddLT Redis `ZADD key LT score member [score member ...]` command. ZAddNX Redis `ZADD key NX score member [score member ...]` command. ZAddXX Redis `ZADD key XX score member [score member ...]` command. ( ClusterClient) ZCard(ctx context.Context, key string) *IntCmd ( ClusterClient) ZCount(ctx context.Context, key, min, max string) *IntCmd ZDiff redis-server version >= 6.2.0. ZDiffStore redis-server version >=6.2.0. ZDiffWithScores redis-server version >= 6.2.0. ( ClusterClient) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( ClusterClient) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( ClusterClient) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( ClusterClient) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( ClusterClient) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( ClusterClient) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2") ( ClusterClient) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( ClusterClient) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( ClusterClient) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ZRandMember redis-server version >= 6.2.0. ZRandMemberWithScores redis-server version >= 6.2.0. ( ClusterClient) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( ClusterClient) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( ClusterClient) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( ClusterClient) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( ClusterClient) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( ClusterClient) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( ClusterClient) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( ClusterClient) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( ClusterClient) ZRank(ctx context.Context, key, member string) *IntCmd ( ClusterClient) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( ClusterClient) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( ClusterClient) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( ClusterClient) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( ClusterClient) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( ClusterClient) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( ClusterClient) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( ClusterClient) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( ClusterClient) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( ClusterClient) ZRevRank(ctx context.Context, key, member string) *IntCmd ( ClusterClient) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( ClusterClient) ZScore(ctx context.Context, key, member string) *FloatCmd ( ClusterClient) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( ClusterClient) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( ClusterClient) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *ClusterClient : Cmdable *ClusterClient : Scripter *ClusterClient : UniversalClient *ClusterClient : github.com/prometheus/common/expfmt.Closer *ClusterClient : io.Closer func NewClusterClient(opt *ClusterOptions) *ClusterClient func NewFailoverClusterClient(failoverOpt *FailoverOptions) *ClusterClient
(*ClusterLinksCmd) Args() []interface{} (*ClusterLinksCmd) Err() error (*ClusterLinksCmd) FullName() string (*ClusterLinksCmd) Name() string (*ClusterLinksCmd) Result() ([]ClusterLink, error) (*ClusterLinksCmd) SetErr(e error) (*ClusterLinksCmd) SetFirstKeyPos(keyPos int8) (*ClusterLinksCmd) SetVal(val []ClusterLink) (*ClusterLinksCmd) String() string (*ClusterLinksCmd) Val() []ClusterLink *ClusterLinksCmd : Cmder *ClusterLinksCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *ClusterLinksCmd : expvar.Var *ClusterLinksCmd : fmt.Stringer func NewClusterLinksCmd(ctx context.Context, args ...interface{}) *ClusterLinksCmd func Cmdable.ClusterLinks(ctx context.Context) *ClusterLinksCmd func Pipeliner.ClusterLinks(ctx context.Context) *ClusterLinksCmd func StatefulCmdable.ClusterLinks(ctx context.Context) *ClusterLinksCmd func UniversalClient.ClusterLinks(ctx context.Context) *ClusterLinksCmd
Addr string ID string NetworkingMetadata map[string]string func github.com/hibiken/asynq/internal/rdb.(*RDB).ClusterNodes(qname string) ([]ClusterNode, error)
ClusterOptions are used to configure a cluster client and should be passed to NewClusterClient. A seed list of host:port addresses of cluster nodes. ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. 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. ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration ContextTimeoutEnabled bool DialTimeout time.Duration Dialer func(ctx context.Context, network, addr string) (net.Conn, error) MaxIdleConns int 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 PoolFIFO bool // 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 ParseClusterURL(redisURL string) (*ClusterOptions, error) func (*ClusterClient).Options() *ClusterOptions func (*UniversalOptions).Cluster() *ClusterOptions func NewClusterClient(opt *ClusterOptions) *ClusterClient
Nodes []Node Slots []SlotRange func (*ClusterShardsCmd).Result() ([]ClusterShard, error) func (*ClusterShardsCmd).Val() []ClusterShard func (*ClusterShardsCmd).SetVal(val []ClusterShard)
(*ClusterShardsCmd) Args() []interface{} (*ClusterShardsCmd) Err() error (*ClusterShardsCmd) FullName() string (*ClusterShardsCmd) Name() string (*ClusterShardsCmd) Result() ([]ClusterShard, error) (*ClusterShardsCmd) SetErr(e error) (*ClusterShardsCmd) SetFirstKeyPos(keyPos int8) (*ClusterShardsCmd) SetVal(val []ClusterShard) (*ClusterShardsCmd) String() string (*ClusterShardsCmd) Val() []ClusterShard *ClusterShardsCmd : Cmder *ClusterShardsCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *ClusterShardsCmd : expvar.Var *ClusterShardsCmd : fmt.Stringer func NewClusterShardsCmd(ctx context.Context, args ...interface{}) *ClusterShardsCmd func Cmdable.ClusterShards(ctx context.Context) *ClusterShardsCmd func Pipeliner.ClusterShards(ctx context.Context) *ClusterShardsCmd func StatefulCmdable.ClusterShards(ctx context.Context) *ClusterShardsCmd func UniversalClient.ClusterShards(ctx context.Context) *ClusterShardsCmd
End int Nodes []ClusterNode Start int func (*ClusterSlotsCmd).Result() ([]ClusterSlot, error) func (*ClusterSlotsCmd).Val() []ClusterSlot func NewClusterSlotsCmdResult(val []ClusterSlot, err error) *ClusterSlotsCmd func (*ClusterSlotsCmd).SetVal(val []ClusterSlot)
(*ClusterSlotsCmd) Args() []interface{} (*ClusterSlotsCmd) Err() error (*ClusterSlotsCmd) FullName() string (*ClusterSlotsCmd) Name() string (*ClusterSlotsCmd) Result() ([]ClusterSlot, error) (*ClusterSlotsCmd) SetErr(e error) (*ClusterSlotsCmd) SetFirstKeyPos(keyPos int8) (*ClusterSlotsCmd) SetVal(val []ClusterSlot) (*ClusterSlotsCmd) String() string (*ClusterSlotsCmd) Val() []ClusterSlot *ClusterSlotsCmd : Cmder *ClusterSlotsCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *ClusterSlotsCmd : expvar.Var *ClusterSlotsCmd : 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
(*Cmd) Args() []interface{} (*Cmd) Bool() (bool, error) (*Cmd) BoolSlice() ([]bool, error) (*Cmd) Err() error (*Cmd) Float32() (float32, error) (*Cmd) Float32Slice() ([]float32, error) (*Cmd) Float64() (float64, error) (*Cmd) Float64Slice() ([]float64, error) (*Cmd) FullName() string (*Cmd) Int() (int, error) (*Cmd) Int64() (int64, error) (*Cmd) Int64Slice() ([]int64, error) (*Cmd) Name() string (*Cmd) Result() (interface{}, error) (*Cmd) SetErr(e error) (*Cmd) SetFirstKeyPos(keyPos int8) (*Cmd) SetVal(val interface{}) (*Cmd) Slice() ([]interface{}, error) (*Cmd) String() string (*Cmd) StringSlice() ([]string, error) (*Cmd) Text() (string, error) (*Cmd) Uint64() (uint64, error) (*Cmd) Uint64Slice() ([]uint64, error) (*Cmd) Val() interface{} *Cmd : Cmder *Cmd : github.com/polarsignals/frostdb/query/logicalplan.Named *Cmd : expvar.Var *Cmd : 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.EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func Cmdable.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func Cmdable.EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func Cmdable.FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd func Cmdable.FCallRo(ctx context.Context, function 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.EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func Pipeliner.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func Pipeliner.EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func Pipeliner.FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd func Pipeliner.FCallRo(ctx context.Context, function 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).EvalRO(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).EvalShaRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd func (*Script).Run(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd func (*Script).RunRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd func Scripter.Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func Scripter.EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func Scripter.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func Scripter.EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func StatefulCmdable.Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func StatefulCmdable.EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func StatefulCmdable.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func StatefulCmdable.EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func StatefulCmdable.FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd func StatefulCmdable.FCallRo(ctx context.Context, function 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.EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd func UniversalClient.EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func UniversalClient.EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd func UniversalClient.FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd func UniversalClient.FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
( Cmdable) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd ( Cmdable) Append(ctx context.Context, key, value string) *IntCmd ( Cmdable) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( Cmdable) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( Cmdable) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Cmdable) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Cmdable) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( Cmdable) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( Cmdable) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( Cmdable) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( Cmdable) BgRewriteAOF(ctx context.Context) *StatusCmd ( Cmdable) BgSave(ctx context.Context) *StatusCmd ( Cmdable) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( Cmdable) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( Cmdable) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( Cmdable) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( Cmdable) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( Cmdable) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( Cmdable) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( Cmdable) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd ( Cmdable) ClientGetName(ctx context.Context) *StringCmd ( Cmdable) ClientID(ctx context.Context) *IntCmd ( Cmdable) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( Cmdable) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( Cmdable) ClientList(ctx context.Context) *StringCmd ( Cmdable) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( Cmdable) ClientUnblock(ctx context.Context, id int64) *IntCmd ( Cmdable) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( Cmdable) ClientUnpause(ctx context.Context) *BoolCmd ( Cmdable) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( Cmdable) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Cmdable) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( Cmdable) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( Cmdable) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( Cmdable) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Cmdable) ClusterFailover(ctx context.Context) *StatusCmd ( Cmdable) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( Cmdable) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( Cmdable) ClusterInfo(ctx context.Context) *StringCmd ( Cmdable) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( Cmdable) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( Cmdable) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( Cmdable) ClusterNodes(ctx context.Context) *StringCmd ( Cmdable) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( Cmdable) ClusterResetHard(ctx context.Context) *StatusCmd ( Cmdable) ClusterResetSoft(ctx context.Context) *StatusCmd ( Cmdable) ClusterSaveConfig(ctx context.Context) *StatusCmd ( Cmdable) ClusterShards(ctx context.Context) *ClusterShardsCmd ( Cmdable) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( Cmdable) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( Cmdable) Command(ctx context.Context) *CommandsInfoCmd ( Cmdable) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( Cmdable) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( Cmdable) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( Cmdable) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( Cmdable) ConfigResetStat(ctx context.Context) *StatusCmd ( Cmdable) ConfigRewrite(ctx context.Context) *StatusCmd ( Cmdable) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( Cmdable) Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *IntCmd ( Cmdable) DBSize(ctx context.Context) *IntCmd ( Cmdable) DebugObject(ctx context.Context, key string) *StringCmd ( Cmdable) Decr(ctx context.Context, key string) *IntCmd ( Cmdable) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( Cmdable) Del(ctx context.Context, keys ...string) *IntCmd ( Cmdable) Dump(ctx context.Context, key string) *StringCmd ( Cmdable) Echo(ctx context.Context, message interface{}) *StringCmd ( Cmdable) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Cmdable) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Cmdable) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Cmdable) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Cmdable) Exists(ctx context.Context, keys ...string) *IntCmd ( Cmdable) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Cmdable) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Cmdable) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Cmdable) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Cmdable) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Cmdable) ExpireTime(ctx context.Context, key string) *DurationCmd ( Cmdable) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Cmdable) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Cmdable) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Cmdable) FlushAll(ctx context.Context) *StatusCmd ( Cmdable) FlushAllAsync(ctx context.Context) *StatusCmd ( Cmdable) FlushDB(ctx context.Context) *StatusCmd ( Cmdable) FlushDBAsync(ctx context.Context) *StatusCmd ( Cmdable) FunctionDelete(ctx context.Context, libName string) *StringCmd ( Cmdable) FunctionDump(ctx context.Context) *StringCmd ( Cmdable) FunctionFlush(ctx context.Context) *StringCmd ( Cmdable) FunctionFlushAsync(ctx context.Context) *StringCmd ( Cmdable) FunctionKill(ctx context.Context) *StringCmd ( Cmdable) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( Cmdable) FunctionLoad(ctx context.Context, code string) *StringCmd ( Cmdable) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( Cmdable) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( Cmdable) FunctionStats(ctx context.Context) *FunctionStatsCmd ( Cmdable) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( Cmdable) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( Cmdable) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( Cmdable) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( Cmdable) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( Cmdable) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( Cmdable) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( Cmdable) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( Cmdable) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( Cmdable) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( Cmdable) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd ( Cmdable) Get(ctx context.Context, key string) *StringCmd ( Cmdable) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( Cmdable) GetDel(ctx context.Context, key string) *StringCmd ( Cmdable) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd ( Cmdable) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( Cmdable) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( Cmdable) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( Cmdable) HExists(ctx context.Context, key, field string) *BoolCmd ( Cmdable) HGet(ctx context.Context, key, field string) *StringCmd ( Cmdable) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( Cmdable) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( Cmdable) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( Cmdable) HKeys(ctx context.Context, key string) *StringSliceCmd ( Cmdable) HLen(ctx context.Context, key string) *IntCmd ( Cmdable) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( Cmdable) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( Cmdable) HRandField(ctx context.Context, key string, count int) *StringSliceCmd ( Cmdable) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd ( Cmdable) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Cmdable) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( Cmdable) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( Cmdable) HVals(ctx context.Context, key string) *StringSliceCmd ( Cmdable) Incr(ctx context.Context, key string) *IntCmd ( Cmdable) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( Cmdable) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( Cmdable) Info(ctx context.Context, section ...string) *StringCmd ( Cmdable) Keys(ctx context.Context, pattern string) *StringSliceCmd ( Cmdable) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( Cmdable) LIndex(ctx context.Context, key string, index int64) *StringCmd ( Cmdable) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( Cmdable) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Cmdable) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Cmdable) LLen(ctx context.Context, key string) *IntCmd ( Cmdable) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd ( Cmdable) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( Cmdable) LPop(ctx context.Context, key string) *StringCmd ( Cmdable) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Cmdable) LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd ( Cmdable) LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd ( Cmdable) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Cmdable) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Cmdable) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Cmdable) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( Cmdable) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( Cmdable) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( Cmdable) LastSave(ctx context.Context) *IntCmd ( Cmdable) MGet(ctx context.Context, keys ...string) *SliceCmd ( Cmdable) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( Cmdable) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( Cmdable) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( Cmdable) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( Cmdable) Move(ctx context.Context, key string, db int) *BoolCmd ( Cmdable) ObjectEncoding(ctx context.Context, key string) *StringCmd ( Cmdable) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( Cmdable) ObjectRefCount(ctx context.Context, key string) *IntCmd ( Cmdable) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Cmdable) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Cmdable) PExpireTime(ctx context.Context, key string) *DurationCmd ( Cmdable) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( Cmdable) PFCount(ctx context.Context, keys ...string) *IntCmd ( Cmdable) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( Cmdable) PTTL(ctx context.Context, key string) *DurationCmd ( Cmdable) Persist(ctx context.Context, key string) *BoolCmd ( Cmdable) Ping(ctx context.Context) *StatusCmd ( Cmdable) Pipeline() Pipeliner ( Cmdable) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( Cmdable) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( Cmdable) PubSubNumPat(ctx context.Context) *IntCmd ( Cmdable) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Cmdable) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( Cmdable) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Cmdable) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( Cmdable) Quit(ctx context.Context) *StatusCmd ( Cmdable) RPop(ctx context.Context, key string) *StringCmd ( Cmdable) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Cmdable) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( Cmdable) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Cmdable) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Cmdable) RandomKey(ctx context.Context) *StringCmd ( Cmdable) ReadOnly(ctx context.Context) *StatusCmd ( Cmdable) ReadWrite(ctx context.Context) *StatusCmd ( Cmdable) Rename(ctx context.Context, key, newkey string) *StatusCmd ( Cmdable) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( Cmdable) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Cmdable) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Cmdable) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( Cmdable) SCard(ctx context.Context, key string) *IntCmd ( Cmdable) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Cmdable) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Cmdable) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( Cmdable) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Cmdable) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Cmdable) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( Cmdable) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd ( Cmdable) SMembers(ctx context.Context, key string) *StringSliceCmd ( Cmdable) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( Cmdable) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( Cmdable) SPop(ctx context.Context, key string) *StringCmd ( Cmdable) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( Cmdable) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd ( Cmdable) SRandMember(ctx context.Context, key string) *StringCmd ( Cmdable) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( Cmdable) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Cmdable) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Cmdable) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( Cmdable) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Cmdable) Save(ctx context.Context) *StatusCmd ( Cmdable) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( Cmdable) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( Cmdable) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Cmdable) ScriptFlush(ctx context.Context) *StatusCmd ( Cmdable) ScriptKill(ctx context.Context) *StatusCmd ( Cmdable) ScriptLoad(ctx context.Context, script string) *StringCmd ( Cmdable) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( Cmdable) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd ( Cmdable) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( Cmdable) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( Cmdable) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( Cmdable) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( Cmdable) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( Cmdable) Shutdown(ctx context.Context) *StatusCmd ( Cmdable) ShutdownNoSave(ctx context.Context) *StatusCmd ( Cmdable) ShutdownSave(ctx context.Context) *StatusCmd ( Cmdable) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( Cmdable) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( Cmdable) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Cmdable) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( Cmdable) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Cmdable) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( Cmdable) StrLen(ctx context.Context, key string) *IntCmd ( Cmdable) TTL(ctx context.Context, key string) *DurationCmd ( Cmdable) Time(ctx context.Context) *TimeCmd ( Cmdable) Touch(ctx context.Context, keys ...string) *IntCmd ( Cmdable) TxPipeline() Pipeliner ( Cmdable) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( Cmdable) Type(ctx context.Context, key string) *StatusCmd ( Cmdable) Unlink(ctx context.Context, keys ...string) *IntCmd ( Cmdable) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( Cmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( Cmdable) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( Cmdable) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( Cmdable) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( Cmdable) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( Cmdable) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( Cmdable) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( Cmdable) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Cmdable) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( Cmdable) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Cmdable) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( Cmdable) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( Cmdable) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( Cmdable) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( Cmdable) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd ( Cmdable) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd ( Cmdable) XLen(ctx context.Context, stream string) *IntCmd ( Cmdable) XPending(ctx context.Context, stream, group string) *XPendingCmd ( Cmdable) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( Cmdable) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Cmdable) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( Cmdable) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( Cmdable) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( Cmdable) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( Cmdable) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( Cmdable) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( Cmdable) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd ( Cmdable) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( Cmdable) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( Cmdable) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ( Cmdable) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd ( Cmdable) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( Cmdable) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ( Cmdable) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd ( Cmdable) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd ( Cmdable) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd ( Cmdable) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd ( Cmdable) ZCard(ctx context.Context, key string) *IntCmd ( Cmdable) ZCount(ctx context.Context, key, min, max string) *IntCmd ( Cmdable) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Cmdable) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Cmdable) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd ( Cmdable) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( Cmdable) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( Cmdable) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Cmdable) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( Cmdable) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( Cmdable) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( Cmdable) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( Cmdable) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( Cmdable) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Cmdable) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Cmdable) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd ( Cmdable) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd ( Cmdable) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Cmdable) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( Cmdable) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( Cmdable) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Cmdable) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Cmdable) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Cmdable) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( Cmdable) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Cmdable) ZRank(ctx context.Context, key, member string) *IntCmd ( Cmdable) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Cmdable) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( Cmdable) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( Cmdable) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( Cmdable) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Cmdable) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Cmdable) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Cmdable) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Cmdable) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Cmdable) ZRevRank(ctx context.Context, key, member string) *IntCmd ( Cmdable) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Cmdable) ZScore(ctx context.Context, key, member string) *FloatCmd ( Cmdable) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( Cmdable) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( Cmdable) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Client *ClusterClient *Conn *Pipeline Pipeliner (interface) *Ring StatefulCmdable (interface) *Tx UniversalClient (interface) Cmdable : Scripter
( Cmder) Args() []interface{} ( Cmder) Err() error ( Cmder) FullName() string ( Cmder) Name() string ( Cmder) SetErr(error) ( Cmder) SetFirstKeyPos(int8) ( Cmder) String() string *BoolCmd *BoolSliceCmd *ClusterLinksCmd *ClusterShardsCmd *ClusterSlotsCmd *Cmd *CommandsInfoCmd *DurationCmd *FloatCmd *FloatSliceCmd *FunctionListCmd *FunctionStatsCmd *GeoLocationCmd *GeoPosCmd *GeoSearchLocationCmd *IntCmd *IntSliceCmd *KeyFlagsCmd *KeyValueSliceCmd *KeyValuesCmd *LCSCmd *MapStringIntCmd *MapStringInterfaceCmd *MapStringStringCmd *MapStringStringSliceCmd *ScanCmd *SliceCmd *SlowLogCmd *StatusCmd *StringCmd *StringSliceCmd *StringStructMapCmd *TimeCmd *XAutoClaimCmd *XAutoClaimJustIDCmd *XInfoConsumersCmd *XInfoGroupsCmd *XInfoStreamCmd *XInfoStreamFullCmd *XMessageSliceCmd *XPendingCmd *XPendingExtCmd *XStreamSliceCmd *ZSliceCmd *ZSliceWithKeyCmd *ZWithKeyCmd Cmder : github.com/polarsignals/frostdb/query/logicalplan.Named Cmder : expvar.Var Cmder : 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 (*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 func (*CommandsInfoCmd).SetVal(val map[string]*CommandInfo)
(*CommandsInfoCmd) Args() []interface{} (*CommandsInfoCmd) Err() error (*CommandsInfoCmd) FullName() string (*CommandsInfoCmd) Name() string (*CommandsInfoCmd) Result() (map[string]*CommandInfo, error) (*CommandsInfoCmd) SetErr(e error) (*CommandsInfoCmd) SetFirstKeyPos(keyPos int8) (*CommandsInfoCmd) SetVal(val map[string]*CommandInfo) (*CommandsInfoCmd) String() string (*CommandsInfoCmd) Val() map[string]*CommandInfo *CommandsInfoCmd : Cmder *CommandsInfoCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *CommandsInfoCmd : expvar.Var *CommandsInfoCmd : 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 represents a single Redis connection rather than a pool of connections. Prefer running commands from Client unless there is a specific need for a continuous single Redis connection. ( Conn) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2: client.AddHook(hook-1, hook-2) hook-1: func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } } hook-2: func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } } The execution sequence is: hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed. ( Conn) Append(ctx context.Context, key, value string) *IntCmd ( Conn) Auth(ctx context.Context, password string) *StatusCmd AuthACL 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. ( Conn) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( Conn) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( Conn) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Conn) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Conn) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set") BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. ( Conn) BgRewriteAOF(ctx context.Context) *StatusCmd ( Conn) BgSave(ctx context.Context) *StatusCmd ( Conn) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( Conn) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( Conn) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( Conn) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( Conn) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( Conn) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`. BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte ClientGetName returns the name of the connection. ( Conn) ClientID(ctx context.Context) *IntCmd ( Conn) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( Conn) ClientList(ctx context.Context) *StringCmd ( Conn) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ClientSetName assigns a name to the connection. ( Conn) ClientUnblock(ctx context.Context, id int64) *IntCmd ( Conn) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( Conn) ClientUnpause(ctx context.Context) *BoolCmd 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. ( Conn) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( Conn) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Conn) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( Conn) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( Conn) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( Conn) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Conn) ClusterFailover(ctx context.Context) *StatusCmd ( Conn) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( Conn) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( Conn) ClusterInfo(ctx context.Context) *StringCmd ( Conn) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( Conn) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( Conn) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( Conn) ClusterNodes(ctx context.Context) *StringCmd ( Conn) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( Conn) ClusterResetHard(ctx context.Context) *StatusCmd ( Conn) ClusterResetSoft(ctx context.Context) *StatusCmd ( Conn) ClusterSaveConfig(ctx context.Context) *StatusCmd ( Conn) ClusterShards(ctx context.Context) *ClusterShardsCmd ( Conn) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( Conn) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( Conn) Command(ctx context.Context) *CommandsInfoCmd ( Conn) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( Conn) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( Conn) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( Conn) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( Conn) ConfigResetStat(ctx context.Context) *StatusCmd ( Conn) ConfigRewrite(ctx context.Context) *StatusCmd ( Conn) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( Conn) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd ( Conn) DBSize(ctx context.Context) *IntCmd ( Conn) DebugObject(ctx context.Context, key string) *StringCmd ( Conn) Decr(ctx context.Context, key string) *IntCmd ( Conn) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( Conn) Del(ctx context.Context, keys ...string) *IntCmd ( Conn) Dump(ctx context.Context, key string) *StringCmd ( Conn) Echo(ctx context.Context, message interface{}) *StringCmd ( Conn) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Conn) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Conn) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Conn) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Conn) Exists(ctx context.Context, keys ...string) *IntCmd ( Conn) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Conn) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Conn) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Conn) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Conn) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Conn) ExpireTime(ctx context.Context, key string) *DurationCmd ( Conn) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Conn) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Conn) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Conn) FlushAll(ctx context.Context) *StatusCmd ( Conn) FlushAllAsync(ctx context.Context) *StatusCmd ( Conn) FlushDB(ctx context.Context) *StatusCmd ( Conn) FlushDBAsync(ctx context.Context) *StatusCmd ( Conn) FunctionDelete(ctx context.Context, libName string) *StringCmd ( Conn) FunctionDump(ctx context.Context) *StringCmd ( Conn) FunctionFlush(ctx context.Context) *StringCmd ( Conn) FunctionFlushAsync(ctx context.Context) *StringCmd ( Conn) FunctionKill(ctx context.Context) *StringCmd ( Conn) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( Conn) FunctionLoad(ctx context.Context, code string) *StringCmd ( Conn) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( Conn) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( Conn) FunctionStats(ctx context.Context) *FunctionStatsCmd ( Conn) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( Conn) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( Conn) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( Conn) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. ( Conn) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( Conn) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( Conn) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd Get Redis `GET key` command. It returns redis.Nil error when key does not exist. ( Conn) GetBit(ctx context.Context, key string, offset int64) *IntCmd GetDel redis-server version >= 6.2.0. GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0. ( Conn) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( Conn) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( Conn) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( Conn) HExists(ctx context.Context, key, field string) *BoolCmd ( Conn) HGet(ctx context.Context, key, field string) *StringCmd ( Conn) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( Conn) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( Conn) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( Conn) HKeys(ctx context.Context, key string) *StringSliceCmd ( Conn) 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. HRandField redis-server version >= 6.2.0. HRandFieldWithValues redis-server version >= 6.2.0. ( Conn) 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"}) Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` } - HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0 For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface. Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute. ( Conn) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( Conn) HVals(ctx context.Context, key string) *StringSliceCmd Hello Set the resp protocol used. ( Conn) Incr(ctx context.Context, key string) *IntCmd ( Conn) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( Conn) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( Conn) Info(ctx context.Context, sections ...string) *StringCmd ( Conn) Keys(ctx context.Context, pattern string) *StringSliceCmd ( Conn) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( Conn) LIndex(ctx context.Context, key string, index int64) *StringCmd ( Conn) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( Conn) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Conn) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Conn) LLen(ctx context.Context, key string) *IntCmd LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2") ( Conn) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( Conn) LPop(ctx context.Context, key string) *StringCmd ( Conn) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Conn) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd ( Conn) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd ( Conn) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Conn) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Conn) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Conn) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( Conn) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( Conn) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( Conn) LastSave(ctx context.Context) *IntCmd ( Conn) 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"}) - MSet(struct), For struct types, see HSet description. 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"}) - MSetNX(struct), For struct types, see HSet description. ( Conn) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( Conn) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( Conn) Move(ctx context.Context, key string, db int) *BoolCmd ( Conn) ObjectEncoding(ctx context.Context, key string) *StringCmd ( Conn) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( Conn) ObjectRefCount(ctx context.Context, key string) *IntCmd ( Conn) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Conn) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Conn) PExpireTime(ctx context.Context, key string) *DurationCmd ( Conn) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( Conn) PFCount(ctx context.Context, keys ...string) *IntCmd ( Conn) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( Conn) PTTL(ctx context.Context, key string) *DurationCmd ( Conn) Persist(ctx context.Context, key string) *BoolCmd ( Conn) Ping(ctx context.Context) *StatusCmd (*Conn) Pipeline() Pipeliner (*Conn) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) (*Conn) Process(ctx context.Context, cmd Cmder) error ( Conn) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( Conn) PubSubNumPat(ctx context.Context) *IntCmd ( Conn) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Conn) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( Conn) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd Publish posts the message to the channel. ( Conn) Quit(_ context.Context) *StatusCmd ( Conn) RPop(ctx context.Context, key string) *StringCmd ( Conn) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Conn) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( Conn) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Conn) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Conn) RandomKey(ctx context.Context) *StringCmd ( Conn) ReadOnly(ctx context.Context) *StatusCmd ( Conn) ReadWrite(ctx context.Context) *StatusCmd ( Conn) Rename(ctx context.Context, key, newkey string) *StatusCmd ( Conn) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( Conn) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Conn) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Conn) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( Conn) SCard(ctx context.Context, key string) *IntCmd ( Conn) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Conn) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Conn) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( Conn) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Conn) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Conn) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd SMIsMember Redis `SMISMEMBER key member [member ...]` command. SMembers Redis `SMEMBERS key` command output as a slice. SMembersMap Redis `SMEMBERS key` command output as a map. ( Conn) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd SPop Redis `SPOP key` command. SPopN Redis `SPOP key count` command. ( Conn) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd SRandMember Redis `SRANDMEMBER key` command. SRandMemberN Redis `SRANDMEMBER key count` command. ( Conn) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Conn) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Conn) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( Conn) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Conn) Save(ctx context.Context) *StatusCmd ( Conn) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( Conn) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( Conn) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Conn) ScriptFlush(ctx context.Context) *StatusCmd ( Conn) ScriptKill(ctx context.Context) *StatusCmd ( Conn) ScriptLoad(ctx context.Context, script string) *StringCmd ( Conn) Select(ctx context.Context, index int) *StatusCmd Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options. ( Conn) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd SetEx Redis `SETEx key expiration value` command. SetNX Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Conn) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd SetXX Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Conn) Shutdown(ctx context.Context) *StatusCmd ( Conn) ShutdownNoSave(ctx context.Context) *StatusCmd ( Conn) ShutdownSave(ctx context.Context) *StatusCmd ( Conn) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( Conn) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( Conn) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Conn) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( Conn) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Conn) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( Conn) StrLen(ctx context.Context, key string) *IntCmd (*Conn) String() string ( Conn) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( Conn) Sync(_ context.Context) ( Conn) TTL(ctx context.Context, key string) *DurationCmd ( Conn) Time(ctx context.Context) *TimeCmd ( Conn) Touch(ctx context.Context, keys ...string) *IntCmd TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. (*Conn) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( Conn) Type(ctx context.Context, key string) *StatusCmd ( Conn) Unlink(ctx context.Context, keys ...string) *IntCmd ( Conn) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd ( Conn) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( Conn) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( Conn) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( Conn) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( Conn) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( Conn) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( Conn) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( Conn) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( Conn) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Conn) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( Conn) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Conn) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( Conn) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( Conn) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( Conn) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( Conn) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0. ( Conn) XLen(ctx context.Context, stream string) *IntCmd ( Conn) XPending(ctx context.Context, stream, group string) *XPendingCmd ( Conn) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( Conn) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Conn) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( Conn) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( Conn) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( Conn) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( Conn) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Conn) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen ( Conn) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( Conn) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( Conn) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ZAdd Redis `ZADD key score member [score member ...]` command. ( Conn) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( Conn) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZAddGT Redis `ZADD key GT score member [score member ...]` command. ZAddLT Redis `ZADD key LT score member [score member ...]` command. ZAddNX Redis `ZADD key NX score member [score member ...]` command. ZAddXX Redis `ZADD key XX score member [score member ...]` command. ( Conn) ZCard(ctx context.Context, key string) *IntCmd ( Conn) ZCount(ctx context.Context, key, min, max string) *IntCmd ZDiff redis-server version >= 6.2.0. ZDiffStore redis-server version >=6.2.0. ZDiffWithScores redis-server version >= 6.2.0. ( Conn) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( Conn) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( Conn) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Conn) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( Conn) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( Conn) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2") ( Conn) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( Conn) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Conn) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ZRandMember redis-server version >= 6.2.0. ZRandMemberWithScores redis-server version >= 6.2.0. ( Conn) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Conn) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( Conn) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( Conn) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Conn) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Conn) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Conn) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( Conn) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Conn) ZRank(ctx context.Context, key, member string) *IntCmd ( Conn) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Conn) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( Conn) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( Conn) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( Conn) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Conn) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Conn) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Conn) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Conn) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Conn) ZRevRank(ctx context.Context, key, member string) *IntCmd ( Conn) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Conn) ZScore(ctx context.Context, key, member string) *FloatCmd ( Conn) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( Conn) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( Conn) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Conn : Cmdable Conn : Scripter *Conn : StatefulCmdable *Conn : github.com/prometheus/common/expfmt.Closer *Conn : expvar.Var *Conn : fmt.Stringer *Conn : io.Closer func (*Client).Conn() *Conn
( ConsistentHash) Get(string) string github.com/nats-io/nats.go.Header go.opentelemetry.io/otel/propagation.HeaderCarrier go.opentelemetry.io/otel/propagation.MapCarrier go.opentelemetry.io/otel/propagation.TextMapCarrier (interface) go.opentelemetry.io/otel/trace.TraceState net/http.Header net/mail.Header net/textproto.MIMEHeader net/url.Values reflect.StructTag
func Hook.DialHook(next DialHook) DialHook func Hook.DialHook(next DialHook) DialHook
(*DurationCmd) Args() []interface{} (*DurationCmd) Err() error (*DurationCmd) FullName() string (*DurationCmd) Name() string (*DurationCmd) Result() (time.Duration, error) (*DurationCmd) SetErr(e error) (*DurationCmd) SetFirstKeyPos(keyPos int8) (*DurationCmd) SetVal(val time.Duration) (*DurationCmd) String() string (*DurationCmd) Val() time.Duration *DurationCmd : Cmder *DurationCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *DurationCmd : expvar.Var *DurationCmd : fmt.Stringer func NewDurationCmd(ctx context.Context, precision time.Duration, args ...interface{}) *DurationCmd func NewDurationResult(val time.Duration, err error) *DurationCmd func Cmdable.ExpireTime(ctx context.Context, key string) *DurationCmd func Cmdable.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func Cmdable.PExpireTime(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.ExpireTime(ctx context.Context, key string) *DurationCmd func Pipeliner.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func Pipeliner.PExpireTime(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.ExpireTime(ctx context.Context, key string) *DurationCmd func StatefulCmdable.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func StatefulCmdable.PExpireTime(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.ExpireTime(ctx context.Context, key string) *DurationCmd func UniversalClient.ObjectIdleTime(ctx context.Context, key string) *DurationCmd func UniversalClient.PExpireTime(ctx context.Context, key string) *DurationCmd func UniversalClient.PTTL(ctx context.Context, key string) *DurationCmd func UniversalClient.TTL(ctx context.Context, key string) *DurationCmd
FunctionsCount int64 Language string LibrariesCount int64
( Error) 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/redis/go-redis/v9/internal/proto.RedisError Error : error
FailoverOptions are used to configure a failover client and should be passed to NewFailoverClient. ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration ContextTimeoutEnabled bool DB int DialTimeout time.Duration Dialer func(ctx context.Context, network, addr string) (net.Conn, error) The master name. MaxIdleConns int MaxRetries int MaxRetryBackoff time.Duration MinIdleConns int MinRetryBackoff time.Duration OnConnect func(ctx context.Context, cn *Conn) error Password string PoolFIFO bool PoolSize int PoolTimeout time.Duration ReadTimeout time.Duration Route all commands to replica read-only nodes. Allows routing read-only commands to the closest master or replica node. This option only works with NewFailoverClusterClient. Allows routing read-only commands to the random master or replica 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, or, if SentinelUsername is also supplied, used for ACL-based authentication. If specified with SentinelPassword, enables ACL-based authentication (via AUTH <user> <pass>). TLSConfig *tls.Config Use replicas disconnected with master when cannot get connected replicas Now, this option only works in RandomReplicaAddr function. Username string WriteTimeout time.Duration func (*UniversalOptions).Failover() *FailoverOptions func NewFailoverClient(failoverOpt *FailoverOptions) *Client func NewFailoverClusterClient(failoverOpt *FailoverOptions) *ClusterClient
FilterBy is used for the `CommandList` command parameter. ACLCat string Module string Pattern string func Cmdable.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd func Pipeliner.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd func StatefulCmdable.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd func UniversalClient.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
(*FloatCmd) Args() []interface{} (*FloatCmd) Err() error (*FloatCmd) FullName() string (*FloatCmd) Name() string (*FloatCmd) Result() (float64, error) (*FloatCmd) SetErr(e error) (*FloatCmd) SetFirstKeyPos(keyPos int8) (*FloatCmd) SetVal(val float64) (*FloatCmd) String() string (*FloatCmd) Val() float64 *FloatCmd : Cmder *FloatCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *FloatCmd : expvar.Var *FloatCmd : 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.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd func Cmdable.ZIncrBy(ctx context.Context, key string, increment float64, member string) *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.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd func Pipeliner.ZIncrBy(ctx context.Context, key string, increment float64, member string) *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.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd func StatefulCmdable.ZIncrBy(ctx context.Context, key string, increment float64, member string) *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.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd func UniversalClient.ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd func UniversalClient.ZScore(ctx context.Context, key, member string) *FloatCmd
(*FloatSliceCmd) Args() []interface{} (*FloatSliceCmd) Err() error (*FloatSliceCmd) FullName() string (*FloatSliceCmd) Name() string (*FloatSliceCmd) Result() ([]float64, error) (*FloatSliceCmd) SetErr(e error) (*FloatSliceCmd) SetFirstKeyPos(keyPos int8) (*FloatSliceCmd) SetVal(val []float64) (*FloatSliceCmd) String() string (*FloatSliceCmd) Val() []float64 *FloatSliceCmd : Cmder *FloatSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *FloatSliceCmd : expvar.Var *FloatSliceCmd : fmt.Stringer func NewFloatSliceCmd(ctx context.Context, args ...interface{}) *FloatSliceCmd func Cmdable.ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd func Pipeliner.ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd func StatefulCmdable.ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd func UniversalClient.ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
Description string Flags []string Name string
(*FunctionListCmd) Args() []interface{} (*FunctionListCmd) Err() error (*FunctionListCmd) First() (*Library, error) (*FunctionListCmd) FullName() string (*FunctionListCmd) Name() string (*FunctionListCmd) Result() ([]Library, error) (*FunctionListCmd) SetErr(e error) (*FunctionListCmd) SetFirstKeyPos(keyPos int8) (*FunctionListCmd) SetVal(val []Library) (*FunctionListCmd) String() string (*FunctionListCmd) Val() []Library *FunctionListCmd : Cmder *FunctionListCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *FunctionListCmd : expvar.Var *FunctionListCmd : fmt.Stringer func NewFunctionListCmd(ctx context.Context, args ...interface{}) *FunctionListCmd func Cmdable.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd func Pipeliner.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd func StatefulCmdable.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd func UniversalClient.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
FunctionListQuery is used with FunctionList to query for Redis libraries LibraryNamePattern - Use an empty string to get all libraries. - Use a glob-style pattern to match multiple libraries with a matching name - Use a library's full name to match a single library WithCode - If true, it will return the code of the library LibraryNamePattern string WithCode bool func Cmdable.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd func Pipeliner.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd func StatefulCmdable.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd func UniversalClient.FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
FunctionStats contains information about the scripts currently executing on the server, and the available engines - Engines: Statistics about the engine like number of functions and number of libraries - RunningScript: The script currently running on the shard we're connecting to. For Redis Enterprise and Redis Cloud, this represents the function with the longest running time, across all the running functions, on all shards - RunningScripts All scripts currently running in a Redis Enterprise clustered database. Only available on Redis Enterprise Engines []Engine AllRunningScripts returns all scripts currently running in a Redis Enterprise clustered database. Only available on Redis Enterprise (*FunctionStats) Running() bool (*FunctionStats) RunningScript() (RunningScript, bool) func (*FunctionStatsCmd).Result() (FunctionStats, error) func (*FunctionStatsCmd).Val() FunctionStats func (*FunctionStatsCmd).SetVal(val FunctionStats)
(*FunctionStatsCmd) Args() []interface{} (*FunctionStatsCmd) Err() error (*FunctionStatsCmd) FullName() string (*FunctionStatsCmd) Name() string (*FunctionStatsCmd) Result() (FunctionStats, error) (*FunctionStatsCmd) SetErr(e error) (*FunctionStatsCmd) SetFirstKeyPos(keyPos int8) (*FunctionStatsCmd) SetVal(val FunctionStats) (*FunctionStatsCmd) String() string (*FunctionStatsCmd) Val() FunctionStats *FunctionStatsCmd : Cmder *FunctionStatsCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *FunctionStatsCmd : expvar.Var *FunctionStatsCmd : fmt.Stringer func NewFunctionStatsCmd(ctx context.Context, args ...interface{}) *FunctionStatsCmd func Cmdable.FunctionStats(ctx context.Context) *FunctionStatsCmd func Pipeliner.FunctionStats(ctx context.Context) *FunctionStatsCmd func StatefulCmdable.FunctionStats(ctx context.Context) *FunctionStatsCmd func UniversalClient.FunctionStats(ctx context.Context) *FunctionStatsCmd
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 (*GeoSearchLocationCmd).Result() ([]GeoLocation, error) func (*GeoSearchLocationCmd).Val() []GeoLocation func NewGeoLocationCmdResult(val []GeoLocation, err error) *GeoLocationCmd func Cmdable.GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd func (*GeoLocationCmd).SetVal(locations []GeoLocation) func (*GeoSearchLocationCmd).SetVal(val []GeoLocation) 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
(*GeoLocationCmd) Args() []interface{} (*GeoLocationCmd) Err() error (*GeoLocationCmd) FullName() string (*GeoLocationCmd) Name() string (*GeoLocationCmd) Result() ([]GeoLocation, error) (*GeoLocationCmd) SetErr(e error) (*GeoLocationCmd) SetFirstKeyPos(keyPos int8) (*GeoLocationCmd) SetVal(locations []GeoLocation) (*GeoLocationCmd) String() string (*GeoLocationCmd) Val() []GeoLocation *GeoLocationCmd : Cmder *GeoLocationCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *GeoLocationCmd : expvar.Var *GeoLocationCmd : 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 func (*GeoPosCmd).SetVal(val []*GeoPos)
(*GeoPosCmd) Args() []interface{} (*GeoPosCmd) Err() error (*GeoPosCmd) FullName() string (*GeoPosCmd) Name() string (*GeoPosCmd) Result() ([]*GeoPos, error) (*GeoPosCmd) SetErr(e error) (*GeoPosCmd) SetFirstKeyPos(keyPos int8) (*GeoPosCmd) SetVal(val []*GeoPos) (*GeoPosCmd) String() string (*GeoPosCmd) Val() []*GeoPos *GeoPosCmd : Cmder *GeoPosCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *GeoPosCmd : expvar.Var *GeoPosCmd : 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
(*GeoSearchLocationCmd) Args() []interface{} (*GeoSearchLocationCmd) Err() error (*GeoSearchLocationCmd) FullName() string (*GeoSearchLocationCmd) Name() string (*GeoSearchLocationCmd) Result() ([]GeoLocation, error) (*GeoSearchLocationCmd) SetErr(e error) (*GeoSearchLocationCmd) SetFirstKeyPos(keyPos int8) (*GeoSearchLocationCmd) SetVal(val []GeoLocation) (*GeoSearchLocationCmd) String() string (*GeoSearchLocationCmd) Val() []GeoLocation *GeoSearchLocationCmd : Cmder *GeoSearchLocationCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *GeoSearchLocationCmd : expvar.Var *GeoSearchLocationCmd : fmt.Stringer func NewGeoSearchLocationCmd(ctx context.Context, opt *GeoSearchLocationQuery, args ...interface{}) *GeoSearchLocationCmd func Cmdable.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd func Pipeliner.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd func StatefulCmdable.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd func UniversalClient.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
GeoSearchQuery GeoSearchQuery GeoSearchQuery.BoxHeight float64 GeoSearchQuery.BoxUnit string Height, width and unit when using ByBox option. Can be m, km, ft, or mi. Default is km. GeoSearchQuery.Count int GeoSearchQuery.CountAny bool GeoSearchQuery.Latitude float64 Latitude and Longitude when using FromLonLat option. GeoSearchQuery.Member string Distance and unit when using ByRadius option. Can use m, km, ft, or mi. Default is km. GeoSearchQuery.RadiusUnit string Can be ASC or DESC. Default is no sort order. WithCoord bool WithDist bool WithHash bool func NewGeoSearchLocationCmd(ctx context.Context, opt *GeoSearchLocationQuery, args ...interface{}) *GeoSearchLocationCmd func Cmdable.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd func Pipeliner.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd func StatefulCmdable.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd func UniversalClient.GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
GeoSearchQuery is used for GEOSearch/GEOSearchStore command query. BoxHeight float64 BoxUnit string Height, width and unit when using ByBox option. Can be m, km, ft, or mi. Default is km. Count int CountAny bool Latitude float64 Latitude and Longitude when using FromLonLat option. Member string Distance and unit when using ByRadius option. Can use m, km, ft, or mi. Default is km. RadiusUnit string Can be ASC or DESC. Default is no sort order. func Cmdable.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd func Pipeliner.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd func StatefulCmdable.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd func UniversalClient.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
GeoSearchQuery GeoSearchQuery GeoSearchQuery.BoxHeight float64 GeoSearchQuery.BoxUnit string Height, width and unit when using ByBox option. Can be m, km, ft, or mi. Default is km. GeoSearchQuery.Count int GeoSearchQuery.CountAny bool GeoSearchQuery.Latitude float64 Latitude and Longitude when using FromLonLat option. GeoSearchQuery.Member string Distance and unit when using ByRadius option. Can use m, km, ft, or mi. Default is km. GeoSearchQuery.RadiusUnit string Can be ASC or DESC. Default is no sort order. When using the StoreDist option, the command stores the items in a sorted set populated with their distance from the center of the circle or box, as a floating-point number, in the same unit specified for that shape. func Cmdable.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd func Pipeliner.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd func StatefulCmdable.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd func UniversalClient.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
( Hook) DialHook(next DialHook) DialHook ( Hook) ProcessHook(next ProcessHook) ProcessHook ( Hook) ProcessPipelineHook(next ProcessPipelineHook) ProcessPipelineHook func UniversalClient.AddHook(Hook)
(*IntCmd) Args() []interface{} (*IntCmd) Err() error (*IntCmd) FullName() string (*IntCmd) Name() string (*IntCmd) Result() (int64, error) (*IntCmd) SetErr(e error) (*IntCmd) SetFirstKeyPos(keyPos int8) (*IntCmd) SetVal(val int64) (*IntCmd) String() string (*IntCmd) Uint64() (uint64, error) (*IntCmd) Val() int64 *IntCmd : Cmder *IntCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *IntCmd : expvar.Var *IntCmd : 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.BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd func Cmdable.ClientID(ctx context.Context) *IntCmd func Cmdable.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func Cmdable.ClientUnblock(ctx context.Context, id int64) *IntCmd func Cmdable.ClientUnblockWithError(ctx context.Context, id int64) *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.Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *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.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *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.LPos(ctx context.Context, key string, value string, args LPosArgs) *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.SInterCard(ctx context.Context, limit int64, keys ...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.SPublish(ctx context.Context, channel string, message interface{}) *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.XGroupCreateConsumer(ctx context.Context, stream, group, consumer 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.XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd func Cmdable.XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd func Cmdable.XTrimMinID(ctx context.Context, key string, minID string) *IntCmd func Cmdable.XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd func Cmdable.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func Cmdable.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddXX(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.ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func Cmdable.ZInterCard(ctx context.Context, limit int64, keys ...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.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *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.BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd func Pipeliner.ClientID(ctx context.Context) *IntCmd func Pipeliner.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func Pipeliner.ClientUnblock(ctx context.Context, id int64) *IntCmd func Pipeliner.ClientUnblockWithError(ctx context.Context, id int64) *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.Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *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.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *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.LPos(ctx context.Context, key string, value string, args LPosArgs) *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.SInterCard(ctx context.Context, limit int64, keys ...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.SPublish(ctx context.Context, channel string, message interface{}) *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.XGroupCreateConsumer(ctx context.Context, stream, group, consumer 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.XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd func Pipeliner.XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd func Pipeliner.XTrimMinID(ctx context.Context, key string, minID string) *IntCmd func Pipeliner.XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd func Pipeliner.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func Pipeliner.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddXX(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.ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func Pipeliner.ZInterCard(ctx context.Context, limit int64, keys ...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.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *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.BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd func StatefulCmdable.ClientID(ctx context.Context) *IntCmd func StatefulCmdable.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func StatefulCmdable.ClientUnblock(ctx context.Context, id int64) *IntCmd func StatefulCmdable.ClientUnblockWithError(ctx context.Context, id int64) *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.Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *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.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *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.LPos(ctx context.Context, key string, value string, args LPosArgs) *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.SInterCard(ctx context.Context, limit int64, keys ...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.SPublish(ctx context.Context, channel string, message interface{}) *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.XGroupCreateConsumer(ctx context.Context, stream, group, consumer 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.XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd func StatefulCmdable.XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd func StatefulCmdable.XTrimMinID(ctx context.Context, key string, minID string) *IntCmd func StatefulCmdable.XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd func StatefulCmdable.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func StatefulCmdable.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddXX(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.ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func StatefulCmdable.ZInterCard(ctx context.Context, limit int64, keys ...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.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *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.BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd func UniversalClient.ClientID(ctx context.Context) *IntCmd func UniversalClient.ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd func UniversalClient.ClientUnblock(ctx context.Context, id int64) *IntCmd func UniversalClient.ClientUnblockWithError(ctx context.Context, id int64) *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.Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *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.GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *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.LPos(ctx context.Context, key string, value string, args LPosArgs) *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.SInterCard(ctx context.Context, limit int64, keys ...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.SPublish(ctx context.Context, channel string, message interface{}) *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.XGroupCreateConsumer(ctx context.Context, stream, group, consumer 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.XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd func UniversalClient.XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd func UniversalClient.XTrimMinID(ctx context.Context, key string, minID string) *IntCmd func UniversalClient.XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd func UniversalClient.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func UniversalClient.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddXX(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.ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd func UniversalClient.ZInterCard(ctx context.Context, limit int64, keys ...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.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *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
(*IntSliceCmd) Args() []interface{} (*IntSliceCmd) Err() error (*IntSliceCmd) FullName() string (*IntSliceCmd) Name() string (*IntSliceCmd) Result() ([]int64, error) (*IntSliceCmd) SetErr(e error) (*IntSliceCmd) SetFirstKeyPos(keyPos int8) (*IntSliceCmd) SetVal(val []int64) (*IntSliceCmd) String() string (*IntSliceCmd) Val() []int64 *IntSliceCmd : Cmder *IntSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *IntSliceCmd : expvar.Var *IntSliceCmd : fmt.Stringer func NewIntSliceCmd(ctx context.Context, args ...interface{}) *IntSliceCmd func Cmdable.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd func Cmdable.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd func Pipeliner.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd func Pipeliner.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd func StatefulCmdable.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd func StatefulCmdable.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd func UniversalClient.BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd func UniversalClient.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd
Flags []string Key string func (*KeyFlagsCmd).Result() ([]KeyFlags, error) func (*KeyFlagsCmd).Val() []KeyFlags func (*KeyFlagsCmd).SetVal(val []KeyFlags)
(*KeyFlagsCmd) Args() []interface{} (*KeyFlagsCmd) Err() error (*KeyFlagsCmd) FullName() string (*KeyFlagsCmd) Name() string (*KeyFlagsCmd) Result() ([]KeyFlags, error) (*KeyFlagsCmd) SetErr(e error) (*KeyFlagsCmd) SetFirstKeyPos(keyPos int8) (*KeyFlagsCmd) SetVal(val []KeyFlags) (*KeyFlagsCmd) String() string (*KeyFlagsCmd) Val() []KeyFlags *KeyFlagsCmd : Cmder *KeyFlagsCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *KeyFlagsCmd : expvar.Var *KeyFlagsCmd : fmt.Stringer func NewKeyFlagsCmd(ctx context.Context, args ...interface{}) *KeyFlagsCmd func Cmdable.CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd func Pipeliner.CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd func StatefulCmdable.CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd func UniversalClient.CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
Key string Value string func (*KeyValueSliceCmd).Result() ([]KeyValue, error) func (*KeyValueSliceCmd).Val() []KeyValue func (*KeyValueSliceCmd).SetVal(val []KeyValue)
(*KeyValuesCmd) Args() []interface{} (*KeyValuesCmd) Err() error (*KeyValuesCmd) FullName() string (*KeyValuesCmd) Name() string (*KeyValuesCmd) Result() (string, []string, error) (*KeyValuesCmd) SetErr(e error) (*KeyValuesCmd) SetFirstKeyPos(keyPos int8) (*KeyValuesCmd) SetVal(key string, val []string) (*KeyValuesCmd) String() string (*KeyValuesCmd) Val() (string, []string) *KeyValuesCmd : Cmder *KeyValuesCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *KeyValuesCmd : expvar.Var *KeyValuesCmd : fmt.Stringer func NewKeyValuesCmd(ctx context.Context, args ...interface{}) *KeyValuesCmd func Cmdable.BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd func Cmdable.LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd func Pipeliner.BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd func Pipeliner.LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd func StatefulCmdable.BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd func StatefulCmdable.LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd func UniversalClient.BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd func UniversalClient.LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
(*KeyValueSliceCmd) Args() []interface{} (*KeyValueSliceCmd) Err() error (*KeyValueSliceCmd) FullName() string (*KeyValueSliceCmd) Name() string (*KeyValueSliceCmd) Result() ([]KeyValue, error) (*KeyValueSliceCmd) SetErr(e error) (*KeyValueSliceCmd) SetFirstKeyPos(keyPos int8) (*KeyValueSliceCmd) SetVal(val []KeyValue) (*KeyValueSliceCmd) String() string (*KeyValueSliceCmd) Val() []KeyValue *KeyValueSliceCmd : Cmder *KeyValueSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *KeyValueSliceCmd : expvar.Var *KeyValueSliceCmd : fmt.Stringer func NewKeyValueSliceCmd(ctx context.Context, args ...interface{}) *KeyValueSliceCmd func Cmdable.HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd func Pipeliner.HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd func StatefulCmdable.HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd func UniversalClient.HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
(*LCSCmd) Args() []interface{} (*LCSCmd) Err() error (*LCSCmd) FullName() string (*LCSCmd) Name() string (*LCSCmd) Result() (*LCSMatch, error) (*LCSCmd) SetErr(e error) (*LCSCmd) SetFirstKeyPos(keyPos int8) (*LCSCmd) SetVal(val *LCSMatch) (*LCSCmd) String() string (*LCSCmd) Val() *LCSMatch *LCSCmd : Cmder *LCSCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *LCSCmd : expvar.Var *LCSCmd : fmt.Stringer func NewLCSCmd(ctx context.Context, q *LCSQuery) *LCSCmd func Cmdable.LCS(ctx context.Context, q *LCSQuery) *LCSCmd func Pipeliner.LCS(ctx context.Context, q *LCSQuery) *LCSCmd func StatefulCmdable.LCS(ctx context.Context, q *LCSQuery) *LCSCmd func UniversalClient.LCS(ctx context.Context, q *LCSQuery) *LCSCmd
LCSMatch is the result set of the LCS command. Len int64 MatchString string Matches []LCSMatchedPosition func (*LCSCmd).Result() (*LCSMatch, error) func (*LCSCmd).Val() *LCSMatch func (*LCSCmd).SetVal(val *LCSMatch)
Key1 LCSPosition Key2 LCSPosition only for withMatchLen is true
End int64 Start int64
LCSQuery is a parameter used for the LCS command Idx bool Key1 string Key2 string Len bool MinMatchLen int WithMatchLen bool func NewLCSCmd(ctx context.Context, q *LCSQuery) *LCSCmd func Cmdable.LCS(ctx context.Context, q *LCSQuery) *LCSCmd func Pipeliner.LCS(ctx context.Context, q *LCSQuery) *LCSCmd func StatefulCmdable.LCS(ctx context.Context, q *LCSQuery) *LCSCmd func UniversalClient.LCS(ctx context.Context, q *LCSQuery) *LCSCmd
Code string Engine string Functions []Function Name string func (*FunctionListCmd).First() (*Library, error) func (*FunctionListCmd).Result() ([]Library, error) func (*FunctionListCmd).Val() []Library func (*FunctionListCmd).SetVal(val []Library)
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.
MaxLen int64 Rank int64 func Cmdable.LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd func Cmdable.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd func Pipeliner.LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd func Pipeliner.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd func StatefulCmdable.LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd func StatefulCmdable.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd func UniversalClient.LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd func UniversalClient.LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd
(*MapStringIntCmd) Args() []interface{} (*MapStringIntCmd) Err() error (*MapStringIntCmd) FullName() string (*MapStringIntCmd) Name() string (*MapStringIntCmd) Result() (map[string]int64, error) (*MapStringIntCmd) SetErr(e error) (*MapStringIntCmd) SetFirstKeyPos(keyPos int8) (*MapStringIntCmd) SetVal(val map[string]int64) (*MapStringIntCmd) String() string (*MapStringIntCmd) Val() map[string]int64 *MapStringIntCmd : Cmder *MapStringIntCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *MapStringIntCmd : expvar.Var *MapStringIntCmd : fmt.Stringer func NewMapStringIntCmd(ctx context.Context, args ...interface{}) *MapStringIntCmd func NewMapStringIntCmdResult(val map[string]int64, err error) *MapStringIntCmd func Cmdable.PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd func Cmdable.PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd func Pipeliner.PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd func Pipeliner.PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd func StatefulCmdable.PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd func StatefulCmdable.PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd func UniversalClient.PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd func UniversalClient.PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
(*MapStringInterfaceCmd) Args() []interface{} (*MapStringInterfaceCmd) Err() error (*MapStringInterfaceCmd) FullName() string (*MapStringInterfaceCmd) Name() string (*MapStringInterfaceCmd) Result() (map[string]interface{}, error) (*MapStringInterfaceCmd) SetErr(e error) (*MapStringInterfaceCmd) SetFirstKeyPos(keyPos int8) (*MapStringInterfaceCmd) SetVal(val map[string]interface{}) (*MapStringInterfaceCmd) String() string (*MapStringInterfaceCmd) Val() map[string]interface{} *MapStringInterfaceCmd : Cmder *MapStringInterfaceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *MapStringInterfaceCmd : expvar.Var *MapStringInterfaceCmd : fmt.Stringer func NewMapStringInterfaceCmd(ctx context.Context, args ...interface{}) *MapStringInterfaceCmd func Pipeliner.Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd func StatefulCmdable.Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd
(*MapStringStringCmd) Args() []interface{} (*MapStringStringCmd) Err() error (*MapStringStringCmd) FullName() string (*MapStringStringCmd) Name() string (*MapStringStringCmd) Result() (map[string]string, error) Scan scans the results from the map into a destination struct. The map keys are matched in the Redis struct fields by the `redis:"field"` tag. (*MapStringStringCmd) SetErr(e error) (*MapStringStringCmd) SetFirstKeyPos(keyPos int8) (*MapStringStringCmd) SetVal(val map[string]string) (*MapStringStringCmd) String() string (*MapStringStringCmd) Val() map[string]string *MapStringStringCmd : Cmder *MapStringStringCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *MapStringStringCmd : database/sql.Scanner *MapStringStringCmd : expvar.Var *MapStringStringCmd : fmt.Stringer func NewMapStringStringCmd(ctx context.Context, args ...interface{}) *MapStringStringCmd func NewMapStringStringResult(val map[string]string, err error) *MapStringStringCmd func Cmdable.ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd func Cmdable.HGetAll(ctx context.Context, key string) *MapStringStringCmd func Pipeliner.ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd func Pipeliner.HGetAll(ctx context.Context, key string) *MapStringStringCmd func (*SentinelClient).Master(ctx context.Context, name string) *MapStringStringCmd func StatefulCmdable.ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd func StatefulCmdable.HGetAll(ctx context.Context, key string) *MapStringStringCmd func UniversalClient.ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd func UniversalClient.HGetAll(ctx context.Context, key string) *MapStringStringCmd
(*MapStringStringSliceCmd) Args() []interface{} (*MapStringStringSliceCmd) Err() error (*MapStringStringSliceCmd) FullName() string (*MapStringStringSliceCmd) Name() string (*MapStringStringSliceCmd) Result() ([]map[string]string, error) (*MapStringStringSliceCmd) SetErr(e error) (*MapStringStringSliceCmd) SetFirstKeyPos(keyPos int8) (*MapStringStringSliceCmd) SetVal(val []map[string]string) (*MapStringStringSliceCmd) String() string (*MapStringStringSliceCmd) Val() []map[string]string *MapStringStringSliceCmd : Cmder *MapStringStringSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *MapStringStringSliceCmd : expvar.Var *MapStringStringSliceCmd : fmt.Stringer func NewMapStringStringSliceCmd(ctx context.Context, args ...interface{}) *MapStringStringSliceCmd func (*SentinelClient).Replicas(ctx context.Context, name string) *MapStringStringSliceCmd func (*SentinelClient).Sentinels(ctx context.Context, name string) *MapStringStringSliceCmd
Message received as result of a PUBLISH command issued by another client. Channel string Pattern string Payload string PayloadSlice []string (*Message) String() string *Message : expvar.Var *Message : fmt.Stringer func (*PubSub).Channel(opts ...ChannelOption) <-chan *Message func (*PubSub).ChannelSize(size int) <-chan *Message func (*PubSub).ReceiveMessage(ctx context.Context) (*Message, error)
Options keeps the settings to set up redis connection. host:port address. ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. ConnMaxIdleTime is the maximum amount of time a connection may be idle. Should be less than server's timeout. Expired connections may be closed lazily before reuse. If d <= 0, connections are not closed due to a connection's idle time. Default is 30 minutes. -1 disables idle timeout check. ConnMaxLifetime is the maximum amount of time a connection may be reused. Expired connections may be closed lazily before reuse. If <= 0, connections are not closed due to a connection's age. Default is to not close idle connections. ContextTimeoutEnabled controls whether the client respects context timeouts and deadlines. See https://redis.uptrace.dev/guide/go-redis-debugging.html#timeouts CredentialsProvider allows the username and password to be updated before reconnecting. It should return the current username and password. 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. Limiter interface used to implement circuit breaker or rate limiter. Maximum number of idle connections. Maximum number of retries before giving up. Default is 3 retries; -1 (not 0) disables 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. Type of connection pool. true for FIFO pool, false for LIFO pool. Note that FIFO has slightly higher overhead compared to LIFO, but it helps closing idle connections faster reducing the pool size. Maximum number of socket connections. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. 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. Supported values: - `0` - default timeout (3 seconds). - `-1` - no timeout (block indefinitely). - `-2` - disables SetReadDeadline calls completely. 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. Supported values: - `0` - default timeout (3 seconds). - `-1` - no timeout (block indefinitely). - `-2` - disables SetWriteDeadline calls completely. func ParseURL(redisURL string) (*Options, error) func (*Client).Options() *Options func (*UniversalOptions).Simple() *Options func NewClient(opt *Options) *Client func NewDialer(opt *Options) func(context.Context, string, string) (net.Conn, error) func NewSentinelClient(opt *Options) *SentinelClient
Pipeline implements pipelining as described in http://redis.io/topics/pipelining. Please note: it is not safe for concurrent use by multiple goroutines. ( Pipeline) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd ( Pipeline) Append(ctx context.Context, key, value string) *IntCmd ( Pipeline) Auth(ctx context.Context, password string) *StatusCmd AuthACL 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. ( Pipeline) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( Pipeline) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( Pipeline) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Pipeline) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Pipeline) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set") BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. ( Pipeline) BgRewriteAOF(ctx context.Context) *StatusCmd ( Pipeline) BgSave(ctx context.Context) *StatusCmd ( Pipeline) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( Pipeline) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( Pipeline) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( Pipeline) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( Pipeline) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( Pipeline) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`. BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte ClientGetName returns the name of the connection. ( Pipeline) ClientID(ctx context.Context) *IntCmd ( Pipeline) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( Pipeline) ClientList(ctx context.Context) *StringCmd ( Pipeline) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ClientSetName assigns a name to the connection. ( Pipeline) ClientUnblock(ctx context.Context, id int64) *IntCmd ( Pipeline) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( Pipeline) ClientUnpause(ctx context.Context) *BoolCmd ( Pipeline) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( Pipeline) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Pipeline) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( Pipeline) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( Pipeline) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( Pipeline) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Pipeline) ClusterFailover(ctx context.Context) *StatusCmd ( Pipeline) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( Pipeline) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( Pipeline) ClusterInfo(ctx context.Context) *StringCmd ( Pipeline) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( Pipeline) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( Pipeline) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( Pipeline) ClusterNodes(ctx context.Context) *StringCmd ( Pipeline) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( Pipeline) ClusterResetHard(ctx context.Context) *StatusCmd ( Pipeline) ClusterResetSoft(ctx context.Context) *StatusCmd ( Pipeline) ClusterSaveConfig(ctx context.Context) *StatusCmd ( Pipeline) ClusterShards(ctx context.Context) *ClusterShardsCmd ( Pipeline) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( Pipeline) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( Pipeline) Command(ctx context.Context) *CommandsInfoCmd ( Pipeline) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( Pipeline) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( Pipeline) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( Pipeline) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( Pipeline) ConfigResetStat(ctx context.Context) *StatusCmd ( Pipeline) ConfigRewrite(ctx context.Context) *StatusCmd ( Pipeline) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( Pipeline) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd ( Pipeline) DBSize(ctx context.Context) *IntCmd ( Pipeline) DebugObject(ctx context.Context, key string) *StringCmd ( Pipeline) Decr(ctx context.Context, key string) *IntCmd ( Pipeline) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( Pipeline) Del(ctx context.Context, keys ...string) *IntCmd Discard resets the pipeline and discards queued commands. Do queues the custom command for later execution. ( Pipeline) Dump(ctx context.Context, key string) *StringCmd ( Pipeline) Echo(ctx context.Context, message interface{}) *StringCmd ( Pipeline) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Pipeline) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Pipeline) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Pipeline) EvalShaRO(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. ( Pipeline) Exists(ctx context.Context, keys ...string) *IntCmd ( Pipeline) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeline) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Pipeline) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeline) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeline) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeline) ExpireTime(ctx context.Context, key string) *DurationCmd ( Pipeline) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeline) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Pipeline) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Pipeline) FlushAll(ctx context.Context) *StatusCmd ( Pipeline) FlushAllAsync(ctx context.Context) *StatusCmd ( Pipeline) FlushDB(ctx context.Context) *StatusCmd ( Pipeline) FlushDBAsync(ctx context.Context) *StatusCmd ( Pipeline) FunctionDelete(ctx context.Context, libName string) *StringCmd ( Pipeline) FunctionDump(ctx context.Context) *StringCmd ( Pipeline) FunctionFlush(ctx context.Context) *StringCmd ( Pipeline) FunctionFlushAsync(ctx context.Context) *StringCmd ( Pipeline) FunctionKill(ctx context.Context) *StringCmd ( Pipeline) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( Pipeline) FunctionLoad(ctx context.Context, code string) *StringCmd ( Pipeline) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( Pipeline) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( Pipeline) FunctionStats(ctx context.Context) *FunctionStatsCmd ( Pipeline) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( Pipeline) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( Pipeline) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( Pipeline) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. ( Pipeline) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( Pipeline) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( Pipeline) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd Get Redis `GET key` command. It returns redis.Nil error when key does not exist. ( Pipeline) GetBit(ctx context.Context, key string, offset int64) *IntCmd GetDel redis-server version >= 6.2.0. GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0. ( Pipeline) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( Pipeline) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( Pipeline) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( Pipeline) HExists(ctx context.Context, key, field string) *BoolCmd ( Pipeline) HGet(ctx context.Context, key, field string) *StringCmd ( Pipeline) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( Pipeline) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( Pipeline) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( Pipeline) HKeys(ctx context.Context, key string) *StringSliceCmd ( Pipeline) 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. HRandField redis-server version >= 6.2.0. HRandFieldWithValues redis-server version >= 6.2.0. ( Pipeline) 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"}) Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` } - HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0 For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface. Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute. ( Pipeline) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( Pipeline) HVals(ctx context.Context, key string) *StringSliceCmd Hello Set the resp protocol used. ( Pipeline) Incr(ctx context.Context, key string) *IntCmd ( Pipeline) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( Pipeline) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( Pipeline) Info(ctx context.Context, sections ...string) *StringCmd ( Pipeline) Keys(ctx context.Context, pattern string) *StringSliceCmd ( Pipeline) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( Pipeline) LIndex(ctx context.Context, key string, index int64) *StringCmd ( Pipeline) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( Pipeline) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Pipeline) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Pipeline) LLen(ctx context.Context, key string) *IntCmd LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2") ( Pipeline) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( Pipeline) LPop(ctx context.Context, key string) *StringCmd ( Pipeline) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Pipeline) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd ( Pipeline) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd ( Pipeline) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeline) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeline) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Pipeline) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( Pipeline) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( Pipeline) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( Pipeline) LastSave(ctx context.Context) *IntCmd Len returns the number of queued commands. ( Pipeline) 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"}) - MSet(struct), For struct types, see HSet description. 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"}) - MSetNX(struct), For struct types, see HSet description. ( Pipeline) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( Pipeline) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( Pipeline) Move(ctx context.Context, key string, db int) *BoolCmd ( Pipeline) ObjectEncoding(ctx context.Context, key string) *StringCmd ( Pipeline) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( Pipeline) ObjectRefCount(ctx context.Context, key string) *IntCmd ( Pipeline) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeline) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Pipeline) PExpireTime(ctx context.Context, key string) *DurationCmd ( Pipeline) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( Pipeline) PFCount(ctx context.Context, keys ...string) *IntCmd ( Pipeline) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( Pipeline) PTTL(ctx context.Context, key string) *DurationCmd ( Pipeline) Persist(ctx context.Context, key string) *BoolCmd ( Pipeline) Ping(ctx context.Context) *StatusCmd (*Pipeline) Pipeline() Pipeliner (*Pipeline) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) Process queues the cmd for later execution. ( Pipeline) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( Pipeline) PubSubNumPat(ctx context.Context) *IntCmd ( Pipeline) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Pipeline) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( Pipeline) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd Publish posts the message to the channel. ( Pipeline) Quit(_ context.Context) *StatusCmd ( Pipeline) RPop(ctx context.Context, key string) *StringCmd ( Pipeline) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Pipeline) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( Pipeline) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeline) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeline) RandomKey(ctx context.Context) *StringCmd ( Pipeline) ReadOnly(ctx context.Context) *StatusCmd ( Pipeline) ReadWrite(ctx context.Context) *StatusCmd ( Pipeline) Rename(ctx context.Context, key, newkey string) *StatusCmd ( Pipeline) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( Pipeline) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Pipeline) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Pipeline) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( Pipeline) SCard(ctx context.Context, key string) *IntCmd ( Pipeline) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Pipeline) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Pipeline) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( Pipeline) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Pipeline) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Pipeline) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd SMIsMember Redis `SMISMEMBER key member [member ...]` command. SMembers Redis `SMEMBERS key` command output as a slice. SMembersMap Redis `SMEMBERS key` command output as a map. ( Pipeline) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd SPop Redis `SPOP key` command. SPopN Redis `SPOP key count` command. ( Pipeline) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd SRandMember Redis `SRANDMEMBER key` command. SRandMemberN Redis `SRANDMEMBER key count` command. ( Pipeline) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Pipeline) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Pipeline) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( Pipeline) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Pipeline) Save(ctx context.Context) *StatusCmd ( Pipeline) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( Pipeline) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( Pipeline) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Pipeline) ScriptFlush(ctx context.Context) *StatusCmd ( Pipeline) ScriptKill(ctx context.Context) *StatusCmd ( Pipeline) ScriptLoad(ctx context.Context, script string) *StringCmd ( Pipeline) Select(ctx context.Context, index int) *StatusCmd Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options. ( Pipeline) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd SetEx Redis `SETEx key expiration value` command. SetNX Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Pipeline) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd SetXX Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Pipeline) Shutdown(ctx context.Context) *StatusCmd ( Pipeline) ShutdownNoSave(ctx context.Context) *StatusCmd ( Pipeline) ShutdownSave(ctx context.Context) *StatusCmd ( Pipeline) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( Pipeline) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( Pipeline) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Pipeline) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( Pipeline) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Pipeline) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( Pipeline) StrLen(ctx context.Context, key string) *IntCmd ( Pipeline) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( Pipeline) Sync(_ context.Context) ( Pipeline) TTL(ctx context.Context, key string) *DurationCmd ( Pipeline) Time(ctx context.Context) *TimeCmd ( Pipeline) Touch(ctx context.Context, keys ...string) *IntCmd (*Pipeline) TxPipeline() Pipeliner (*Pipeline) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( Pipeline) Type(ctx context.Context, key string) *StatusCmd ( Pipeline) Unlink(ctx context.Context, keys ...string) *IntCmd ( Pipeline) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd ( Pipeline) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( Pipeline) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( Pipeline) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( Pipeline) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( Pipeline) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( Pipeline) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( Pipeline) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( Pipeline) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( Pipeline) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Pipeline) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( Pipeline) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Pipeline) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( Pipeline) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( Pipeline) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( Pipeline) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( Pipeline) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0. ( Pipeline) XLen(ctx context.Context, stream string) *IntCmd ( Pipeline) XPending(ctx context.Context, stream, group string) *XPendingCmd ( Pipeline) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( Pipeline) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Pipeline) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( Pipeline) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( Pipeline) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( Pipeline) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( Pipeline) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Pipeline) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen ( Pipeline) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( Pipeline) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( Pipeline) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ZAdd Redis `ZADD key score member [score member ...]` command. ( Pipeline) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( Pipeline) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZAddGT Redis `ZADD key GT score member [score member ...]` command. ZAddLT Redis `ZADD key LT score member [score member ...]` command. ZAddNX Redis `ZADD key NX score member [score member ...]` command. ZAddXX Redis `ZADD key XX score member [score member ...]` command. ( Pipeline) ZCard(ctx context.Context, key string) *IntCmd ( Pipeline) ZCount(ctx context.Context, key, min, max string) *IntCmd ZDiff redis-server version >= 6.2.0. ZDiffStore redis-server version >=6.2.0. ZDiffWithScores redis-server version >= 6.2.0. ( Pipeline) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( Pipeline) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( Pipeline) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Pipeline) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( Pipeline) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( Pipeline) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2") ( Pipeline) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( Pipeline) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Pipeline) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ZRandMember redis-server version >= 6.2.0. ZRandMemberWithScores redis-server version >= 6.2.0. ( Pipeline) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Pipeline) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( Pipeline) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( Pipeline) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeline) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeline) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Pipeline) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( Pipeline) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Pipeline) ZRank(ctx context.Context, key, member string) *IntCmd ( Pipeline) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Pipeline) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( Pipeline) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( Pipeline) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( Pipeline) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Pipeline) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeline) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeline) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Pipeline) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Pipeline) ZRevRank(ctx context.Context, key, member string) *IntCmd ( Pipeline) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Pipeline) ZScore(ctx context.Context, key, member string) *FloatCmd ( Pipeline) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( Pipeline) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( Pipeline) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Pipeline : Cmdable *Pipeline : Pipeliner Pipeline : Scripter *Pipeline : StatefulCmdable
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 single 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. ( Pipeliner) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd ( Pipeliner) Append(ctx context.Context, key, value string) *IntCmd ( Pipeliner) Auth(ctx context.Context, password string) *StatusCmd ( Pipeliner) AuthACL(ctx context.Context, username, password string) *StatusCmd ( Pipeliner) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( Pipeliner) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( Pipeliner) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Pipeliner) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Pipeliner) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( Pipeliner) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( Pipeliner) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( Pipeliner) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( Pipeliner) BgRewriteAOF(ctx context.Context) *StatusCmd ( Pipeliner) BgSave(ctx context.Context) *StatusCmd ( Pipeliner) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( Pipeliner) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( Pipeliner) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( Pipeliner) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( Pipeliner) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( Pipeliner) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( Pipeliner) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( Pipeliner) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd ( Pipeliner) ClientGetName(ctx context.Context) *StringCmd ( Pipeliner) ClientID(ctx context.Context) *IntCmd ( Pipeliner) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( Pipeliner) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( Pipeliner) ClientList(ctx context.Context) *StringCmd ( Pipeliner) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( Pipeliner) ClientSetName(ctx context.Context, name string) *BoolCmd ( Pipeliner) ClientUnblock(ctx context.Context, id int64) *IntCmd ( Pipeliner) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( Pipeliner) ClientUnpause(ctx context.Context) *BoolCmd ( Pipeliner) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( Pipeliner) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Pipeliner) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( Pipeliner) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( Pipeliner) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( Pipeliner) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Pipeliner) ClusterFailover(ctx context.Context) *StatusCmd ( Pipeliner) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( Pipeliner) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( Pipeliner) ClusterInfo(ctx context.Context) *StringCmd ( Pipeliner) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( Pipeliner) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( Pipeliner) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( Pipeliner) ClusterNodes(ctx context.Context) *StringCmd ( Pipeliner) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( Pipeliner) ClusterResetHard(ctx context.Context) *StatusCmd ( Pipeliner) ClusterResetSoft(ctx context.Context) *StatusCmd ( Pipeliner) ClusterSaveConfig(ctx context.Context) *StatusCmd ( Pipeliner) ClusterShards(ctx context.Context) *ClusterShardsCmd ( Pipeliner) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( Pipeliner) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( Pipeliner) Command(ctx context.Context) *CommandsInfoCmd ( Pipeliner) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( Pipeliner) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( Pipeliner) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( Pipeliner) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( Pipeliner) ConfigResetStat(ctx context.Context) *StatusCmd ( Pipeliner) ConfigRewrite(ctx context.Context) *StatusCmd ( Pipeliner) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( Pipeliner) Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *IntCmd ( Pipeliner) DBSize(ctx context.Context) *IntCmd ( Pipeliner) DebugObject(ctx context.Context, key string) *StringCmd ( Pipeliner) Decr(ctx context.Context, key string) *IntCmd ( Pipeliner) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( Pipeliner) Del(ctx context.Context, keys ...string) *IntCmd Discard is to discard all commands in the cache that have not yet been executed. Do is an API for executing any command. If a certain Redis command is not yet supported, you can use Do to execute it. ( Pipeliner) Dump(ctx context.Context, key string) *StringCmd ( Pipeliner) Echo(ctx context.Context, message interface{}) *StringCmd ( Pipeliner) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Pipeliner) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Pipeliner) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Pipeliner) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd Exec is to send all the commands buffered in the pipeline to the redis-server. ( Pipeliner) Exists(ctx context.Context, keys ...string) *IntCmd ( Pipeliner) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeliner) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Pipeliner) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeliner) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeliner) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeliner) ExpireTime(ctx context.Context, key string) *DurationCmd ( Pipeliner) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeliner) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Pipeliner) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Pipeliner) FlushAll(ctx context.Context) *StatusCmd ( Pipeliner) FlushAllAsync(ctx context.Context) *StatusCmd ( Pipeliner) FlushDB(ctx context.Context) *StatusCmd ( Pipeliner) FlushDBAsync(ctx context.Context) *StatusCmd ( Pipeliner) FunctionDelete(ctx context.Context, libName string) *StringCmd ( Pipeliner) FunctionDump(ctx context.Context) *StringCmd ( Pipeliner) FunctionFlush(ctx context.Context) *StringCmd ( Pipeliner) FunctionFlushAsync(ctx context.Context) *StringCmd ( Pipeliner) FunctionKill(ctx context.Context) *StringCmd ( Pipeliner) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( Pipeliner) FunctionLoad(ctx context.Context, code string) *StringCmd ( Pipeliner) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( Pipeliner) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( Pipeliner) FunctionStats(ctx context.Context) *FunctionStatsCmd ( Pipeliner) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( Pipeliner) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( Pipeliner) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( Pipeliner) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( Pipeliner) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( Pipeliner) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( Pipeliner) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( Pipeliner) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( Pipeliner) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( Pipeliner) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( Pipeliner) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd ( Pipeliner) Get(ctx context.Context, key string) *StringCmd ( Pipeliner) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( Pipeliner) GetDel(ctx context.Context, key string) *StringCmd ( Pipeliner) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd ( Pipeliner) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( Pipeliner) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( Pipeliner) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( Pipeliner) HExists(ctx context.Context, key, field string) *BoolCmd ( Pipeliner) HGet(ctx context.Context, key, field string) *StringCmd ( Pipeliner) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( Pipeliner) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( Pipeliner) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( Pipeliner) HKeys(ctx context.Context, key string) *StringSliceCmd ( Pipeliner) HLen(ctx context.Context, key string) *IntCmd ( Pipeliner) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( Pipeliner) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( Pipeliner) HRandField(ctx context.Context, key string, count int) *StringSliceCmd ( Pipeliner) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd ( Pipeliner) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Pipeliner) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeliner) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( Pipeliner) HVals(ctx context.Context, key string) *StringSliceCmd ( Pipeliner) Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd ( Pipeliner) Incr(ctx context.Context, key string) *IntCmd ( Pipeliner) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( Pipeliner) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( Pipeliner) Info(ctx context.Context, section ...string) *StringCmd ( Pipeliner) Keys(ctx context.Context, pattern string) *StringSliceCmd ( Pipeliner) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( Pipeliner) LIndex(ctx context.Context, key string, index int64) *StringCmd ( Pipeliner) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( Pipeliner) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Pipeliner) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Pipeliner) LLen(ctx context.Context, key string) *IntCmd ( Pipeliner) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd ( Pipeliner) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( Pipeliner) LPop(ctx context.Context, key string) *StringCmd ( Pipeliner) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Pipeliner) LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd ( Pipeliner) LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd ( Pipeliner) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeliner) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeliner) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Pipeliner) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( Pipeliner) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( Pipeliner) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( Pipeliner) LastSave(ctx context.Context) *IntCmd Len is to obtain the number of commands in the pipeline that have not yet been executed. ( Pipeliner) MGet(ctx context.Context, keys ...string) *SliceCmd ( Pipeliner) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( Pipeliner) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( Pipeliner) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( Pipeliner) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( Pipeliner) Move(ctx context.Context, key string, db int) *BoolCmd ( Pipeliner) ObjectEncoding(ctx context.Context, key string) *StringCmd ( Pipeliner) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( Pipeliner) ObjectRefCount(ctx context.Context, key string) *IntCmd ( Pipeliner) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Pipeliner) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Pipeliner) PExpireTime(ctx context.Context, key string) *DurationCmd ( Pipeliner) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( Pipeliner) PFCount(ctx context.Context, keys ...string) *IntCmd ( Pipeliner) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( Pipeliner) PTTL(ctx context.Context, key string) *DurationCmd ( Pipeliner) Persist(ctx context.Context, key string) *BoolCmd ( Pipeliner) Ping(ctx context.Context) *StatusCmd ( Pipeliner) Pipeline() Pipeliner ( Pipeliner) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) Process is to put the commands to be executed into the pipeline buffer. ( Pipeliner) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( Pipeliner) PubSubNumPat(ctx context.Context) *IntCmd ( Pipeliner) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Pipeliner) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( Pipeliner) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Pipeliner) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( Pipeliner) Quit(ctx context.Context) *StatusCmd ( Pipeliner) RPop(ctx context.Context, key string) *StringCmd ( Pipeliner) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Pipeliner) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( Pipeliner) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeliner) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Pipeliner) RandomKey(ctx context.Context) *StringCmd ( Pipeliner) ReadOnly(ctx context.Context) *StatusCmd ( Pipeliner) ReadWrite(ctx context.Context) *StatusCmd ( Pipeliner) Rename(ctx context.Context, key, newkey string) *StatusCmd ( Pipeliner) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( Pipeliner) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Pipeliner) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Pipeliner) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( Pipeliner) SCard(ctx context.Context, key string) *IntCmd ( Pipeliner) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Pipeliner) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Pipeliner) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( Pipeliner) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Pipeliner) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Pipeliner) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( Pipeliner) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd ( Pipeliner) SMembers(ctx context.Context, key string) *StringSliceCmd ( Pipeliner) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( Pipeliner) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( Pipeliner) SPop(ctx context.Context, key string) *StringCmd ( Pipeliner) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( Pipeliner) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd ( Pipeliner) SRandMember(ctx context.Context, key string) *StringCmd ( Pipeliner) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( Pipeliner) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Pipeliner) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Pipeliner) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( Pipeliner) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Pipeliner) Save(ctx context.Context) *StatusCmd ( Pipeliner) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( Pipeliner) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( Pipeliner) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Pipeliner) ScriptFlush(ctx context.Context) *StatusCmd ( Pipeliner) ScriptKill(ctx context.Context) *StatusCmd ( Pipeliner) ScriptLoad(ctx context.Context, script string) *StringCmd ( Pipeliner) Select(ctx context.Context, index int) *StatusCmd ( Pipeliner) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( Pipeliner) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd ( Pipeliner) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( Pipeliner) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( Pipeliner) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( Pipeliner) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( Pipeliner) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( Pipeliner) Shutdown(ctx context.Context) *StatusCmd ( Pipeliner) ShutdownNoSave(ctx context.Context) *StatusCmd ( Pipeliner) ShutdownSave(ctx context.Context) *StatusCmd ( Pipeliner) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( Pipeliner) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( Pipeliner) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Pipeliner) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( Pipeliner) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Pipeliner) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( Pipeliner) StrLen(ctx context.Context, key string) *IntCmd ( Pipeliner) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( Pipeliner) TTL(ctx context.Context, key string) *DurationCmd ( Pipeliner) Time(ctx context.Context) *TimeCmd ( Pipeliner) Touch(ctx context.Context, keys ...string) *IntCmd ( Pipeliner) TxPipeline() Pipeliner ( Pipeliner) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( Pipeliner) Type(ctx context.Context, key string) *StatusCmd ( Pipeliner) Unlink(ctx context.Context, keys ...string) *IntCmd ( Pipeliner) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( Pipeliner) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( Pipeliner) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( Pipeliner) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( Pipeliner) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( Pipeliner) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( Pipeliner) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( Pipeliner) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( Pipeliner) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Pipeliner) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( Pipeliner) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Pipeliner) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( Pipeliner) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( Pipeliner) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( Pipeliner) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( Pipeliner) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd ( Pipeliner) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd ( Pipeliner) XLen(ctx context.Context, stream string) *IntCmd ( Pipeliner) XPending(ctx context.Context, stream, group string) *XPendingCmd ( Pipeliner) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( Pipeliner) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Pipeliner) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( Pipeliner) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( Pipeliner) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( Pipeliner) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( Pipeliner) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( Pipeliner) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( Pipeliner) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd ( Pipeliner) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( Pipeliner) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( Pipeliner) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ( Pipeliner) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd ( Pipeliner) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( Pipeliner) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ( Pipeliner) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd ( Pipeliner) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd ( Pipeliner) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd ( Pipeliner) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd ( Pipeliner) ZCard(ctx context.Context, key string) *IntCmd ( Pipeliner) ZCount(ctx context.Context, key, min, max string) *IntCmd ( Pipeliner) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Pipeliner) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Pipeliner) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd ( Pipeliner) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( Pipeliner) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( Pipeliner) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Pipeliner) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( Pipeliner) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( Pipeliner) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( Pipeliner) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( Pipeliner) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( Pipeliner) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Pipeliner) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Pipeliner) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd ( Pipeliner) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd ( Pipeliner) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Pipeliner) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( Pipeliner) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( Pipeliner) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeliner) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeliner) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Pipeliner) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( Pipeliner) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Pipeliner) ZRank(ctx context.Context, key, member string) *IntCmd ( Pipeliner) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Pipeliner) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( Pipeliner) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( Pipeliner) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( Pipeliner) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Pipeliner) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeliner) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Pipeliner) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Pipeliner) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Pipeliner) ZRevRank(ctx context.Context, key, member string) *IntCmd ( Pipeliner) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Pipeliner) ZScore(ctx context.Context, key, member string) *FloatCmd ( Pipeliner) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( Pipeliner) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( Pipeliner) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Pipeline Pipeliner : Cmdable Pipeliner : Scripter Pipeliner : StatefulCmdable 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 (*Pong) String() string *Pong : expvar.Var *Pong : 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 func UniversalClient.PoolStats() *PoolStats
func Hook.ProcessHook(next ProcessHook) ProcessHook func Hook.ProcessHook(next ProcessHook) ProcessHook
func Hook.ProcessPipelineHook(next ProcessPipelineHook) ProcessPipelineHook func Hook.ProcessPipelineHook(next ProcessPipelineHook) ProcessPipelineHook
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. Deprecated: use Channel(WithChannelSize(size)), remove in v9. 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. (*PubSub) 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. (*PubSub) 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. SSubscribe Subscribes the client to the specified shard channels. SUnsubscribe unsubscribes the client from the given shard channels, or from all of them if none is given. (*PubSub) 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. *PubSub : github.com/prometheus/common/expfmt.Closer *PubSub : expvar.Var *PubSub : fmt.Stringer *PubSub : io.Closer func (*Client).PSubscribe(ctx context.Context, channels ...string) *PubSub func (*Client).SSubscribe(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).SSubscribe(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).SSubscribe(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.SSubscribe(ctx context.Context, channels ...string) *PubSub func UniversalClient.Subscribe(ctx context.Context, channels ...string) *PubSub func github.com/hibiken/asynq/internal/base.Broker.CancelationPubSub() (*PubSub, error) func github.com/hibiken/asynq/internal/rdb.(*RDB).CancelationPubSub() (*PubSub, error)
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. ( Ring) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2: client.AddHook(hook-1, hook-2) hook-1: func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } } hook-2: func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } } The execution sequence is: hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed. ( Ring) Append(ctx context.Context, key, value string) *IntCmd ( Ring) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( Ring) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( Ring) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Ring) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Ring) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set") BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. ( Ring) BgRewriteAOF(ctx context.Context) *StatusCmd ( Ring) BgSave(ctx context.Context) *StatusCmd ( Ring) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( Ring) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( Ring) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( Ring) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( Ring) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( Ring) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`. BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte ClientGetName returns the name of the connection. ( Ring) ClientID(ctx context.Context) *IntCmd ( Ring) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( Ring) ClientList(ctx context.Context) *StringCmd ( Ring) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( Ring) ClientUnblock(ctx context.Context, id int64) *IntCmd ( Ring) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( Ring) ClientUnpause(ctx context.Context) *BoolCmd 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. ( Ring) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( Ring) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Ring) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( Ring) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( Ring) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( Ring) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Ring) ClusterFailover(ctx context.Context) *StatusCmd ( Ring) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( Ring) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( Ring) ClusterInfo(ctx context.Context) *StringCmd ( Ring) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( Ring) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( Ring) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( Ring) ClusterNodes(ctx context.Context) *StringCmd ( Ring) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( Ring) ClusterResetHard(ctx context.Context) *StatusCmd ( Ring) ClusterResetSoft(ctx context.Context) *StatusCmd ( Ring) ClusterSaveConfig(ctx context.Context) *StatusCmd ( Ring) ClusterShards(ctx context.Context) *ClusterShardsCmd ( Ring) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( Ring) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( Ring) Command(ctx context.Context) *CommandsInfoCmd ( Ring) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( Ring) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( Ring) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( Ring) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( Ring) ConfigResetStat(ctx context.Context) *StatusCmd ( Ring) ConfigRewrite(ctx context.Context) *StatusCmd ( Ring) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( Ring) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd ( Ring) DBSize(ctx context.Context) *IntCmd ( Ring) DebugObject(ctx context.Context, key string) *StringCmd ( Ring) Decr(ctx context.Context, key string) *IntCmd ( Ring) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( Ring) Del(ctx context.Context, keys ...string) *IntCmd Do create a Cmd from the args and processes the cmd. ( Ring) Dump(ctx context.Context, key string) *StringCmd ( Ring) Echo(ctx context.Context, message interface{}) *StringCmd ( Ring) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Ring) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Ring) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Ring) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Ring) Exists(ctx context.Context, keys ...string) *IntCmd ( Ring) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Ring) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Ring) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Ring) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Ring) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Ring) ExpireTime(ctx context.Context, key string) *DurationCmd ( Ring) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Ring) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Ring) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Ring) FlushAll(ctx context.Context) *StatusCmd ( Ring) FlushAllAsync(ctx context.Context) *StatusCmd ( Ring) FlushDB(ctx context.Context) *StatusCmd ( Ring) FlushDBAsync(ctx context.Context) *StatusCmd ForEachShard concurrently calls the fn on each live shard in the ring. It returns the first error if any. ( Ring) FunctionDelete(ctx context.Context, libName string) *StringCmd ( Ring) FunctionDump(ctx context.Context) *StringCmd ( Ring) FunctionFlush(ctx context.Context) *StringCmd ( Ring) FunctionFlushAsync(ctx context.Context) *StringCmd ( Ring) FunctionKill(ctx context.Context) *StringCmd ( Ring) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( Ring) FunctionLoad(ctx context.Context, code string) *StringCmd ( Ring) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( Ring) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( Ring) FunctionStats(ctx context.Context) *FunctionStatsCmd ( Ring) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( Ring) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( Ring) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( Ring) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. ( Ring) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( Ring) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( Ring) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd Get Redis `GET key` command. It returns redis.Nil error when key does not exist. ( Ring) GetBit(ctx context.Context, key string, offset int64) *IntCmd GetDel redis-server version >= 6.2.0. GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0. ( Ring) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( Ring) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( Ring) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( Ring) HExists(ctx context.Context, key, field string) *BoolCmd ( Ring) HGet(ctx context.Context, key, field string) *StringCmd ( Ring) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( Ring) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( Ring) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( Ring) HKeys(ctx context.Context, key string) *StringSliceCmd ( Ring) 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. HRandField redis-server version >= 6.2.0. HRandFieldWithValues redis-server version >= 6.2.0. ( Ring) 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"}) Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` } - HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0 For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface. Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute. ( Ring) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( Ring) HVals(ctx context.Context, key string) *StringSliceCmd ( Ring) Incr(ctx context.Context, key string) *IntCmd ( Ring) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( Ring) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( Ring) Info(ctx context.Context, sections ...string) *StringCmd ( Ring) Keys(ctx context.Context, pattern string) *StringSliceCmd ( Ring) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( Ring) LIndex(ctx context.Context, key string, index int64) *StringCmd ( Ring) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( Ring) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Ring) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Ring) LLen(ctx context.Context, key string) *IntCmd LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2") ( Ring) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( Ring) LPop(ctx context.Context, key string) *StringCmd ( Ring) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Ring) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd ( Ring) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd ( Ring) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Ring) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Ring) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Ring) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( Ring) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( Ring) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( Ring) LastSave(ctx context.Context) *IntCmd Len returns the current number of shards in the ring. ( Ring) 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"}) - MSet(struct), For struct types, see HSet description. 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"}) - MSetNX(struct), For struct types, see HSet description. ( Ring) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( Ring) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( Ring) Move(ctx context.Context, key string, db int) *BoolCmd ( Ring) ObjectEncoding(ctx context.Context, key string) *StringCmd ( Ring) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( Ring) ObjectRefCount(ctx context.Context, key string) *IntCmd (*Ring) OnNewNode(fn func(rdb *Client)) Options returns read-only Options that were used to create the client. ( Ring) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Ring) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Ring) PExpireTime(ctx context.Context, key string) *DurationCmd ( Ring) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( Ring) PFCount(ctx context.Context, keys ...string) *IntCmd ( Ring) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd PSubscribe subscribes the client to the given patterns. ( Ring) PTTL(ctx context.Context, key string) *DurationCmd ( Ring) Persist(ctx context.Context, key string) *BoolCmd ( Ring) Ping(ctx context.Context) *StatusCmd (*Ring) Pipeline() Pipeliner (*Ring) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) PoolStats returns accumulated connection pool stats. (*Ring) Process(ctx context.Context, cmd Cmder) error ( Ring) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( Ring) PubSubNumPat(ctx context.Context) *IntCmd ( Ring) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Ring) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( Ring) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd Publish posts the message to the channel. ( Ring) Quit(_ context.Context) *StatusCmd ( Ring) RPop(ctx context.Context, key string) *StringCmd ( Ring) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Ring) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( Ring) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Ring) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Ring) RandomKey(ctx context.Context) *StringCmd ( Ring) ReadOnly(ctx context.Context) *StatusCmd ( Ring) ReadWrite(ctx context.Context) *StatusCmd ( Ring) Rename(ctx context.Context, key, newkey string) *StatusCmd ( Ring) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( Ring) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Ring) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Ring) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( Ring) SCard(ctx context.Context, key string) *IntCmd ( Ring) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Ring) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Ring) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( Ring) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Ring) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Ring) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd SMIsMember Redis `SMISMEMBER key member [member ...]` command. SMembers Redis `SMEMBERS key` command output as a slice. SMembersMap Redis `SMEMBERS key` command output as a map. ( Ring) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd SPop Redis `SPOP key` command. SPopN Redis `SPOP key count` command. ( Ring) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd SRandMember Redis `SRANDMEMBER key` command. SRandMemberN Redis `SRANDMEMBER key count` command. ( Ring) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Ring) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd SSubscribe Subscribes the client to the specified shard channels. ( Ring) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( Ring) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Ring) Save(ctx context.Context) *StatusCmd ( Ring) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( Ring) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( Ring) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Ring) ScriptFlush(ctx context.Context) *StatusCmd ( Ring) ScriptKill(ctx context.Context) *StatusCmd ( Ring) ScriptLoad(ctx context.Context, script string) *StringCmd Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. (*Ring) SetAddrs(addrs map[string]string) SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options. ( Ring) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd SetEx Redis `SETEx key expiration value` command. SetNX Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Ring) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd SetXX Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Ring) Shutdown(ctx context.Context) *StatusCmd ( Ring) ShutdownNoSave(ctx context.Context) *StatusCmd ( Ring) ShutdownSave(ctx context.Context) *StatusCmd ( Ring) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( Ring) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( Ring) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Ring) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( Ring) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Ring) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( Ring) StrLen(ctx context.Context, key string) *IntCmd Subscribe subscribes the client to the specified channels. ( Ring) Sync(_ context.Context) ( Ring) TTL(ctx context.Context, key string) *DurationCmd ( Ring) Time(ctx context.Context) *TimeCmd ( Ring) Touch(ctx context.Context, keys ...string) *IntCmd (*Ring) TxPipeline() Pipeliner (*Ring) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( Ring) Type(ctx context.Context, key string) *StatusCmd ( Ring) Unlink(ctx context.Context, keys ...string) *IntCmd ( Ring) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd (*Ring) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error ( Ring) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( Ring) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( Ring) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( Ring) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( Ring) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( Ring) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( Ring) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( Ring) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( Ring) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Ring) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( Ring) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Ring) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( Ring) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( Ring) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( Ring) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( Ring) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0. ( Ring) XLen(ctx context.Context, stream string) *IntCmd ( Ring) XPending(ctx context.Context, stream, group string) *XPendingCmd ( Ring) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( Ring) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Ring) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( Ring) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( Ring) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( Ring) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( Ring) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Ring) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen ( Ring) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( Ring) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( Ring) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ZAdd Redis `ZADD key score member [score member ...]` command. ( Ring) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( Ring) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZAddGT Redis `ZADD key GT score member [score member ...]` command. ZAddLT Redis `ZADD key LT score member [score member ...]` command. ZAddNX Redis `ZADD key NX score member [score member ...]` command. ZAddXX Redis `ZADD key XX score member [score member ...]` command. ( Ring) ZCard(ctx context.Context, key string) *IntCmd ( Ring) ZCount(ctx context.Context, key, min, max string) *IntCmd ZDiff redis-server version >= 6.2.0. ZDiffStore redis-server version >=6.2.0. ZDiffWithScores redis-server version >= 6.2.0. ( Ring) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( Ring) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( Ring) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Ring) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( Ring) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( Ring) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2") ( Ring) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( Ring) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Ring) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ZRandMember redis-server version >= 6.2.0. ZRandMemberWithScores redis-server version >= 6.2.0. ( Ring) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Ring) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( Ring) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( Ring) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Ring) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Ring) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Ring) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( Ring) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Ring) ZRank(ctx context.Context, key, member string) *IntCmd ( Ring) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Ring) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( Ring) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( Ring) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( Ring) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Ring) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Ring) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Ring) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Ring) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Ring) ZRevRank(ctx context.Context, key, member string) *IntCmd ( Ring) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Ring) ZScore(ctx context.Context, key, member string) *FloatCmd ( Ring) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( Ring) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( Ring) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Ring : Cmdable Ring : Scripter *Ring : UniversalClient *Ring : github.com/prometheus/common/expfmt.Closer *Ring : io.Closer func NewRing(opt *RingOptions) *Ring
RingOptions are used to configure a ring client and should be passed to NewRing. Map of name => host:port addresses of ring shards. ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration 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. Limiter Limiter MaxIdleConns int MaxRetries int MaxRetryBackoff time.Duration MinIdleConns int MinRetryBackoff time.Duration NewClient creates a shard client with provided 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 PoolFIFO uses FIFO mode for each node connection pool GET/PUT (default LIFO). 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
Command []string Duration time.Duration Name string func (*FunctionStats).AllRunningScripts() []RunningScript func (*FunctionStats).RunningScript() (RunningScript, bool)
(*ScanCmd) Args() []interface{} (*ScanCmd) Err() error (*ScanCmd) FullName() string Iterator creates a new ScanIterator. (*ScanCmd) Name() string (*ScanCmd) Result() (keys []string, cursor uint64, err error) (*ScanCmd) SetErr(e error) (*ScanCmd) SetFirstKeyPos(keyPos int8) (*ScanCmd) SetVal(page []string, cursor uint64) (*ScanCmd) String() string (*ScanCmd) Val() (keys []string, cursor uint64) *ScanCmd : Cmder *ScanCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *ScanCmd : expvar.Var *ScanCmd : 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.ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *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.ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *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.ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *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.ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *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. 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
Scanner internal/hscan.Scanner exposed interface.
(*Script) Eval(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd (*Script) EvalRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd (*Script) EvalSha(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd (*Script) EvalShaRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd (*Script) Exists(ctx context.Context, c Scripter) *BoolSliceCmd (*Script) Hash() string (*Script) 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. RunRO optimistically uses EVALSHA_RO to run the script. If script does not exist it is retried using EVAL_RO. func NewScript(src string) *Script
( Scripter) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Scripter) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Scripter) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Scripter) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Scripter) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Scripter) ScriptLoad(ctx context.Context, script string) *StringCmd Client *ClusterClient Cmdable (interface) Conn Pipeline Pipeliner (interface) Ring StatefulCmdable (interface) Tx UniversalClient (interface) func (*Script).Eval(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd func (*Script).EvalRO(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).EvalShaRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd func (*Script).Exists(ctx context.Context, c Scripter) *BoolSliceCmd func (*Script).Load(ctx context.Context, c Scripter) *StringCmd func (*Script).Run(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd func (*Script).RunRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd
SentinelClient is a client for a Redis Sentinel. AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2: client.AddHook(hook-1, hook-2) hook-1: func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } } hook-2: func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } } The execution sequence is: hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed. 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. 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. (*SentinelClient) 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. (*SentinelClient) 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. Replicas shows a list of replicas for the specified master and their state. 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 replica and sentinel already discovered and associated with the master. (*SentinelClient) Sentinels(ctx context.Context, name string) *MapStringStringSliceCmd Set is used in order to change configuration parameters of a specific master. ( SentinelClient) String() string Subscribe subscribes the client to the specified channels. Channels can be omitted to create empty subscription. SentinelClient : github.com/prometheus/common/expfmt.Closer SentinelClient : expvar.Var SentinelClient : fmt.Stringer SentinelClient : io.Closer func NewSentinelClient(opt *Options) *SentinelClient
SetArgs provides arguments for the SetArgs function. ExpireAt time.Time When Get is true, the command returns the old value stored at key, or nil when key did not exist. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. Mode can be `NX` or `XX` or empty. Zero `TTL` or `Expiration` means that the key has no expiration time. func Cmdable.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd func Pipeliner.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd func StatefulCmdable.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd func UniversalClient.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
(*SliceCmd) Args() []interface{} (*SliceCmd) Err() error (*SliceCmd) FullName() string (*SliceCmd) Name() string (*SliceCmd) Result() ([]interface{}, error) Scan scans the results from the map into a destination struct. The map keys are matched in the Redis struct fields by the `redis:"field"` tag. (*SliceCmd) SetErr(e error) (*SliceCmd) SetFirstKeyPos(keyPos int8) (*SliceCmd) SetVal(val []interface{}) (*SliceCmd) String() string (*SliceCmd) Val() []interface{} *SliceCmd : Cmder *SliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *SliceCmd : database/sql.Scanner *SliceCmd : expvar.Var *SliceCmd : fmt.Stringer func NewSliceCmd(ctx context.Context, args ...interface{}) *SliceCmd func NewSliceResult(val []interface{}, err error) *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.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 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.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
End int64 Start int64
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 func (*SlowLogCmd).SetVal(val []SlowLog)
(*SlowLogCmd) Args() []interface{} (*SlowLogCmd) Err() error (*SlowLogCmd) FullName() string (*SlowLogCmd) Name() string (*SlowLogCmd) Result() ([]SlowLog, error) (*SlowLogCmd) SetErr(e error) (*SlowLogCmd) SetFirstKeyPos(keyPos int8) (*SlowLogCmd) SetVal(val []SlowLog) (*SlowLogCmd) String() string (*SlowLogCmd) Val() []SlowLog *SlowLogCmd : Cmder *SlowLogCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *SlowLogCmd : expvar.Var *SlowLogCmd : fmt.Stringer func NewSlowLogCmd(ctx context.Context, args ...interface{}) *SlowLogCmd func Cmdable.SlowLogGet(ctx context.Context, num int64) *SlowLogCmd func Pipeliner.SlowLogGet(ctx context.Context, num int64) *SlowLogCmd func StatefulCmdable.SlowLogGet(ctx context.Context, num int64) *SlowLogCmd func UniversalClient.SlowLogGet(ctx context.Context, num int64) *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.SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd 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.SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd 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.SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd 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.SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd func UniversalClient.SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
( StatefulCmdable) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd ( StatefulCmdable) Append(ctx context.Context, key, value string) *IntCmd ( StatefulCmdable) Auth(ctx context.Context, password string) *StatusCmd ( StatefulCmdable) AuthACL(ctx context.Context, username, password string) *StatusCmd ( StatefulCmdable) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( StatefulCmdable) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( StatefulCmdable) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( StatefulCmdable) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( StatefulCmdable) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( StatefulCmdable) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( StatefulCmdable) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( StatefulCmdable) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( StatefulCmdable) BgRewriteAOF(ctx context.Context) *StatusCmd ( StatefulCmdable) BgSave(ctx context.Context) *StatusCmd ( StatefulCmdable) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( StatefulCmdable) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( StatefulCmdable) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( StatefulCmdable) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( StatefulCmdable) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( StatefulCmdable) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( StatefulCmdable) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( StatefulCmdable) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd ( StatefulCmdable) ClientGetName(ctx context.Context) *StringCmd ( StatefulCmdable) ClientID(ctx context.Context) *IntCmd ( StatefulCmdable) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( StatefulCmdable) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( StatefulCmdable) ClientList(ctx context.Context) *StringCmd ( StatefulCmdable) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( StatefulCmdable) ClientSetName(ctx context.Context, name string) *BoolCmd ( StatefulCmdable) ClientUnblock(ctx context.Context, id int64) *IntCmd ( StatefulCmdable) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( StatefulCmdable) ClientUnpause(ctx context.Context) *BoolCmd ( StatefulCmdable) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( StatefulCmdable) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( StatefulCmdable) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( StatefulCmdable) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( StatefulCmdable) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( StatefulCmdable) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( StatefulCmdable) ClusterFailover(ctx context.Context) *StatusCmd ( StatefulCmdable) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( StatefulCmdable) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( StatefulCmdable) ClusterInfo(ctx context.Context) *StringCmd ( StatefulCmdable) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( StatefulCmdable) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( StatefulCmdable) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( StatefulCmdable) ClusterNodes(ctx context.Context) *StringCmd ( StatefulCmdable) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( StatefulCmdable) ClusterResetHard(ctx context.Context) *StatusCmd ( StatefulCmdable) ClusterResetSoft(ctx context.Context) *StatusCmd ( StatefulCmdable) ClusterSaveConfig(ctx context.Context) *StatusCmd ( StatefulCmdable) ClusterShards(ctx context.Context) *ClusterShardsCmd ( StatefulCmdable) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( StatefulCmdable) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( StatefulCmdable) Command(ctx context.Context) *CommandsInfoCmd ( StatefulCmdable) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( StatefulCmdable) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( StatefulCmdable) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( StatefulCmdable) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( StatefulCmdable) ConfigResetStat(ctx context.Context) *StatusCmd ( StatefulCmdable) ConfigRewrite(ctx context.Context) *StatusCmd ( StatefulCmdable) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( StatefulCmdable) Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *IntCmd ( StatefulCmdable) DBSize(ctx context.Context) *IntCmd ( StatefulCmdable) DebugObject(ctx context.Context, key string) *StringCmd ( StatefulCmdable) Decr(ctx context.Context, key string) *IntCmd ( StatefulCmdable) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( StatefulCmdable) Del(ctx context.Context, keys ...string) *IntCmd ( StatefulCmdable) Dump(ctx context.Context, key string) *StringCmd ( StatefulCmdable) Echo(ctx context.Context, message interface{}) *StringCmd ( StatefulCmdable) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( StatefulCmdable) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( StatefulCmdable) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( StatefulCmdable) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( StatefulCmdable) Exists(ctx context.Context, keys ...string) *IntCmd ( StatefulCmdable) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( StatefulCmdable) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( StatefulCmdable) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( StatefulCmdable) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( StatefulCmdable) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( StatefulCmdable) ExpireTime(ctx context.Context, key string) *DurationCmd ( StatefulCmdable) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( StatefulCmdable) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( StatefulCmdable) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( StatefulCmdable) FlushAll(ctx context.Context) *StatusCmd ( StatefulCmdable) FlushAllAsync(ctx context.Context) *StatusCmd ( StatefulCmdable) FlushDB(ctx context.Context) *StatusCmd ( StatefulCmdable) FlushDBAsync(ctx context.Context) *StatusCmd ( StatefulCmdable) FunctionDelete(ctx context.Context, libName string) *StringCmd ( StatefulCmdable) FunctionDump(ctx context.Context) *StringCmd ( StatefulCmdable) FunctionFlush(ctx context.Context) *StringCmd ( StatefulCmdable) FunctionFlushAsync(ctx context.Context) *StringCmd ( StatefulCmdable) FunctionKill(ctx context.Context) *StringCmd ( StatefulCmdable) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( StatefulCmdable) FunctionLoad(ctx context.Context, code string) *StringCmd ( StatefulCmdable) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( StatefulCmdable) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( StatefulCmdable) FunctionStats(ctx context.Context) *FunctionStatsCmd ( StatefulCmdable) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( StatefulCmdable) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( StatefulCmdable) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( StatefulCmdable) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( StatefulCmdable) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( StatefulCmdable) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( StatefulCmdable) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( StatefulCmdable) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( StatefulCmdable) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( StatefulCmdable) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( StatefulCmdable) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd ( StatefulCmdable) Get(ctx context.Context, key string) *StringCmd ( StatefulCmdable) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( StatefulCmdable) GetDel(ctx context.Context, key string) *StringCmd ( StatefulCmdable) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd ( StatefulCmdable) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( StatefulCmdable) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( StatefulCmdable) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( StatefulCmdable) HExists(ctx context.Context, key, field string) *BoolCmd ( StatefulCmdable) HGet(ctx context.Context, key, field string) *StringCmd ( StatefulCmdable) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( StatefulCmdable) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( StatefulCmdable) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( StatefulCmdable) HKeys(ctx context.Context, key string) *StringSliceCmd ( StatefulCmdable) HLen(ctx context.Context, key string) *IntCmd ( StatefulCmdable) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( StatefulCmdable) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( StatefulCmdable) HRandField(ctx context.Context, key string, count int) *StringSliceCmd ( StatefulCmdable) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd ( StatefulCmdable) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( StatefulCmdable) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( StatefulCmdable) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( StatefulCmdable) HVals(ctx context.Context, key string) *StringSliceCmd ( StatefulCmdable) Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd ( StatefulCmdable) Incr(ctx context.Context, key string) *IntCmd ( StatefulCmdable) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( StatefulCmdable) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( StatefulCmdable) Info(ctx context.Context, section ...string) *StringCmd ( StatefulCmdable) Keys(ctx context.Context, pattern string) *StringSliceCmd ( StatefulCmdable) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( StatefulCmdable) LIndex(ctx context.Context, key string, index int64) *StringCmd ( StatefulCmdable) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( StatefulCmdable) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( StatefulCmdable) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( StatefulCmdable) LLen(ctx context.Context, key string) *IntCmd ( StatefulCmdable) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd ( StatefulCmdable) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( StatefulCmdable) LPop(ctx context.Context, key string) *StringCmd ( StatefulCmdable) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( StatefulCmdable) LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd ( StatefulCmdable) LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd ( StatefulCmdable) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( StatefulCmdable) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( StatefulCmdable) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( StatefulCmdable) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( StatefulCmdable) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( StatefulCmdable) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( StatefulCmdable) LastSave(ctx context.Context) *IntCmd ( StatefulCmdable) MGet(ctx context.Context, keys ...string) *SliceCmd ( StatefulCmdable) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( StatefulCmdable) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( StatefulCmdable) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( StatefulCmdable) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( StatefulCmdable) Move(ctx context.Context, key string, db int) *BoolCmd ( StatefulCmdable) ObjectEncoding(ctx context.Context, key string) *StringCmd ( StatefulCmdable) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( StatefulCmdable) ObjectRefCount(ctx context.Context, key string) *IntCmd ( StatefulCmdable) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( StatefulCmdable) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( StatefulCmdable) PExpireTime(ctx context.Context, key string) *DurationCmd ( StatefulCmdable) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( StatefulCmdable) PFCount(ctx context.Context, keys ...string) *IntCmd ( StatefulCmdable) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( StatefulCmdable) PTTL(ctx context.Context, key string) *DurationCmd ( StatefulCmdable) Persist(ctx context.Context, key string) *BoolCmd ( StatefulCmdable) Ping(ctx context.Context) *StatusCmd ( StatefulCmdable) Pipeline() Pipeliner ( StatefulCmdable) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( StatefulCmdable) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( StatefulCmdable) PubSubNumPat(ctx context.Context) *IntCmd ( StatefulCmdable) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( StatefulCmdable) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( StatefulCmdable) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( StatefulCmdable) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( StatefulCmdable) Quit(ctx context.Context) *StatusCmd ( StatefulCmdable) RPop(ctx context.Context, key string) *StringCmd ( StatefulCmdable) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( StatefulCmdable) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( StatefulCmdable) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( StatefulCmdable) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( StatefulCmdable) RandomKey(ctx context.Context) *StringCmd ( StatefulCmdable) ReadOnly(ctx context.Context) *StatusCmd ( StatefulCmdable) ReadWrite(ctx context.Context) *StatusCmd ( StatefulCmdable) Rename(ctx context.Context, key, newkey string) *StatusCmd ( StatefulCmdable) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( StatefulCmdable) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( StatefulCmdable) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( StatefulCmdable) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( StatefulCmdable) SCard(ctx context.Context, key string) *IntCmd ( StatefulCmdable) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( StatefulCmdable) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( StatefulCmdable) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( StatefulCmdable) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( StatefulCmdable) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( StatefulCmdable) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( StatefulCmdable) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd ( StatefulCmdable) SMembers(ctx context.Context, key string) *StringSliceCmd ( StatefulCmdable) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( StatefulCmdable) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( StatefulCmdable) SPop(ctx context.Context, key string) *StringCmd ( StatefulCmdable) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( StatefulCmdable) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd ( StatefulCmdable) SRandMember(ctx context.Context, key string) *StringCmd ( StatefulCmdable) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( StatefulCmdable) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( StatefulCmdable) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( StatefulCmdable) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( StatefulCmdable) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( StatefulCmdable) Save(ctx context.Context) *StatusCmd ( StatefulCmdable) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( StatefulCmdable) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( StatefulCmdable) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( StatefulCmdable) ScriptFlush(ctx context.Context) *StatusCmd ( StatefulCmdable) ScriptKill(ctx context.Context) *StatusCmd ( StatefulCmdable) ScriptLoad(ctx context.Context, script string) *StringCmd ( StatefulCmdable) Select(ctx context.Context, index int) *StatusCmd ( StatefulCmdable) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( StatefulCmdable) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd ( StatefulCmdable) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( StatefulCmdable) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( StatefulCmdable) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( StatefulCmdable) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( StatefulCmdable) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( StatefulCmdable) Shutdown(ctx context.Context) *StatusCmd ( StatefulCmdable) ShutdownNoSave(ctx context.Context) *StatusCmd ( StatefulCmdable) ShutdownSave(ctx context.Context) *StatusCmd ( StatefulCmdable) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( StatefulCmdable) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( StatefulCmdable) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( StatefulCmdable) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( StatefulCmdable) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( StatefulCmdable) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( StatefulCmdable) StrLen(ctx context.Context, key string) *IntCmd ( StatefulCmdable) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( StatefulCmdable) TTL(ctx context.Context, key string) *DurationCmd ( StatefulCmdable) Time(ctx context.Context) *TimeCmd ( StatefulCmdable) Touch(ctx context.Context, keys ...string) *IntCmd ( StatefulCmdable) TxPipeline() Pipeliner ( StatefulCmdable) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( StatefulCmdable) Type(ctx context.Context, key string) *StatusCmd ( StatefulCmdable) Unlink(ctx context.Context, keys ...string) *IntCmd ( StatefulCmdable) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( StatefulCmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( StatefulCmdable) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( StatefulCmdable) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( StatefulCmdable) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( StatefulCmdable) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( StatefulCmdable) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( StatefulCmdable) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( StatefulCmdable) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( StatefulCmdable) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( StatefulCmdable) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( StatefulCmdable) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( StatefulCmdable) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( StatefulCmdable) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( StatefulCmdable) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( StatefulCmdable) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd ( StatefulCmdable) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd ( StatefulCmdable) XLen(ctx context.Context, stream string) *IntCmd ( StatefulCmdable) XPending(ctx context.Context, stream, group string) *XPendingCmd ( StatefulCmdable) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( StatefulCmdable) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( StatefulCmdable) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( StatefulCmdable) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( StatefulCmdable) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( StatefulCmdable) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( StatefulCmdable) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( StatefulCmdable) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( StatefulCmdable) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd ( StatefulCmdable) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( StatefulCmdable) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( StatefulCmdable) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ( StatefulCmdable) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd ( StatefulCmdable) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( StatefulCmdable) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ( StatefulCmdable) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd ( StatefulCmdable) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd ( StatefulCmdable) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd ( StatefulCmdable) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd ( StatefulCmdable) ZCard(ctx context.Context, key string) *IntCmd ( StatefulCmdable) ZCount(ctx context.Context, key, min, max string) *IntCmd ( StatefulCmdable) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd ( StatefulCmdable) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( StatefulCmdable) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd ( StatefulCmdable) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( StatefulCmdable) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( StatefulCmdable) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( StatefulCmdable) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( StatefulCmdable) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( StatefulCmdable) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( StatefulCmdable) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( StatefulCmdable) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( StatefulCmdable) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( StatefulCmdable) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( StatefulCmdable) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd ( StatefulCmdable) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd ( StatefulCmdable) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( StatefulCmdable) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( StatefulCmdable) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( StatefulCmdable) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( StatefulCmdable) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( StatefulCmdable) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( StatefulCmdable) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( StatefulCmdable) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( StatefulCmdable) ZRank(ctx context.Context, key, member string) *IntCmd ( StatefulCmdable) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( StatefulCmdable) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( StatefulCmdable) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( StatefulCmdable) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( StatefulCmdable) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( StatefulCmdable) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( StatefulCmdable) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( StatefulCmdable) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( StatefulCmdable) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( StatefulCmdable) ZRevRank(ctx context.Context, key, member string) *IntCmd ( StatefulCmdable) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( StatefulCmdable) ZScore(ctx context.Context, key, member string) *FloatCmd ( StatefulCmdable) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( StatefulCmdable) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( StatefulCmdable) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Conn *Pipeline Pipeliner (interface) *Tx StatefulCmdable : Cmdable StatefulCmdable : Scripter
(*StatusCmd) Args() []interface{} (*StatusCmd) Err() error (*StatusCmd) FullName() string (*StatusCmd) Name() string (*StatusCmd) Result() (string, error) (*StatusCmd) SetErr(e error) (*StatusCmd) SetFirstKeyPos(keyPos int8) (*StatusCmd) SetVal(val string) (*StatusCmd) String() string (*StatusCmd) Val() string *StatusCmd : Cmder *StatusCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *StatusCmd : expvar.Var *StatusCmd : fmt.Stringer func NewStatusCmd(ctx context.Context, args ...interface{}) *StatusCmd func NewStatusResult(val string, err error) *StatusCmd func (*ClusterClient).ScriptFlush(ctx context.Context) *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.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd func Cmdable.SetEx(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.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd func Pipeliner.SetEx(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.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd func StatefulCmdable.SetEx(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.SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd func UniversalClient.SetEx(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
(*StringCmd) Args() []interface{} (*StringCmd) Bool() (bool, error) (*StringCmd) Bytes() ([]byte, error) (*StringCmd) Err() error (*StringCmd) Float32() (float32, error) (*StringCmd) Float64() (float64, error) (*StringCmd) FullName() string (*StringCmd) Int() (int, error) (*StringCmd) Int64() (int64, error) (*StringCmd) Name() string (*StringCmd) Result() (string, error) (*StringCmd) Scan(val interface{}) error (*StringCmd) SetErr(e error) (*StringCmd) SetFirstKeyPos(keyPos int8) (*StringCmd) SetVal(val string) (*StringCmd) String() string (*StringCmd) Time() (time.Time, error) (*StringCmd) Uint64() (uint64, error) (*StringCmd) Val() string *StringCmd : Cmder *StringCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *StringCmd : database/sql.Scanner *StringCmd : expvar.Var *StringCmd : fmt.Stringer func NewStringCmd(ctx context.Context, args ...interface{}) *StringCmd func NewStringResult(val string, err error) *StringCmd func (*ClusterClient).ScriptLoad(ctx context.Context, script string) *StringCmd func Cmdable.ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd func Cmdable.BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *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.FunctionDelete(ctx context.Context, libName string) *StringCmd func Cmdable.FunctionDump(ctx context.Context) *StringCmd func Cmdable.FunctionFlush(ctx context.Context) *StringCmd func Cmdable.FunctionFlushAsync(ctx context.Context) *StringCmd func Cmdable.FunctionKill(ctx context.Context) *StringCmd func Cmdable.FunctionLoad(ctx context.Context, code string) *StringCmd func Cmdable.FunctionLoadReplace(ctx context.Context, code string) *StringCmd func Cmdable.FunctionRestore(ctx context.Context, libDump string) *StringCmd func Cmdable.Get(ctx context.Context, key string) *StringCmd func Cmdable.GetDel(ctx context.Context, key string) *StringCmd func Cmdable.GetEx(ctx context.Context, key string, expiration time.Duration) *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.LMove(ctx context.Context, source, destination, srcpos, destpos string) *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.ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd func Pipeliner.BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *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.FunctionDelete(ctx context.Context, libName string) *StringCmd func Pipeliner.FunctionDump(ctx context.Context) *StringCmd func Pipeliner.FunctionFlush(ctx context.Context) *StringCmd func Pipeliner.FunctionFlushAsync(ctx context.Context) *StringCmd func Pipeliner.FunctionKill(ctx context.Context) *StringCmd func Pipeliner.FunctionLoad(ctx context.Context, code string) *StringCmd func Pipeliner.FunctionLoadReplace(ctx context.Context, code string) *StringCmd func Pipeliner.FunctionRestore(ctx context.Context, libDump string) *StringCmd func Pipeliner.Get(ctx context.Context, key string) *StringCmd func Pipeliner.GetDel(ctx context.Context, key string) *StringCmd func Pipeliner.GetEx(ctx context.Context, key string, expiration time.Duration) *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.LMove(ctx context.Context, source, destination, srcpos, destpos string) *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 Scripter.ScriptLoad(ctx context.Context, script string) *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.ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd func StatefulCmdable.BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *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.FunctionDelete(ctx context.Context, libName string) *StringCmd func StatefulCmdable.FunctionDump(ctx context.Context) *StringCmd func StatefulCmdable.FunctionFlush(ctx context.Context) *StringCmd func StatefulCmdable.FunctionFlushAsync(ctx context.Context) *StringCmd func StatefulCmdable.FunctionKill(ctx context.Context) *StringCmd func StatefulCmdable.FunctionLoad(ctx context.Context, code string) *StringCmd func StatefulCmdable.FunctionLoadReplace(ctx context.Context, code string) *StringCmd func StatefulCmdable.FunctionRestore(ctx context.Context, libDump string) *StringCmd func StatefulCmdable.Get(ctx context.Context, key string) *StringCmd func StatefulCmdable.GetDel(ctx context.Context, key string) *StringCmd func StatefulCmdable.GetEx(ctx context.Context, key string, expiration time.Duration) *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.LMove(ctx context.Context, source, destination, srcpos, destpos string) *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.ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd func UniversalClient.BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *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.FunctionDelete(ctx context.Context, libName string) *StringCmd func UniversalClient.FunctionDump(ctx context.Context) *StringCmd func UniversalClient.FunctionFlush(ctx context.Context) *StringCmd func UniversalClient.FunctionFlushAsync(ctx context.Context) *StringCmd func UniversalClient.FunctionKill(ctx context.Context) *StringCmd func UniversalClient.FunctionLoad(ctx context.Context, code string) *StringCmd func UniversalClient.FunctionLoadReplace(ctx context.Context, code string) *StringCmd func UniversalClient.FunctionRestore(ctx context.Context, libDump string) *StringCmd func UniversalClient.Get(ctx context.Context, key string) *StringCmd func UniversalClient.GetDel(ctx context.Context, key string) *StringCmd func UniversalClient.GetEx(ctx context.Context, key string, expiration time.Duration) *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.LMove(ctx context.Context, source, destination, srcpos, destpos string) *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
(*StringSliceCmd) Args() []interface{} (*StringSliceCmd) Err() error (*StringSliceCmd) FullName() string (*StringSliceCmd) Name() string (*StringSliceCmd) Result() ([]string, error) (*StringSliceCmd) ScanSlice(container interface{}) error (*StringSliceCmd) SetErr(e error) (*StringSliceCmd) SetFirstKeyPos(keyPos int8) (*StringSliceCmd) SetVal(val []string) (*StringSliceCmd) String() string (*StringSliceCmd) Val() []string *StringSliceCmd : Cmder *StringSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *StringSliceCmd : expvar.Var *StringSliceCmd : 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.CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd func Cmdable.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd func Cmdable.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func Cmdable.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd func Cmdable.HKeys(ctx context.Context, key string) *StringSliceCmd func Cmdable.HRandField(ctx context.Context, key string, count int) *StringSliceCmd func Cmdable.HVals(ctx context.Context, key string) *StringSliceCmd func Cmdable.Keys(ctx context.Context, pattern string) *StringSliceCmd func Cmdable.LPopCount(ctx context.Context, key string, count int) *StringSliceCmd func Cmdable.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Cmdable.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func Cmdable.PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd func Cmdable.RPopCount(ctx context.Context, key string, count int) *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.SortRO(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.ZDiff(ctx context.Context, keys ...string) *StringSliceCmd func Cmdable.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func Cmdable.ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd func Cmdable.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Cmdable.ZRangeArgs(ctx context.Context, z ZRangeArgs) *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 Cmdable.ZUnion(ctx context.Context, store ZStore) *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.CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd func Pipeliner.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd func Pipeliner.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func Pipeliner.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd func Pipeliner.HKeys(ctx context.Context, key string) *StringSliceCmd func Pipeliner.HRandField(ctx context.Context, key string, count int) *StringSliceCmd func Pipeliner.HVals(ctx context.Context, key string) *StringSliceCmd func Pipeliner.Keys(ctx context.Context, pattern string) *StringSliceCmd func Pipeliner.LPopCount(ctx context.Context, key string, count int) *StringSliceCmd func Pipeliner.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Pipeliner.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func Pipeliner.PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd func Pipeliner.RPopCount(ctx context.Context, key string, count int) *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.SortRO(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.ZDiff(ctx context.Context, keys ...string) *StringSliceCmd func Pipeliner.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func Pipeliner.ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd func Pipeliner.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func Pipeliner.ZRangeArgs(ctx context.Context, z ZRangeArgs) *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 Pipeliner.ZUnion(ctx context.Context, store ZStore) *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.CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd func StatefulCmdable.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd func StatefulCmdable.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func StatefulCmdable.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd func StatefulCmdable.HKeys(ctx context.Context, key string) *StringSliceCmd func StatefulCmdable.HRandField(ctx context.Context, key string, count int) *StringSliceCmd func StatefulCmdable.HVals(ctx context.Context, key string) *StringSliceCmd func StatefulCmdable.Keys(ctx context.Context, pattern string) *StringSliceCmd func StatefulCmdable.LPopCount(ctx context.Context, key string, count int) *StringSliceCmd func StatefulCmdable.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func StatefulCmdable.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func StatefulCmdable.PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd func StatefulCmdable.RPopCount(ctx context.Context, key string, count int) *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.SortRO(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.ZDiff(ctx context.Context, keys ...string) *StringSliceCmd func StatefulCmdable.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func StatefulCmdable.ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd func StatefulCmdable.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func StatefulCmdable.ZRangeArgs(ctx context.Context, z ZRangeArgs) *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 StatefulCmdable.ZUnion(ctx context.Context, store ZStore) *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.CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd func UniversalClient.CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd func UniversalClient.GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd func UniversalClient.GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd func UniversalClient.HKeys(ctx context.Context, key string) *StringSliceCmd func UniversalClient.HRandField(ctx context.Context, key string, count int) *StringSliceCmd func UniversalClient.HVals(ctx context.Context, key string) *StringSliceCmd func UniversalClient.Keys(ctx context.Context, pattern string) *StringSliceCmd func UniversalClient.LPopCount(ctx context.Context, key string, count int) *StringSliceCmd func UniversalClient.LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func UniversalClient.PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd func UniversalClient.PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd func UniversalClient.RPopCount(ctx context.Context, key string, count int) *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.SortRO(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.ZDiff(ctx context.Context, keys ...string) *StringSliceCmd func UniversalClient.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func UniversalClient.ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd func UniversalClient.ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd func UniversalClient.ZRangeArgs(ctx context.Context, z ZRangeArgs) *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 func UniversalClient.ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
(*StringStructMapCmd) Args() []interface{} (*StringStructMapCmd) Err() error (*StringStructMapCmd) FullName() string (*StringStructMapCmd) Name() string (*StringStructMapCmd) Result() (map[string]struct{}, error) (*StringStructMapCmd) SetErr(e error) (*StringStructMapCmd) SetFirstKeyPos(keyPos int8) (*StringStructMapCmd) SetVal(val map[string]struct{}) (*StringStructMapCmd) String() string (*StringStructMapCmd) Val() map[string]struct{} *StringStructMapCmd : Cmder *StringStructMapCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *StringStructMapCmd : expvar.Var *StringStructMapCmd : 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". (*Subscription) String() string *Subscription : expvar.Var *Subscription : fmt.Stringer
(*TimeCmd) Args() []interface{} (*TimeCmd) Err() error (*TimeCmd) FullName() string (*TimeCmd) Name() string (*TimeCmd) Result() (time.Time, error) (*TimeCmd) SetErr(e error) (*TimeCmd) SetFirstKeyPos(keyPos int8) (*TimeCmd) SetVal(val time.Time) (*TimeCmd) String() string (*TimeCmd) Val() time.Time *TimeCmd : Cmder *TimeCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *TimeCmd : expvar.Var *TimeCmd : 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, use Pipeline instead. ( Tx) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2: client.AddHook(hook-1, hook-2) hook-1: func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } } hook-2: func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } } The execution sequence is: hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed. ( Tx) Append(ctx context.Context, key, value string) *IntCmd ( Tx) Auth(ctx context.Context, password string) *StatusCmd AuthACL 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. ( Tx) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( Tx) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( Tx) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Tx) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( Tx) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set") BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. ( Tx) BgRewriteAOF(ctx context.Context) *StatusCmd ( Tx) BgSave(ctx context.Context) *StatusCmd ( Tx) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( Tx) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( Tx) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( Tx) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( Tx) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( Tx) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`. BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte ClientGetName returns the name of the connection. ( Tx) ClientID(ctx context.Context) *IntCmd ( Tx) ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter is new style syntax, while the ClientKill is old CLIENT KILL <option> [value] ... <option> [value] ( Tx) ClientList(ctx context.Context) *StringCmd ( Tx) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ClientSetName assigns a name to the connection. ( Tx) ClientUnblock(ctx context.Context, id int64) *IntCmd ( Tx) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( Tx) ClientUnpause(ctx context.Context) *BoolCmd Close closes the transaction, releasing any open resources. ( Tx) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( Tx) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Tx) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( Tx) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( Tx) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( Tx) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( Tx) ClusterFailover(ctx context.Context) *StatusCmd ( Tx) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( Tx) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( Tx) ClusterInfo(ctx context.Context) *StringCmd ( Tx) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( Tx) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( Tx) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( Tx) ClusterNodes(ctx context.Context) *StringCmd ( Tx) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( Tx) ClusterResetHard(ctx context.Context) *StatusCmd ( Tx) ClusterResetSoft(ctx context.Context) *StatusCmd ( Tx) ClusterSaveConfig(ctx context.Context) *StatusCmd ( Tx) ClusterShards(ctx context.Context) *ClusterShardsCmd ( Tx) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( Tx) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( Tx) Command(ctx context.Context) *CommandsInfoCmd ( Tx) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( Tx) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( Tx) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( Tx) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( Tx) ConfigResetStat(ctx context.Context) *StatusCmd ( Tx) ConfigRewrite(ctx context.Context) *StatusCmd ( Tx) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( Tx) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd ( Tx) DBSize(ctx context.Context) *IntCmd ( Tx) DebugObject(ctx context.Context, key string) *StringCmd ( Tx) Decr(ctx context.Context, key string) *IntCmd ( Tx) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( Tx) Del(ctx context.Context, keys ...string) *IntCmd ( Tx) Dump(ctx context.Context, key string) *StringCmd ( Tx) Echo(ctx context.Context, message interface{}) *StringCmd ( Tx) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Tx) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( Tx) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Tx) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( Tx) Exists(ctx context.Context, keys ...string) *IntCmd ( Tx) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Tx) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Tx) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Tx) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Tx) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Tx) ExpireTime(ctx context.Context, key string) *DurationCmd ( Tx) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Tx) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Tx) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( Tx) FlushAll(ctx context.Context) *StatusCmd ( Tx) FlushAllAsync(ctx context.Context) *StatusCmd ( Tx) FlushDB(ctx context.Context) *StatusCmd ( Tx) FlushDBAsync(ctx context.Context) *StatusCmd ( Tx) FunctionDelete(ctx context.Context, libName string) *StringCmd ( Tx) FunctionDump(ctx context.Context) *StringCmd ( Tx) FunctionFlush(ctx context.Context) *StringCmd ( Tx) FunctionFlushAsync(ctx context.Context) *StringCmd ( Tx) FunctionKill(ctx context.Context) *StringCmd ( Tx) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( Tx) FunctionLoad(ctx context.Context, code string) *StringCmd ( Tx) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( Tx) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( Tx) FunctionStats(ctx context.Context) *FunctionStatsCmd ( Tx) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( Tx) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( Tx) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( Tx) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius is a read-only GEORADIUS_RO command. GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command. GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command. GeoRadiusStore is a writing GEORADIUS command. ( Tx) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( Tx) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( Tx) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd Get Redis `GET key` command. It returns redis.Nil error when key does not exist. ( Tx) GetBit(ctx context.Context, key string, offset int64) *IntCmd GetDel redis-server version >= 6.2.0. GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0. ( Tx) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( Tx) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( Tx) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( Tx) HExists(ctx context.Context, key, field string) *BoolCmd ( Tx) HGet(ctx context.Context, key, field string) *StringCmd ( Tx) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( Tx) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( Tx) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( Tx) HKeys(ctx context.Context, key string) *StringSliceCmd ( Tx) 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. HRandField redis-server version >= 6.2.0. HRandFieldWithValues redis-server version >= 6.2.0. ( Tx) 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"}) Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` } - HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0 For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface. Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute. ( Tx) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( Tx) HVals(ctx context.Context, key string) *StringSliceCmd Hello Set the resp protocol used. ( Tx) Incr(ctx context.Context, key string) *IntCmd ( Tx) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( Tx) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( Tx) Info(ctx context.Context, sections ...string) *StringCmd ( Tx) Keys(ctx context.Context, pattern string) *StringSliceCmd ( Tx) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( Tx) LIndex(ctx context.Context, key string, index int64) *StringCmd ( Tx) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( Tx) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Tx) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( Tx) LLen(ctx context.Context, key string) *IntCmd LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2") ( Tx) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( Tx) LPop(ctx context.Context, key string) *StringCmd ( Tx) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Tx) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd ( Tx) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd ( Tx) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Tx) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Tx) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Tx) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( Tx) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( Tx) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( Tx) LastSave(ctx context.Context) *IntCmd ( Tx) 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"}) - MSet(struct), For struct types, see HSet description. 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"}) - MSetNX(struct), For struct types, see HSet description. ( Tx) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( Tx) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( Tx) Move(ctx context.Context, key string, db int) *BoolCmd ( Tx) ObjectEncoding(ctx context.Context, key string) *StringCmd ( Tx) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( Tx) ObjectRefCount(ctx context.Context, key string) *IntCmd ( Tx) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( Tx) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( Tx) PExpireTime(ctx context.Context, key string) *DurationCmd ( Tx) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( Tx) PFCount(ctx context.Context, keys ...string) *IntCmd ( Tx) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( Tx) PTTL(ctx context.Context, key string) *DurationCmd ( Tx) Persist(ctx context.Context, key string) *BoolCmd ( Tx) 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. (*Tx) Process(ctx context.Context, cmd Cmder) error ( Tx) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( Tx) PubSubNumPat(ctx context.Context) *IntCmd ( Tx) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( Tx) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( Tx) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd Publish posts the message to the channel. ( Tx) Quit(_ context.Context) *StatusCmd ( Tx) RPop(ctx context.Context, key string) *StringCmd ( Tx) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( Tx) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( Tx) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( Tx) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( Tx) RandomKey(ctx context.Context) *StringCmd ( Tx) ReadOnly(ctx context.Context) *StatusCmd ( Tx) ReadWrite(ctx context.Context) *StatusCmd ( Tx) Rename(ctx context.Context, key, newkey string) *StatusCmd ( Tx) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( Tx) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Tx) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( Tx) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( Tx) SCard(ctx context.Context, key string) *IntCmd ( Tx) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( Tx) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Tx) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( Tx) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Tx) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Tx) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd SMIsMember Redis `SMISMEMBER key member [member ...]` command. SMembers Redis `SMEMBERS key` command output as a slice. SMembersMap Redis `SMEMBERS key` command output as a map. ( Tx) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd SPop Redis `SPOP key` command. SPopN Redis `SPOP key count` command. ( Tx) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd SRandMember Redis `SRANDMEMBER key` command. SRandMemberN Redis `SRANDMEMBER key count` command. ( Tx) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Tx) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Tx) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( Tx) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( Tx) Save(ctx context.Context) *StatusCmd ( Tx) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( Tx) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( Tx) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( Tx) ScriptFlush(ctx context.Context) *StatusCmd ( Tx) ScriptKill(ctx context.Context) *StatusCmd ( Tx) ScriptLoad(ctx context.Context, script string) *StringCmd ( Tx) Select(ctx context.Context, index int) *StatusCmd Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options. ( Tx) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd SetEx Redis `SETEx key expiration value` command. SetNX Redis `SET key value [expiration] NX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Tx) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd SetXX Redis `SET key value [expiration] XX` command. Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. ( Tx) Shutdown(ctx context.Context) *StatusCmd ( Tx) ShutdownNoSave(ctx context.Context) *StatusCmd ( Tx) ShutdownSave(ctx context.Context) *StatusCmd ( Tx) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( Tx) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( Tx) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Tx) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( Tx) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( Tx) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( Tx) StrLen(ctx context.Context, key string) *IntCmd (*Tx) String() string ( Tx) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ( Tx) Sync(_ context.Context) ( Tx) TTL(ctx context.Context, key string) *DurationCmd ( Tx) Time(ctx context.Context) *TimeCmd ( Tx) 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. ( Tx) Type(ctx context.Context, key string) *StatusCmd ( Tx) Unlink(ctx context.Context, keys ...string) *IntCmd Unwatch flushes all the previously watched keys for a transaction. ( Tx) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd Watch marks the keys to be watched for conditional execution of a transaction. ( Tx) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( Tx) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( Tx) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( Tx) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( Tx) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( Tx) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( Tx) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( Tx) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( Tx) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Tx) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( Tx) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( Tx) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( Tx) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( Tx) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( Tx) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( Tx) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0. ( Tx) XLen(ctx context.Context, stream string) *IntCmd ( Tx) XPending(ctx context.Context, stream, group string) *XPendingCmd ( Tx) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( Tx) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Tx) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( Tx) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( Tx) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( Tx) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( Tx) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( Tx) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen ( Tx) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( Tx) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( Tx) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ZAdd Redis `ZADD key score member [score member ...]` command. ( Tx) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( Tx) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZAddGT Redis `ZADD key GT score member [score member ...]` command. ZAddLT Redis `ZADD key LT score member [score member ...]` command. ZAddNX Redis `ZADD key NX score member [score member ...]` command. ZAddXX Redis `ZADD key XX score member [score member ...]` command. ( Tx) ZCard(ctx context.Context, key string) *IntCmd ( Tx) ZCount(ctx context.Context, key, min, max string) *IntCmd ZDiff redis-server version >= 6.2.0. ZDiffStore redis-server version >=6.2.0. ZDiffWithScores redis-server version >= 6.2.0. ( Tx) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( Tx) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( Tx) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( Tx) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( Tx) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( Tx) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2") ( Tx) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( Tx) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( Tx) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ZRandMember redis-server version >= 6.2.0. ZRandMemberWithScores redis-server version >= 6.2.0. ( Tx) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Tx) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( Tx) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( Tx) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Tx) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Tx) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Tx) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( Tx) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Tx) ZRank(ctx context.Context, key, member string) *IntCmd ( Tx) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( Tx) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( Tx) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( Tx) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( Tx) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( Tx) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Tx) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( Tx) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( Tx) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( Tx) ZRevRank(ctx context.Context, key, member string) *IntCmd ( Tx) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( Tx) ZScore(ctx context.Context, key, member string) *FloatCmd ( Tx) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( Tx) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( Tx) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Tx : Cmdable Tx : Scripter *Tx : StatefulCmdable *Tx : github.com/tetratelabs/wazero.CompilationCache *Tx : github.com/tetratelabs/wazero/api.Closer *Tx : expvar.Var *Tx : fmt.Stringer
UniversalClient is an abstract client which - based on the provided options - represents either a ClusterClient, a FailoverClient, or a single-node Client. This can be useful for testing cluster-specific applications locally or having different clients in different environments. ( UniversalClient) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd ( UniversalClient) AddHook(Hook) ( UniversalClient) Append(ctx context.Context, key, value string) *IntCmd ( UniversalClient) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd ( UniversalClient) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd ( UniversalClient) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( UniversalClient) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd ( UniversalClient) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd ( UniversalClient) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( UniversalClient) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( UniversalClient) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd ( UniversalClient) BgRewriteAOF(ctx context.Context) *StatusCmd ( UniversalClient) BgSave(ctx context.Context) *StatusCmd ( UniversalClient) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd ( UniversalClient) BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd ( UniversalClient) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd ( UniversalClient) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd ( UniversalClient) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd ( UniversalClient) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd ( UniversalClient) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd ( UniversalClient) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd ( UniversalClient) ClientGetName(ctx context.Context) *StringCmd ( UniversalClient) ClientID(ctx context.Context) *IntCmd ( UniversalClient) ClientKill(ctx context.Context, ipPort string) *StatusCmd ( UniversalClient) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ( UniversalClient) ClientList(ctx context.Context) *StringCmd ( UniversalClient) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ( UniversalClient) ClientUnblock(ctx context.Context, id int64) *IntCmd ( UniversalClient) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ( UniversalClient) ClientUnpause(ctx context.Context) *BoolCmd ( UniversalClient) Close() error ( UniversalClient) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ( UniversalClient) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ( UniversalClient) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ( UniversalClient) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ( UniversalClient) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ( UniversalClient) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ( UniversalClient) ClusterFailover(ctx context.Context) *StatusCmd ( UniversalClient) ClusterForget(ctx context.Context, nodeID string) *StatusCmd ( UniversalClient) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ( UniversalClient) ClusterInfo(ctx context.Context) *StringCmd ( UniversalClient) ClusterKeySlot(ctx context.Context, key string) *IntCmd ( UniversalClient) ClusterLinks(ctx context.Context) *ClusterLinksCmd ( UniversalClient) ClusterMeet(ctx context.Context, host, port string) *StatusCmd ( UniversalClient) ClusterNodes(ctx context.Context) *StringCmd ( UniversalClient) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ( UniversalClient) ClusterResetHard(ctx context.Context) *StatusCmd ( UniversalClient) ClusterResetSoft(ctx context.Context) *StatusCmd ( UniversalClient) ClusterSaveConfig(ctx context.Context) *StatusCmd ( UniversalClient) ClusterShards(ctx context.Context) *ClusterShardsCmd ( UniversalClient) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ( UniversalClient) ClusterSlots(ctx context.Context) *ClusterSlotsCmd ( UniversalClient) Command(ctx context.Context) *CommandsInfoCmd ( UniversalClient) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd ( UniversalClient) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ( UniversalClient) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd ( UniversalClient) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ( UniversalClient) ConfigResetStat(ctx context.Context) *StatusCmd ( UniversalClient) ConfigRewrite(ctx context.Context) *StatusCmd ( UniversalClient) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ( UniversalClient) Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *IntCmd ( UniversalClient) DBSize(ctx context.Context) *IntCmd ( UniversalClient) DebugObject(ctx context.Context, key string) *StringCmd ( UniversalClient) Decr(ctx context.Context, key string) *IntCmd ( UniversalClient) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd ( UniversalClient) Del(ctx context.Context, keys ...string) *IntCmd ( UniversalClient) Do(ctx context.Context, args ...interface{}) *Cmd ( UniversalClient) Dump(ctx context.Context, key string) *StringCmd ( UniversalClient) Echo(ctx context.Context, message interface{}) *StringCmd ( UniversalClient) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( UniversalClient) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd ( UniversalClient) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( UniversalClient) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ( UniversalClient) Exists(ctx context.Context, keys ...string) *IntCmd ( UniversalClient) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( UniversalClient) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( UniversalClient) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( UniversalClient) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( UniversalClient) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( UniversalClient) ExpireTime(ctx context.Context, key string) *DurationCmd ( UniversalClient) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( UniversalClient) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( UniversalClient) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd ( UniversalClient) FlushAll(ctx context.Context) *StatusCmd ( UniversalClient) FlushAllAsync(ctx context.Context) *StatusCmd ( UniversalClient) FlushDB(ctx context.Context) *StatusCmd ( UniversalClient) FlushDBAsync(ctx context.Context) *StatusCmd ( UniversalClient) FunctionDelete(ctx context.Context, libName string) *StringCmd ( UniversalClient) FunctionDump(ctx context.Context) *StringCmd ( UniversalClient) FunctionFlush(ctx context.Context) *StringCmd ( UniversalClient) FunctionFlushAsync(ctx context.Context) *StringCmd ( UniversalClient) FunctionKill(ctx context.Context) *StringCmd ( UniversalClient) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd ( UniversalClient) FunctionLoad(ctx context.Context, code string) *StringCmd ( UniversalClient) FunctionLoadReplace(ctx context.Context, code string) *StringCmd ( UniversalClient) FunctionRestore(ctx context.Context, libDump string) *StringCmd ( UniversalClient) FunctionStats(ctx context.Context) *FunctionStatsCmd ( UniversalClient) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd ( UniversalClient) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd ( UniversalClient) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd ( UniversalClient) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd ( UniversalClient) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd ( UniversalClient) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd ( UniversalClient) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd ( UniversalClient) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd ( UniversalClient) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd ( UniversalClient) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd ( UniversalClient) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd ( UniversalClient) Get(ctx context.Context, key string) *StringCmd ( UniversalClient) GetBit(ctx context.Context, key string, offset int64) *IntCmd ( UniversalClient) GetDel(ctx context.Context, key string) *StringCmd ( UniversalClient) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd ( UniversalClient) GetRange(ctx context.Context, key string, start, end int64) *StringCmd ( UniversalClient) GetSet(ctx context.Context, key string, value interface{}) *StringCmd ( UniversalClient) HDel(ctx context.Context, key string, fields ...string) *IntCmd ( UniversalClient) HExists(ctx context.Context, key, field string) *BoolCmd ( UniversalClient) HGet(ctx context.Context, key, field string) *StringCmd ( UniversalClient) HGetAll(ctx context.Context, key string) *MapStringStringCmd ( UniversalClient) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd ( UniversalClient) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd ( UniversalClient) HKeys(ctx context.Context, key string) *StringSliceCmd ( UniversalClient) HLen(ctx context.Context, key string) *IntCmd ( UniversalClient) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd ( UniversalClient) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd ( UniversalClient) HRandField(ctx context.Context, key string, count int) *StringSliceCmd ( UniversalClient) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd ( UniversalClient) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( UniversalClient) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd ( UniversalClient) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd ( UniversalClient) HVals(ctx context.Context, key string) *StringSliceCmd ( UniversalClient) Incr(ctx context.Context, key string) *IntCmd ( UniversalClient) IncrBy(ctx context.Context, key string, value int64) *IntCmd ( UniversalClient) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd ( UniversalClient) Info(ctx context.Context, section ...string) *StringCmd ( UniversalClient) Keys(ctx context.Context, pattern string) *StringSliceCmd ( UniversalClient) LCS(ctx context.Context, q *LCSQuery) *LCSCmd ( UniversalClient) LIndex(ctx context.Context, key string, index int64) *StringCmd ( UniversalClient) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd ( UniversalClient) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( UniversalClient) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd ( UniversalClient) LLen(ctx context.Context, key string) *IntCmd ( UniversalClient) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd ( UniversalClient) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd ( UniversalClient) LPop(ctx context.Context, key string) *StringCmd ( UniversalClient) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( UniversalClient) LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd ( UniversalClient) LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd ( UniversalClient) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( UniversalClient) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( UniversalClient) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( UniversalClient) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd ( UniversalClient) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd ( UniversalClient) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd ( UniversalClient) LastSave(ctx context.Context) *IntCmd ( UniversalClient) MGet(ctx context.Context, keys ...string) *SliceCmd ( UniversalClient) MSet(ctx context.Context, values ...interface{}) *StatusCmd ( UniversalClient) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd ( UniversalClient) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ( UniversalClient) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd ( UniversalClient) Move(ctx context.Context, key string, db int) *BoolCmd ( UniversalClient) ObjectEncoding(ctx context.Context, key string) *StringCmd ( UniversalClient) ObjectIdleTime(ctx context.Context, key string) *DurationCmd ( UniversalClient) ObjectRefCount(ctx context.Context, key string) *IntCmd ( UniversalClient) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ( UniversalClient) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ( UniversalClient) PExpireTime(ctx context.Context, key string) *DurationCmd ( UniversalClient) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd ( UniversalClient) PFCount(ctx context.Context, keys ...string) *IntCmd ( UniversalClient) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd ( UniversalClient) PSubscribe(ctx context.Context, channels ...string) *PubSub ( UniversalClient) PTTL(ctx context.Context, key string) *DurationCmd ( UniversalClient) Persist(ctx context.Context, key string) *BoolCmd ( UniversalClient) Ping(ctx context.Context) *StatusCmd ( UniversalClient) Pipeline() Pipeliner ( UniversalClient) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( UniversalClient) PoolStats() *PoolStats ( UniversalClient) Process(ctx context.Context, cmd Cmder) error ( UniversalClient) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd ( UniversalClient) PubSubNumPat(ctx context.Context) *IntCmd ( UniversalClient) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( UniversalClient) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd ( UniversalClient) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd ( UniversalClient) Publish(ctx context.Context, channel string, message interface{}) *IntCmd ( UniversalClient) Quit(ctx context.Context) *StatusCmd ( UniversalClient) RPop(ctx context.Context, key string) *StringCmd ( UniversalClient) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd ( UniversalClient) RPopLPush(ctx context.Context, source, destination string) *StringCmd ( UniversalClient) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd ( UniversalClient) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd ( UniversalClient) RandomKey(ctx context.Context) *StringCmd ( UniversalClient) ReadOnly(ctx context.Context) *StatusCmd ( UniversalClient) ReadWrite(ctx context.Context) *StatusCmd ( UniversalClient) Rename(ctx context.Context, key, newkey string) *StatusCmd ( UniversalClient) RenameNX(ctx context.Context, key, newkey string) *BoolCmd ( UniversalClient) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( UniversalClient) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd ( UniversalClient) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd ( UniversalClient) SCard(ctx context.Context, key string) *IntCmd ( UniversalClient) SDiff(ctx context.Context, keys ...string) *StringSliceCmd ( UniversalClient) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( UniversalClient) SInter(ctx context.Context, keys ...string) *StringSliceCmd ( UniversalClient) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( UniversalClient) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd ( UniversalClient) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd ( UniversalClient) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd ( UniversalClient) SMembers(ctx context.Context, key string) *StringSliceCmd ( UniversalClient) SMembersMap(ctx context.Context, key string) *StringStructMapCmd ( UniversalClient) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd ( UniversalClient) SPop(ctx context.Context, key string) *StringCmd ( UniversalClient) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd ( UniversalClient) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd ( UniversalClient) SRandMember(ctx context.Context, key string) *StringCmd ( UniversalClient) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd ( UniversalClient) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( UniversalClient) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( UniversalClient) SSubscribe(ctx context.Context, channels ...string) *PubSub ( UniversalClient) SUnion(ctx context.Context, keys ...string) *StringSliceCmd ( UniversalClient) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd ( UniversalClient) Save(ctx context.Context) *StatusCmd ( UniversalClient) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ( UniversalClient) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd ( UniversalClient) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ( UniversalClient) ScriptFlush(ctx context.Context) *StatusCmd ( UniversalClient) ScriptKill(ctx context.Context) *StatusCmd ( UniversalClient) ScriptLoad(ctx context.Context, script string) *StringCmd ( UniversalClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( UniversalClient) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd ( UniversalClient) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd ( UniversalClient) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd ( UniversalClient) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( UniversalClient) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd ( UniversalClient) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd ( UniversalClient) Shutdown(ctx context.Context) *StatusCmd ( UniversalClient) ShutdownNoSave(ctx context.Context) *StatusCmd ( UniversalClient) ShutdownSave(ctx context.Context) *StatusCmd ( UniversalClient) SlaveOf(ctx context.Context, host, port string) *StatusCmd ( UniversalClient) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd ( UniversalClient) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( UniversalClient) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd ( UniversalClient) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd ( UniversalClient) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd ( UniversalClient) StrLen(ctx context.Context, key string) *IntCmd ( UniversalClient) Subscribe(ctx context.Context, channels ...string) *PubSub ( UniversalClient) TTL(ctx context.Context, key string) *DurationCmd ( UniversalClient) Time(ctx context.Context) *TimeCmd ( UniversalClient) Touch(ctx context.Context, keys ...string) *IntCmd ( UniversalClient) TxPipeline() Pipeliner ( UniversalClient) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) ( UniversalClient) Type(ctx context.Context, key string) *StatusCmd ( UniversalClient) Unlink(ctx context.Context, keys ...string) *IntCmd ( UniversalClient) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error ( UniversalClient) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd ( UniversalClient) XAdd(ctx context.Context, a *XAddArgs) *StringCmd ( UniversalClient) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd ( UniversalClient) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd ( UniversalClient) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd ( UniversalClient) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd ( UniversalClient) XDel(ctx context.Context, stream string, ids ...string) *IntCmd ( UniversalClient) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd ( UniversalClient) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( UniversalClient) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd ( UniversalClient) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd ( UniversalClient) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd ( UniversalClient) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd ( UniversalClient) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd ( UniversalClient) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd ( UniversalClient) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd ( UniversalClient) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd ( UniversalClient) XLen(ctx context.Context, stream string) *IntCmd ( UniversalClient) XPending(ctx context.Context, stream, group string) *XPendingCmd ( UniversalClient) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd ( UniversalClient) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd ( UniversalClient) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd ( UniversalClient) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd ( UniversalClient) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd ( UniversalClient) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd ( UniversalClient) XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd ( UniversalClient) XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd ( UniversalClient) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd ( UniversalClient) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd ( UniversalClient) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd ( UniversalClient) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd ( UniversalClient) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd ( UniversalClient) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ( UniversalClient) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ( UniversalClient) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd ( UniversalClient) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd ( UniversalClient) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd ( UniversalClient) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd ( UniversalClient) ZCard(ctx context.Context, key string) *IntCmd ( UniversalClient) ZCount(ctx context.Context, key, min, max string) *IntCmd ( UniversalClient) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd ( UniversalClient) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ( UniversalClient) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd ( UniversalClient) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ( UniversalClient) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ( UniversalClient) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ( UniversalClient) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ( UniversalClient) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ( UniversalClient) ZLexCount(ctx context.Context, key, min, max string) *IntCmd ( UniversalClient) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd ( UniversalClient) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ( UniversalClient) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ( UniversalClient) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ( UniversalClient) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd ( UniversalClient) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd ( UniversalClient) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( UniversalClient) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ( UniversalClient) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ( UniversalClient) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( UniversalClient) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( UniversalClient) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( UniversalClient) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ( UniversalClient) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( UniversalClient) ZRank(ctx context.Context, key, member string) *IntCmd ( UniversalClient) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ( UniversalClient) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ( UniversalClient) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ( UniversalClient) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ( UniversalClient) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ( UniversalClient) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( UniversalClient) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ( UniversalClient) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ( UniversalClient) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ( UniversalClient) ZRevRank(ctx context.Context, key, member string) *IntCmd ( UniversalClient) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd ( UniversalClient) ZScore(ctx context.Context, key, member string) *FloatCmd ( UniversalClient) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ( UniversalClient) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ( UniversalClient) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd *Client *ClusterClient *Ring UniversalClient : Cmdable UniversalClient : Scripter UniversalClient : github.com/prometheus/common/expfmt.Closer UniversalClient : io.Closer func NewUniversalClient(opts *UniversalOptions) UniversalClient func github.com/hibiken/asynq/internal/rdb.(*RDB).Client() UniversalClient func github.com/hibiken/asynq/internal/rdb.NewRDB(client UniversalClient) *rdb.RDB
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. ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration ContextTimeoutEnabled bool 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) MasterName string MaxIdleConns int MaxRedirects int MaxRetries int MaxRetryBackoff time.Duration MinIdleConns int MinRetryBackoff time.Duration OnConnect func(ctx context.Context, cn *Conn) error Password string PoolFIFO uses FIFO mode for each node connection pool GET/PUT (default LIFO). PoolSize int PoolTimeout time.Duration ReadOnly bool ReadTimeout time.Duration RouteByLatency bool RouteRandomly bool SentinelPassword string SentinelUsername 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. MaxLen/MaxLenApprox and MinID are in conflict, only one of them can be used. Approx causes MaxLen and MinID to use "~" matcher (instead of "="). ID string Limit int64 // MAXLEN N MinID string NoMkStream bool 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 Count int64 Group string MinIdle time.Duration Start string Stream string func Cmdable.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd func Cmdable.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd func Pipeliner.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd func Pipeliner.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd func StatefulCmdable.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd func StatefulCmdable.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd func UniversalClient.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd func UniversalClient.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
(*XAutoClaimCmd) Args() []interface{} (*XAutoClaimCmd) Err() error (*XAutoClaimCmd) FullName() string (*XAutoClaimCmd) Name() string (*XAutoClaimCmd) Result() (messages []XMessage, start string, err error) (*XAutoClaimCmd) SetErr(e error) (*XAutoClaimCmd) SetFirstKeyPos(keyPos int8) (*XAutoClaimCmd) SetVal(val []XMessage, start string) (*XAutoClaimCmd) String() string (*XAutoClaimCmd) Val() (messages []XMessage, start string) *XAutoClaimCmd : Cmder *XAutoClaimCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XAutoClaimCmd : expvar.Var *XAutoClaimCmd : fmt.Stringer func NewXAutoClaimCmd(ctx context.Context, args ...interface{}) *XAutoClaimCmd func Cmdable.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd func Pipeliner.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd func StatefulCmdable.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd func UniversalClient.XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
(*XAutoClaimJustIDCmd) Args() []interface{} (*XAutoClaimJustIDCmd) Err() error (*XAutoClaimJustIDCmd) FullName() string (*XAutoClaimJustIDCmd) Name() string (*XAutoClaimJustIDCmd) Result() (ids []string, start string, err error) (*XAutoClaimJustIDCmd) SetErr(e error) (*XAutoClaimJustIDCmd) SetFirstKeyPos(keyPos int8) (*XAutoClaimJustIDCmd) SetVal(val []string, start string) (*XAutoClaimJustIDCmd) String() string (*XAutoClaimJustIDCmd) Val() (ids []string, start string) *XAutoClaimJustIDCmd : Cmder *XAutoClaimJustIDCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XAutoClaimJustIDCmd : expvar.Var *XAutoClaimJustIDCmd : fmt.Stringer func NewXAutoClaimJustIDCmd(ctx context.Context, args ...interface{}) *XAutoClaimJustIDCmd func Cmdable.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd func Pipeliner.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd func StatefulCmdable.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd func UniversalClient.XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
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
Idle time.Duration Name string Pending int64 func (*XInfoConsumersCmd).Result() ([]XInfoConsumer, error) func (*XInfoConsumersCmd).Val() []XInfoConsumer func (*XInfoConsumersCmd).SetVal(val []XInfoConsumer)
(*XInfoConsumersCmd) Args() []interface{} (*XInfoConsumersCmd) Err() error (*XInfoConsumersCmd) FullName() string (*XInfoConsumersCmd) Name() string (*XInfoConsumersCmd) Result() ([]XInfoConsumer, error) (*XInfoConsumersCmd) SetErr(e error) (*XInfoConsumersCmd) SetFirstKeyPos(keyPos int8) (*XInfoConsumersCmd) SetVal(val []XInfoConsumer) (*XInfoConsumersCmd) String() string (*XInfoConsumersCmd) Val() []XInfoConsumer *XInfoConsumersCmd : Cmder *XInfoConsumersCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XInfoConsumersCmd : expvar.Var *XInfoConsumersCmd : fmt.Stringer func NewXInfoConsumersCmd(ctx context.Context, stream string, group string) *XInfoConsumersCmd func Cmdable.XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd func Pipeliner.XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd func StatefulCmdable.XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd func UniversalClient.XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
Consumers int64 EntriesRead int64 Lag int64 LastDeliveredID string Name string Pending int64 func (*XInfoGroupsCmd).Result() ([]XInfoGroup, error) func (*XInfoGroupsCmd).Val() []XInfoGroup func (*XInfoGroupsCmd).SetVal(val []XInfoGroup)
(*XInfoGroupsCmd) Args() []interface{} (*XInfoGroupsCmd) Err() error (*XInfoGroupsCmd) FullName() string (*XInfoGroupsCmd) Name() string (*XInfoGroupsCmd) Result() ([]XInfoGroup, error) (*XInfoGroupsCmd) SetErr(e error) (*XInfoGroupsCmd) SetFirstKeyPos(keyPos int8) (*XInfoGroupsCmd) SetVal(val []XInfoGroup) (*XInfoGroupsCmd) String() string (*XInfoGroupsCmd) Val() []XInfoGroup *XInfoGroupsCmd : Cmder *XInfoGroupsCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XInfoGroupsCmd : expvar.Var *XInfoGroupsCmd : 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
EntriesAdded int64 FirstEntry XMessage Groups int64 LastEntry XMessage LastGeneratedID string Length int64 MaxDeletedEntryID string RadixTreeKeys int64 RadixTreeNodes int64 RecordedFirstEntryID string func (*XInfoStreamCmd).Result() (*XInfoStream, error) func (*XInfoStreamCmd).Val() *XInfoStream func (*XInfoStreamCmd).SetVal(val *XInfoStream)
(*XInfoStreamCmd) Args() []interface{} (*XInfoStreamCmd) Err() error (*XInfoStreamCmd) FullName() string (*XInfoStreamCmd) Name() string (*XInfoStreamCmd) Result() (*XInfoStream, error) (*XInfoStreamCmd) SetErr(e error) (*XInfoStreamCmd) SetFirstKeyPos(keyPos int8) (*XInfoStreamCmd) SetVal(val *XInfoStream) (*XInfoStreamCmd) String() string (*XInfoStreamCmd) Val() *XInfoStream *XInfoStreamCmd : Cmder *XInfoStreamCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XInfoStreamCmd : expvar.Var *XInfoStreamCmd : fmt.Stringer func NewXInfoStreamCmd(ctx context.Context, stream string) *XInfoStreamCmd func Cmdable.XInfoStream(ctx context.Context, key string) *XInfoStreamCmd func Pipeliner.XInfoStream(ctx context.Context, key string) *XInfoStreamCmd func StatefulCmdable.XInfoStream(ctx context.Context, key string) *XInfoStreamCmd func UniversalClient.XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
Entries []XMessage EntriesAdded int64 Groups []XInfoStreamGroup LastGeneratedID string Length int64 MaxDeletedEntryID string RadixTreeKeys int64 RadixTreeNodes int64 RecordedFirstEntryID string func (*XInfoStreamFullCmd).Result() (*XInfoStreamFull, error) func (*XInfoStreamFullCmd).Val() *XInfoStreamFull func (*XInfoStreamFullCmd).SetVal(val *XInfoStreamFull)
(*XInfoStreamFullCmd) Args() []interface{} (*XInfoStreamFullCmd) Err() error (*XInfoStreamFullCmd) FullName() string (*XInfoStreamFullCmd) Name() string (*XInfoStreamFullCmd) Result() (*XInfoStreamFull, error) (*XInfoStreamFullCmd) SetErr(e error) (*XInfoStreamFullCmd) SetFirstKeyPos(keyPos int8) (*XInfoStreamFullCmd) SetVal(val *XInfoStreamFull) (*XInfoStreamFullCmd) String() string (*XInfoStreamFullCmd) Val() *XInfoStreamFull *XInfoStreamFullCmd : Cmder *XInfoStreamFullCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XInfoStreamFullCmd : expvar.Var *XInfoStreamFullCmd : fmt.Stringer func NewXInfoStreamFullCmd(ctx context.Context, args ...interface{}) *XInfoStreamFullCmd func Cmdable.XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd func Pipeliner.XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd func StatefulCmdable.XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd func UniversalClient.XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
ID string Values map[string]interface{} func (*XAutoClaimCmd).Result() (messages []XMessage, start string, err error) func (*XAutoClaimCmd).Val() (messages []XMessage, start string) func (*XMessageSliceCmd).Result() ([]XMessage, error) func (*XMessageSliceCmd).Val() []XMessage func NewXMessageSliceCmdResult(val []XMessage, err error) *XMessageSliceCmd func (*XAutoClaimCmd).SetVal(val []XMessage, start string) func (*XMessageSliceCmd).SetVal(val []XMessage)
(*XMessageSliceCmd) Args() []interface{} (*XMessageSliceCmd) Err() error (*XMessageSliceCmd) FullName() string (*XMessageSliceCmd) Name() string (*XMessageSliceCmd) Result() ([]XMessage, error) (*XMessageSliceCmd) SetErr(e error) (*XMessageSliceCmd) SetFirstKeyPos(keyPos int8) (*XMessageSliceCmd) SetVal(val []XMessage) (*XMessageSliceCmd) String() string (*XMessageSliceCmd) Val() []XMessage *XMessageSliceCmd : Cmder *XMessageSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XMessageSliceCmd : expvar.Var *XMessageSliceCmd : 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 func NewXPendingResult(val *XPending, err error) *XPendingCmd func (*XPendingCmd).SetVal(val *XPending)
(*XPendingCmd) Args() []interface{} (*XPendingCmd) Err() error (*XPendingCmd) FullName() string (*XPendingCmd) Name() string (*XPendingCmd) Result() (*XPending, error) (*XPendingCmd) SetErr(e error) (*XPendingCmd) SetFirstKeyPos(keyPos int8) (*XPendingCmd) SetVal(val *XPending) (*XPendingCmd) String() string (*XPendingCmd) Val() *XPending *XPendingCmd : Cmder *XPendingCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XPendingCmd : expvar.Var *XPendingCmd : fmt.Stringer func NewXPendingCmd(ctx context.Context, args ...interface{}) *XPendingCmd func NewXPendingResult(val *XPending, err error) *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 func (*XPendingExtCmd).SetVal(val []XPendingExt)
Consumer string Count int64 End string Group string Idle time.Duration 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
(*XPendingExtCmd) Args() []interface{} (*XPendingExtCmd) Err() error (*XPendingExtCmd) FullName() string (*XPendingExtCmd) Name() string (*XPendingExtCmd) Result() ([]XPendingExt, error) (*XPendingExtCmd) SetErr(e error) (*XPendingExtCmd) SetFirstKeyPos(keyPos int8) (*XPendingExtCmd) SetVal(val []XPendingExt) (*XPendingExtCmd) String() string (*XPendingExtCmd) Val() []XPendingExt *XPendingExtCmd : Cmder *XPendingExtCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XPendingExtCmd : expvar.Var *XPendingExtCmd : 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 func (*XStreamSliceCmd).SetVal(val []XStream)
(*XStreamSliceCmd) Args() []interface{} (*XStreamSliceCmd) Err() error (*XStreamSliceCmd) FullName() string (*XStreamSliceCmd) Name() string (*XStreamSliceCmd) Result() ([]XStream, error) (*XStreamSliceCmd) SetErr(e error) (*XStreamSliceCmd) SetFirstKeyPos(keyPos int8) (*XStreamSliceCmd) SetVal(val []XStream) (*XStreamSliceCmd) String() string (*XStreamSliceCmd) Val() []XStream *XStreamSliceCmd : Cmder *XStreamSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *XStreamSliceCmd : expvar.Var *XStreamSliceCmd : 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 (*ZSliceWithKeyCmd).Result() (string, []Z, error) func (*ZSliceWithKeyCmd).Val() (string, []Z) func NewZSliceCmdResult(val []Z, err error) *ZSliceCmd func Cmdable.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func Cmdable.ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func Pipeliner.ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func StatefulCmdable.ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAdd(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd func UniversalClient.ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd func (*ZSliceCmd).SetVal(val []Z) func (*ZSliceWithKeyCmd).SetVal(key string, val []Z)
ZAddArgs WARN: The GT, LT and NX options are mutually exclusive. Ch bool GT bool LT bool Members []Z NX bool XX bool func Cmdable.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func Cmdable.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd func Pipeliner.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func Pipeliner.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd func StatefulCmdable.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func StatefulCmdable.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd func UniversalClient.ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd func UniversalClient.ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd
ZRangeArgs is all the options of the ZRange command. In version> 6.2.0, you can replace the(cmd): ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZRANGEBYLEX, ZREVRANGEBYLEX. Please pay attention to your redis-server version. Rev, ByScore, ByLex and Offset+Count options require redis-server 6.2.0 and higher. ByLex bool The ByScore and ByLex options are mutually exclusive. Count int64 Key string limit offset count. Rev bool When the ByScore option is provided, the open interval(exclusive) can be set. By default, the score intervals specified by <Start> and <Stop> are closed (inclusive). It is similar to the deprecated(6.2.0+) ZRangeByScore command. For example: ZRangeArgs{ Key: "example-key", Start: "(3", Stop: 8, ByScore: true, } cmd: "ZRange example-key (3 8 ByScore" (3 < score <= 8). For the ByLex option, it is similar to the deprecated(6.2.0+) ZRangeByLex command. You can set the <Start> and <Stop> options as follows: ZRangeArgs{ Key: "example-key", Start: "[abc", Stop: "(def", ByLex: true, } cmd: "ZRange example-key [abc (def ByLex" For normal cases (ByScore==false && ByLex==false), <Start> and <Stop> should be set to the index range (int). You can read the documentation for more information: https://redis.io/commands/zrange Stop interface{} func Cmdable.ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd func Cmdable.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd func Cmdable.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd func Pipeliner.ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd func Pipeliner.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd func Pipeliner.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd func StatefulCmdable.ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd func StatefulCmdable.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd func StatefulCmdable.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd func UniversalClient.ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd func UniversalClient.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd func UniversalClient.ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
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
(*ZSliceCmd) Args() []interface{} (*ZSliceCmd) Err() error (*ZSliceCmd) FullName() string (*ZSliceCmd) Name() string (*ZSliceCmd) Result() ([]Z, error) (*ZSliceCmd) SetErr(e error) (*ZSliceCmd) SetFirstKeyPos(keyPos int8) (*ZSliceCmd) SetVal(val []Z) (*ZSliceCmd) String() string (*ZSliceCmd) Val() []Z *ZSliceCmd : Cmder *ZSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *ZSliceCmd : expvar.Var *ZSliceCmd : fmt.Stringer func NewZSliceCmd(ctx context.Context, args ...interface{}) *ZSliceCmd func NewZSliceCmdResult(val []Z, err error) *ZSliceCmd func Cmdable.ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd func Cmdable.ZInterWithScores(ctx context.Context, store *ZStore) *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.ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd func Cmdable.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *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 Cmdable.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd func Pipeliner.ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd func Pipeliner.ZInterWithScores(ctx context.Context, store *ZStore) *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.ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd func Pipeliner.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *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 Pipeliner.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd func StatefulCmdable.ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd func StatefulCmdable.ZInterWithScores(ctx context.Context, store *ZStore) *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.ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd func StatefulCmdable.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *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 StatefulCmdable.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd func UniversalClient.ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd func UniversalClient.ZInterWithScores(ctx context.Context, store *ZStore) *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.ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd func UniversalClient.ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *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 func UniversalClient.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
(*ZSliceWithKeyCmd) Args() []interface{} (*ZSliceWithKeyCmd) Err() error (*ZSliceWithKeyCmd) FullName() string (*ZSliceWithKeyCmd) Name() string (*ZSliceWithKeyCmd) Result() (string, []Z, error) (*ZSliceWithKeyCmd) SetErr(e error) (*ZSliceWithKeyCmd) SetFirstKeyPos(keyPos int8) (*ZSliceWithKeyCmd) SetVal(key string, val []Z) (*ZSliceWithKeyCmd) String() string (*ZSliceWithKeyCmd) Val() (string, []Z) *ZSliceWithKeyCmd : Cmder *ZSliceWithKeyCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *ZSliceWithKeyCmd : expvar.Var *ZSliceWithKeyCmd : fmt.Stringer func NewZSliceWithKeyCmd(ctx context.Context, args ...interface{}) *ZSliceWithKeyCmd func Cmdable.BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd func Cmdable.ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd func Pipeliner.BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd func Pipeliner.ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd func StatefulCmdable.BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd func StatefulCmdable.ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd func UniversalClient.BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd func UniversalClient.ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
ZStore is used as an arg to ZInter/ZInterStore and ZUnion/ZUnionStore. Can be SUM, MIN or MAX. Keys []string Weights []float64 func Cmdable.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func Cmdable.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func Cmdable.ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd func Cmdable.ZUnion(ctx context.Context, store ZStore) *StringSliceCmd func Cmdable.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func Cmdable.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd func Pipeliner.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func Pipeliner.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func Pipeliner.ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd func Pipeliner.ZUnion(ctx context.Context, store ZStore) *StringSliceCmd func Pipeliner.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func Pipeliner.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd func StatefulCmdable.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func StatefulCmdable.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func StatefulCmdable.ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd func StatefulCmdable.ZUnion(ctx context.Context, store ZStore) *StringSliceCmd func StatefulCmdable.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func StatefulCmdable.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd func UniversalClient.ZInter(ctx context.Context, store *ZStore) *StringSliceCmd func UniversalClient.ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd func UniversalClient.ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd func UniversalClient.ZUnion(ctx context.Context, store ZStore) *StringSliceCmd func UniversalClient.ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd func UniversalClient.ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
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 func (*ZWithKeyCmd).SetVal(val *ZWithKey)
(*ZWithKeyCmd) Args() []interface{} (*ZWithKeyCmd) Err() error (*ZWithKeyCmd) FullName() string (*ZWithKeyCmd) Name() string (*ZWithKeyCmd) Result() (*ZWithKey, error) (*ZWithKeyCmd) SetErr(e error) (*ZWithKeyCmd) SetFirstKeyPos(keyPos int8) (*ZWithKeyCmd) SetVal(val *ZWithKey) (*ZWithKeyCmd) String() string (*ZWithKeyCmd) Val() *ZWithKey *ZWithKeyCmd : Cmder *ZWithKeyCmd : github.com/polarsignals/frostdb/query/logicalplan.Named *ZWithKeyCmd : expvar.Var *ZWithKeyCmd : 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 86)
HasErrorPrefix checks if the err is a Redis error and the message contains a prefix.
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.
func NewClusterLinksCmd(ctx context.Context, args ...interface{}) *ClusterLinksCmd
func NewClusterShardsCmd(ctx context.Context, args ...interface{}) *ClusterShardsCmd
func NewClusterSlotsCmd(ctx context.Context, args ...interface{}) *ClusterSlotsCmd
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.
func NewCommandsInfoCmd(ctx context.Context, args ...interface{}) *CommandsInfoCmd
NewCommandsInfoCmdResult returns a CommandsInfoCmd initialised with val and err for testing.
NewDialer returns a function that will be used as the default dialer when none is specified in Options.Dialer.
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 replica node.
func NewFloatCmd(ctx context.Context, args ...interface{}) *FloatCmd
NewFloatResult returns a FloatCmd initialised with val and err for testing.
func NewFloatSliceCmd(ctx context.Context, args ...interface{}) *FloatSliceCmd
func NewFunctionListCmd(ctx context.Context, args ...interface{}) *FunctionListCmd
func NewFunctionStatsCmd(ctx context.Context, args ...interface{}) *FunctionStatsCmd
func NewGeoLocationCmd(ctx context.Context, q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd
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 NewKeyFlagsCmd(ctx context.Context, args ...interface{}) *KeyFlagsCmd
func NewKeyValuesCmd(ctx context.Context, args ...interface{}) *KeyValuesCmd
func NewKeyValueSliceCmd(ctx context.Context, args ...interface{}) *KeyValueSliceCmd
func NewMapStringIntCmd(ctx context.Context, args ...interface{}) *MapStringIntCmd
NewMapStringIntCmdResult returns a MapStringIntCmd initialised with val and err for testing.
func NewMapStringStringCmd(ctx context.Context, args ...interface{}) *MapStringStringCmd
NewStringStringMapResult returns a StringStringMapCmd initialised with val and err for testing.
func NewRing(opt *RingOptions) *Ring
func NewScanCmd(ctx context.Context, process cmdable, args ...interface{}) *ScanCmd
NewScanCmdResult returns a ScanCmd initialised with val and err for testing.
func NewScript(src string) *Script
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
NewStringResult returns a StringCmd initialised with val and err for testing.
func NewStringSliceCmd(ctx context.Context, args ...interface{}) *StringSliceCmd
NewStringSliceResult returns a StringSliceCmd initialised with val and err for testing.
func NewStringStructMapCmd(ctx context.Context, args ...interface{}) *StringStructMapCmd
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 the returned client depends on the following conditions: 1. If the MasterName option is specified, a sentinel-backed FailoverClient is returned. 2. if the number of Addrs is two or more, a ClusterClient is returned. 3. Otherwise, a single-node Client is returned.
func NewXAutoClaimCmd(ctx context.Context, args ...interface{}) *XAutoClaimCmd
func NewXInfoStreamFullCmd(ctx context.Context, args ...interface{}) *XInfoStreamFullCmd
func NewXMessageSliceCmd(ctx context.Context, args ...interface{}) *XMessageSliceCmd
NewXMessageSliceCmdResult returns a XMessageSliceCmd initialised with val and err for testing.
func NewXPendingCmd(ctx context.Context, args ...interface{}) *XPendingCmd
func NewXPendingExtCmd(ctx context.Context, args ...interface{}) *XPendingExtCmd
NewXPendingResult returns a XPendingCmd initialised with val and err for testing.
func NewXStreamSliceCmd(ctx context.Context, args ...interface{}) *XStreamSliceCmd
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 NewZSliceWithKeyCmd(ctx context.Context, args ...interface{}) *ZSliceWithKeyCmd
func NewZWithKeyCmd(ctx context.Context, args ...interface{}) *ZWithKeyCmd
NewZWithKeyCmdResult returns a NewZWithKeyCmd initialised with val and err for testing.
ParseClusterURL parses a URL into ClusterOptions that can be used to connect to Redis. The URL must be in the form: redis://<user>:<password>@<host>:<port> or rediss://<user>:<password>@<host>:<port> To add additional addresses, specify the query parameter, "addr" one or more times. e.g: redis://<user>:<password>@<host>:<port>?addr=<host2>:<port2>&addr=<host3>:<port3> or rediss://<user>:<password>@<host>:<port>?addr=<host2>:<port2>&addr=<host3>:<port3> Most Option fields can be set using query parameters, with the following restrictions: - field names are mapped using snake-case conversion: to set MaxRetries, use max_retries - only scalar type fields are supported (bool, int, time.Duration) - for time.Duration fields, values must be a valid input for time.ParseDuration(); additionally a plain integer as value (i.e. without unit) is intepreted as seconds - to disable a duration field, use value less than or equal to 0; to use the default value, leave the value blank or remove the parameter - only the last value is interpreted if a parameter is given multiple times - fields "network", "addr", "username" and "password" can only be set using other URL attributes (scheme, host, userinfo, resp.), query paremeters using these names will be treated as unknown parameters - unknown parameter names will result in an error Example: redis://user:password@localhost:6789?dial_timeout=3&read_timeout=6s&addr=localhost:6790&addr=localhost:6791 is equivalent to: &ClusterOptions{ Addr: ["localhost:6789", "localhost:6790", "localhost:6791"] DialTimeout: 3 * time.Second, // no time unit = seconds ReadTimeout: 6 * time.Second, }
ParseURL parses an URL into Options that can be used to connect to Redis. Scheme is required. There are two connection types: by tcp socket and by unix socket. Tcp connection: redis://<user>:<password>@<host>:<port>/<db_number> Unix connection: unix://<user>:<password>@</path/to/redis.sock>?db=<db_number> Most Option fields can be set using query parameters, with the following restrictions: - field names are mapped using snake-case conversion: to set MaxRetries, use max_retries - only scalar type fields are supported (bool, int, time.Duration) - for time.Duration fields, values must be a valid input for time.ParseDuration(); additionally a plain integer as value (i.e. without unit) is intepreted as seconds - to disable a duration field, use value less than or equal to 0; to use the default value, leave the value blank or remove the parameter - only the last value is interpreted if a parameter is given multiple times - fields "network", "addr", "username" and "password" can only be set using other URL attributes (scheme, host, userinfo, resp.), query paremeters using these names will be treated as unknown parameters - unknown parameter names will result in an error Examples: redis://user:password@localhost:6789/3?dial_timeout=3&db=1&read_timeout=6s&max_retries=2 is equivalent to: &Options{ Network: "tcp", Addr: "localhost:6789", DB: 1, // path "/3" was overridden by "&db=1" DialTimeout: 3 * time.Second, // no time unit = seconds ReadTimeout: 6 * time.Second, MaxRetries: 2, }
SetLogger set custom log
Version is the current release version.
WithChannelHealthCheckInterval specifies the health check interval. PubSub will ping Redis Server if it does not receive any messages within the interval. To disable health check, use zero interval. The default is 3 seconds.
WithChannelSendTimeout specifies the channel send timeout after which the message is dropped. The default is 60 seconds.
WithChannelSize specifies the Go chan size that is used to buffer incoming messages. The default is 100 messages.
Package-Level Variables (only one)
ErrClosed performs any operation on the closed client will return this error.
Package-Level Constants (total 3)
KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. For example: rdb.Set(ctx, key, value, redis.KeepTTL)
Nil reply returned by Redis when key does not exist.
TxFailedErr transaction redis failed.