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
Client
{
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)
}
}
Client_BLPop
{
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])
}
Client_HSet
{
// 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)
}
}
Client_Incr
{
result, err := rdb.Incr(ctx, "counter").Result()
if err != nil {
panic(err)
}
fmt.Println(result)
}
Client_Pipeline
{
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)
}
Client_Pipelined
{
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)
}
Client_Scan
{
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)
}
Client_ScanType
{
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)
}
Client_ScanType_hashType
{
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))
}
Client_Set
{
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)
}
}
Client_SetEx
{
err := rdb.SetEx(ctx, "key", "value", time.Hour).Err()
if err != nil {
panic(err)
}
}
Client_SlowLogGet
{
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))
}
Client_TxPipeline
{
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)
}
Client_TxPipelined
{
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)
}
Client_Watch
{
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)
}
Client_Watch_instrumentation
{
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
{
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)
}
MapStringStringCmd_Scan
{
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)
}
NewClient
{
rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "",
DB: 0,
})
pong, err := rdb.Ping(ctx).Result()
fmt.Println(pong, err)
}
NewClusterClient
{
rdb := redis.NewClusterClient(&redis.ClusterOptions{
Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"},
})
rdb.Ping(ctx)
}
NewClusterClient_manualSetup
{
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)
}
NewFailoverClient
{
rdb := redis.NewFailoverClient(&redis.FailoverOptions{
MasterName: "master",
SentinelAddrs: []string{":26379"},
})
rdb.Ping(ctx)
}
NewRing
{
rdb := redis.NewRing(&redis.RingOptions{
Addrs: map[string]string{
"shard1": ":7000",
"shard2": ":7001",
"shard3": ":7002",
},
})
rdb.Ping(ctx)
}
NewUniversalClient_cluster
{
rdb := redis.NewUniversalClient(&redis.UniversalOptions{
Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"},
})
defer rdb.Close()
rdb.Ping(ctx)
}
NewUniversalClient_failover
{
rdb := redis.NewUniversalClient(&redis.UniversalOptions{
MasterName: "master",
Addrs: []string{":26379"},
})
defer rdb.Close()
rdb.Ping(ctx)
}
NewUniversalClient_simple
{
rdb := redis.NewUniversalClient(&redis.UniversalOptions{
Addrs: []string{":6379"},
})
defer rdb.Close()
rdb.Ping(ctx)
}
ParseURL
{
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)
}
Pipeline_instrumentation
{
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
{
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_Receive
{
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")
}
}
}
ScanCmd_Iterator
{
iter := rdb.Scan(ctx, 0, "", 0).Iterator()
for iter.Next(ctx) {
fmt.Println(iter.Val())
}
if err := iter.Err(); err != nil {
panic(err)
}
}
ScanIterator
{
iter := rdb.Scan(ctx, 0, "", 0).Iterator()
for iter.Next(ctx) {
fmt.Println(iter.Val())
}
if err := iter.Err(); err != nil {
panic(err)
}
}
Script
{
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)
}
SliceCmd_Scan
{
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)
}
_customCommand
{
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)
}
_customCommand2
{
v, err := rdb.Do(ctx, "get", "key_does_not_exist").Text()
fmt.Printf("%q %s", v, err)
}
_instrumentation
{
rdb := redis.NewClient(&redis.Options{
Addr: ":6379",
})
rdb.AddHook(redisHook{})
rdb.Ping(ctx)
}
Package-Level Type Names (total 135)
/* sort by: alphabet | popularity */
type BoolCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*BoolCmd : Cmder
*BoolCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*BoolCmd : expvar.Var
*BoolCmd : fmt.Stringer
As Outputs Of (at least 88 )
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
type BoolSliceCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*BoolSliceCmd : Cmder
*BoolSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*BoolSliceCmd : expvar.Var
*BoolSliceCmd : fmt.Stringer
As Outputs Of (at least 13 )
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
type Client (struct)
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.
Methods (total 336 )
( Client) ACLDryRun (ctx context .Context , username string , command ...interface{}) *StringCmd
(*Client) AddHook (hook Hook )
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
( Client) BZMPop (ctx context .Context , timeout time .Duration , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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")
( Client) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
BZPopMax Redis `BZPOPMAX key [key ...] timeout` command.
( Client) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
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
( Client) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *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`.
( Client) BitPosSpan (ctx context .Context , key string , bit int8 , start, end int64 , span string ) *IntCmd
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
( Client) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( Client) ClientID (ctx context .Context ) *IntCmd
( Client) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( Client) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
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
( Client) Close () error
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
(*Client) Do (ctx context .Context , args ...interface{}) *Cmd
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
( Client) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( Client) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
( Client) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( Client) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
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
( Client) Get (ctx context .Context , key string ) *StringCmd
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
( Client) GetDel (ctx context .Context , key string ) *StringCmd
GetDel redis-server version >= 6.2.0.
( Client) GetEx (ctx context .Context , key string , expiration time .Duration ) *StringCmd
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
( Client) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
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.
( Client) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( Client) HRandField (ctx context .Context , key string , count int ) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
( Client) HRandFieldWithValues (ctx context .Context , key string , count int ) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
( Client) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( Client) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
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
( Client) LMPop (ctx context .Context , direction string , count int64 , keys ...string ) *KeyValuesCmd
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
( Client) MSet (ctx context .Context , values ...interface{}) *StatusCmd
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.
( Client) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
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
(*Client) Options () *Options
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
(*Client) PSubscribe (ctx context .Context , channels ...string ) *PubSub
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 )
(*Client) PoolStats () *PoolStats
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
( Client) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
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
( Client) SMIsMember (ctx context .Context , key string , members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
( Client) SMembers (ctx context .Context , key string ) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
( Client) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
( Client) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( Client) SPop (ctx context .Context , key string ) *StringCmd
SPop Redis `SPOP key` command.
( Client) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
SPopN Redis `SPOP key count` command.
( Client) SPublish (ctx context .Context , channel string , message interface{}) *IntCmd
( Client) SRandMember (ctx context .Context , key string ) *StringCmd
SRandMember Redis `SRANDMEMBER key` command.
( Client) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
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
(*Client) SSubscribe (ctx context .Context , channels ...string ) *PubSub
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
( Client) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *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.
( Client) SetArgs (ctx context .Context , key string , value interface{}, a SetArgs ) *StatusCmd
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
( Client) SetEx (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
( Client) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
( Client) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
(*Client) Subscribe (ctx context .Context , channels ...string ) *PubSub
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
(*Client) TxPipeline () Pipeliner
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
(*Client) Watch (ctx context .Context , fn func(*Tx ) error , keys ...string ) error
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
( Client) XInfoStreamFull (ctx context .Context , key string , count int ) *XInfoStreamFullCmd
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
( Client) XTrimMaxLen (ctx context .Context , key string , maxLen int64 ) *IntCmd
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
( Client) ZAdd (ctx context .Context , key string , members ...Z ) *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
( Client) ZAddGT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddGT Redis `ZADD key GT score member [score member ...]` command.
( Client) ZAddLT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddLT Redis `ZADD key LT score member [score member ...]` command.
( Client) ZAddNX (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddNX Redis `ZADD key NX score member [score member ...]` command.
( Client) ZAddXX (ctx context .Context , key string , members ...Z ) *IntCmd
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
( Client) ZDiff (ctx context .Context , keys ...string ) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
( Client) ZDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
ZDiffStore redis-server version >=6.2.0.
( Client) ZDiffWithScores (ctx context .Context , keys ...string ) *ZSliceCmd
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
( Client) ZMPop (ctx context .Context , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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
( Client) ZRandMember (ctx context .Context , key string , count int ) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
( Client) ZRandMemberWithScores (ctx context .Context , key string , count int ) *ZSliceCmd
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
Implements (at least 7 )
*Client : Cmdable
Client : Scripter
*Client : UniversalClient
Client : github.com/prometheus/common/expfmt.Closer
Client : expvar.Var
Client : fmt.Stringer
Client : io.Closer
As Outputs Of (at least 5 )
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 )
type ClusterClient (struct)
ClusterClient is a Redis Cluster client representing a pool of zero
or more underlying connections. It's safe for concurrent use by
multiple goroutines.
Methods (total 340 )
( ClusterClient) ACLDryRun (ctx context .Context , username string , command ...interface{}) *StringCmd
(*ClusterClient) AddHook (hook Hook )
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
( ClusterClient) BZMPop (ctx context .Context , timeout time .Duration , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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")
( ClusterClient) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
BZPopMax Redis `BZPOPMAX key [key ...] timeout` command.
( ClusterClient) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
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
( ClusterClient) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *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`.
( ClusterClient) BitPosSpan (ctx context .Context , key string , bit int8 , start, end int64 , span string ) *IntCmd
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
( ClusterClient) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( ClusterClient) ClientID (ctx context .Context ) *IntCmd
( ClusterClient) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( ClusterClient) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
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
(*ClusterClient) Close () error
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
(*ClusterClient) Do (ctx context .Context , args ...interface{}) *Cmd
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
(*ClusterClient) ForEachMaster (ctx context .Context , fn func(ctx context .Context , client *Client ) error ) error
ForEachMaster concurrently calls the fn on each master node in the cluster.
It returns the first error if any.
(*ClusterClient) ForEachShard (ctx context .Context , fn func(ctx context .Context , client *Client ) error ) error
ForEachShard concurrently calls the fn on each known node in the cluster.
It returns the first error if any.
(*ClusterClient) ForEachSlave (ctx context .Context , fn func(ctx context .Context , client *Client ) error ) error
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
( ClusterClient) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( ClusterClient) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
( ClusterClient) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( ClusterClient) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
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
( ClusterClient) Get (ctx context .Context , key string ) *StringCmd
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
( ClusterClient) GetDel (ctx context .Context , key string ) *StringCmd
GetDel redis-server version >= 6.2.0.
( ClusterClient) GetEx (ctx context .Context , key string , expiration time .Duration ) *StringCmd
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
( ClusterClient) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
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.
( ClusterClient) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( ClusterClient) HRandField (ctx context .Context , key string , count int ) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
( ClusterClient) HRandFieldWithValues (ctx context .Context , key string , count int ) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
( ClusterClient) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( ClusterClient) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
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
( ClusterClient) LMPop (ctx context .Context , direction string , count int64 , keys ...string ) *KeyValuesCmd
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
( ClusterClient) MSet (ctx context .Context , values ...interface{}) *StatusCmd
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.
( ClusterClient) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
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.
(*ClusterClient) MasterForKey (ctx context .Context , key string ) (*Client , error )
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 ))
(*ClusterClient) Options () *ClusterOptions
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
(*ClusterClient) PSubscribe (ctx context .Context , channels ...string ) *PubSub
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 )
(*ClusterClient) PoolStats () *PoolStats
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
( ClusterClient) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
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
(*ClusterClient) ReloadState (ctx context .Context )
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
( ClusterClient) SMIsMember (ctx context .Context , key string , members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
( ClusterClient) SMembers (ctx context .Context , key string ) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
( ClusterClient) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
( ClusterClient) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( ClusterClient) SPop (ctx context .Context , key string ) *StringCmd
SPop Redis `SPOP key` command.
( ClusterClient) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
SPopN Redis `SPOP key count` command.
( ClusterClient) SPublish (ctx context .Context , channel string , message interface{}) *IntCmd
( ClusterClient) SRandMember (ctx context .Context , key string ) *StringCmd
SRandMember Redis `SRANDMEMBER key` command.
( ClusterClient) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
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
(*ClusterClient) SSubscribe (ctx context .Context , channels ...string ) *PubSub
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
( ClusterClient) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *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.
( ClusterClient) SetArgs (ctx context .Context , key string , value interface{}, a SetArgs ) *StatusCmd
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
( ClusterClient) SetEx (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
( ClusterClient) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
( ClusterClient) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
(*ClusterClient) SlaveForKey (ctx context .Context , key string ) (*Client , error )
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
(*ClusterClient) Subscribe (ctx context .Context , channels ...string ) *PubSub
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
(*ClusterClient) TxPipeline () Pipeliner
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
( ClusterClient) XInfoStreamFull (ctx context .Context , key string , count int ) *XInfoStreamFullCmd
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
( ClusterClient) XTrimMaxLen (ctx context .Context , key string , maxLen int64 ) *IntCmd
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
( ClusterClient) ZAdd (ctx context .Context , key string , members ...Z ) *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
( ClusterClient) ZAddGT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddGT Redis `ZADD key GT score member [score member ...]` command.
( ClusterClient) ZAddLT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddLT Redis `ZADD key LT score member [score member ...]` command.
( ClusterClient) ZAddNX (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddNX Redis `ZADD key NX score member [score member ...]` command.
( ClusterClient) ZAddXX (ctx context .Context , key string , members ...Z ) *IntCmd
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
( ClusterClient) ZDiff (ctx context .Context , keys ...string ) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
( ClusterClient) ZDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
ZDiffStore redis-server version >=6.2.0.
( ClusterClient) ZDiffWithScores (ctx context .Context , keys ...string ) *ZSliceCmd
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
( ClusterClient) ZMPop (ctx context .Context , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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
( ClusterClient) ZRandMember (ctx context .Context , key string , count int ) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
( ClusterClient) ZRandMemberWithScores (ctx context .Context , key string , count int ) *ZSliceCmd
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
Implements (at least 5 )
*ClusterClient : Cmdable
*ClusterClient : Scripter
*ClusterClient : UniversalClient
*ClusterClient : github.com/prometheus/common/expfmt.Closer
*ClusterClient : io.Closer
As Outputs Of (at least 2 )
func NewClusterClient (opt *ClusterOptions ) *ClusterClient
func NewFailoverClusterClient (failoverOpt *FailoverOptions ) *ClusterClient
type Cmd (struct)
Methods (total 24 )
(*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{}
Implements (at least 4 )
*Cmd : Cmder
*Cmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*Cmd : expvar.Var
*Cmd : fmt.Stringer
As Outputs Of (at least 42 )
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
type Cmdable (interface)
Methods (total 321 )
( 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
Implemented By (at least 9 )
*Client
*ClusterClient
*Conn
*Pipeline
Pipeliner (interface)
*Ring
StatefulCmdable (interface)
*Tx
UniversalClient (interface)
Implements (at least one exported )
Cmdable : Scripter
type Cmder (interface)
Methods (total 7 )
( Cmder) Args () []interface{}
( Cmder) Err () error
( Cmder) FullName () string
( Cmder) Name () string
( Cmder) SetErr (error )
( Cmder) SetFirstKeyPos (int8 )
( Cmder) String () string
Implemented By (at least 46 )
*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
Implements (at least 3 )
Cmder : github.com/polarsignals/frostdb/query/logicalplan.Named
Cmder : expvar.Var
Cmder : fmt.Stringer
As Outputs Of (at least 22 )
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 )
As Inputs Of (at least 9 )
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
type Conn (struct)
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.
Methods (total 333 )
( Conn) ACLDryRun (ctx context .Context , username string , command ...interface{}) *StringCmd
(*Conn) AddHook (hook Hook )
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
( Conn) AuthACL (ctx context .Context , username, 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
( Conn) BZMPop (ctx context .Context , timeout time .Duration , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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")
( Conn) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
BZPopMax Redis `BZPOPMAX key [key ...] timeout` command.
( Conn) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
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
( Conn) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *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`.
( Conn) BitPosSpan (ctx context .Context , key string , bit int8 , start, end int64 , span string ) *IntCmd
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
( Conn) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( Conn) ClientID (ctx context .Context ) *IntCmd
( Conn) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( Conn) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
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
( Conn) ClientSetName (ctx context .Context , name string ) *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
(*Conn) Close () error
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
( Conn) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( Conn) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
( Conn) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( Conn) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
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
( Conn) Get (ctx context .Context , key string ) *StringCmd
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
( Conn) GetDel (ctx context .Context , key string ) *StringCmd
GetDel redis-server version >= 6.2.0.
( Conn) GetEx (ctx context .Context , key string , expiration time .Duration ) *StringCmd
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
( Conn) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
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.
( Conn) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( Conn) HRandField (ctx context .Context , key string , count int ) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
( Conn) HRandFieldWithValues (ctx context .Context , key string , count int ) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
( Conn) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( Conn) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
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
( Conn) Hello (ctx context .Context , ver int , username, password, clientName string ) *MapStringInterfaceCmd
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
( Conn) LMPop (ctx context .Context , direction string , count int64 , keys ...string ) *KeyValuesCmd
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
( Conn) MSet (ctx context .Context , values ...interface{}) *StatusCmd
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.
( Conn) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
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
( Conn) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
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
( Conn) SMIsMember (ctx context .Context , key string , members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
( Conn) SMembers (ctx context .Context , key string ) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
( Conn) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
( Conn) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( Conn) SPop (ctx context .Context , key string ) *StringCmd
SPop Redis `SPOP key` command.
( Conn) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
SPopN Redis `SPOP key count` command.
( Conn) SPublish (ctx context .Context , channel string , message interface{}) *IntCmd
( Conn) SRandMember (ctx context .Context , key string ) *StringCmd
SRandMember Redis `SRANDMEMBER key` command.
( Conn) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
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
( Conn) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *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.
( Conn) SetArgs (ctx context .Context , key string , value interface{}, a SetArgs ) *StatusCmd
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
( Conn) SetEx (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
( Conn) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
( Conn) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
(*Conn) TxPipeline () Pipeliner
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
( Conn) XInfoStreamFull (ctx context .Context , key string , count int ) *XInfoStreamFullCmd
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
( Conn) XTrimMaxLen (ctx context .Context , key string , maxLen int64 ) *IntCmd
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
( Conn) ZAdd (ctx context .Context , key string , members ...Z ) *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
( Conn) ZAddGT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddGT Redis `ZADD key GT score member [score member ...]` command.
( Conn) ZAddLT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddLT Redis `ZADD key LT score member [score member ...]` command.
( Conn) ZAddNX (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddNX Redis `ZADD key NX score member [score member ...]` command.
( Conn) ZAddXX (ctx context .Context , key string , members ...Z ) *IntCmd
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
( Conn) ZDiff (ctx context .Context , keys ...string ) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
( Conn) ZDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
ZDiffStore redis-server version >=6.2.0.
( Conn) ZDiffWithScores (ctx context .Context , keys ...string ) *ZSliceCmd
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
( Conn) ZMPop (ctx context .Context , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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
( Conn) ZRandMember (ctx context .Context , key string , count int ) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
( Conn) ZRandMemberWithScores (ctx context .Context , key string , count int ) *ZSliceCmd
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
Implements (at least 7 )
*Conn : Cmdable
Conn : Scripter
*Conn : StatefulCmdable
*Conn : github.com/prometheus/common/expfmt.Closer
*Conn : expvar.Var
*Conn : fmt.Stringer
*Conn : io.Closer
As Outputs Of (at least one exported )
func (*Client ).Conn () *Conn
type DurationCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*DurationCmd : Cmder
*DurationCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*DurationCmd : expvar.Var
*DurationCmd : fmt.Stringer
As Outputs Of (at least 22 )
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
type FloatCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*FloatCmd : Cmder
*FloatCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*FloatCmd : expvar.Var
*FloatCmd : fmt.Stringer
As Outputs Of (at least 26 )
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
type FloatSliceCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*FloatSliceCmd : Cmder
*FloatSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*FloatSliceCmd : expvar.Var
*FloatSliceCmd : fmt.Stringer
As Outputs Of (at least 5 )
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
type GeoLocation (struct)
GeoLocation is used with GeoAdd to add geospatial location.
Fields (total 5 )
Dist float64
GeoHash int64
Latitude float64
Longitude float64
Name string
As Outputs Of (at least 4 )
func (*GeoLocationCmd ).Result () ([]GeoLocation , error )
func (*GeoLocationCmd ).Val () []GeoLocation
func (*GeoSearchLocationCmd ).Result () ([]GeoLocation , error )
func (*GeoSearchLocationCmd ).Val () []GeoLocation
As Inputs Of (at least 7 )
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
type GeoLocationCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*GeoLocationCmd : Cmder
*GeoLocationCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*GeoLocationCmd : expvar.Var
*GeoLocationCmd : fmt.Stringer
As Outputs Of (at least 10 )
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
type GeoPosCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*GeoPosCmd : Cmder
*GeoPosCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*GeoPosCmd : expvar.Var
*GeoPosCmd : fmt.Stringer
As Outputs Of (at least 6 )
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
type GeoRadiusQuery (struct)
GeoRadiusQuery is used with GeoRadius to query geospatial index.
Fields (total 9 )
Count int
Radius float64
Sort string
Can be ASC or DESC. Default is no sort order.
Store string
StoreDist string
Unit string
Can be m, km, ft, or mi. Default is km.
WithCoord bool
WithDist bool
WithGeoHash bool
As Inputs Of (at least 17 )
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
type GeoSearchLocationCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*GeoSearchLocationCmd : Cmder
*GeoSearchLocationCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*GeoSearchLocationCmd : expvar.Var
*GeoSearchLocationCmd : fmt.Stringer
As Outputs Of (at least 5 )
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
type GeoSearchLocationQuery (struct)
Fields (total 15 )
GeoSearchQuery GeoSearchQuery
GeoSearchQuery .BoxHeight float64
GeoSearchQuery .BoxUnit string
GeoSearchQuery .BoxWidth float64
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
GeoSearchQuery .Longitude float64
Latitude and Longitude when using FromLonLat option.
GeoSearchQuery .Member string
GeoSearchQuery .Radius float64
Distance and unit when using ByRadius option.
Can use m, km, ft, or mi. Default is km.
GeoSearchQuery .RadiusUnit string
GeoSearchQuery .Sort string
Can be ASC or DESC. Default is no sort order.
WithCoord bool
WithDist bool
WithHash bool
As Inputs Of (at least 5 )
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
type GeoSearchQuery (struct)
GeoSearchQuery is used for GEOSearch/GEOSearchStore command query.
Fields (total 11 )
BoxHeight float64
BoxUnit string
BoxWidth float64
Height, width and unit when using ByBox option.
Can be m, km, ft, or mi. Default is km.
Count int
CountAny bool
Latitude float64
Longitude float64
Latitude and Longitude when using FromLonLat option.
Member string
Radius float64
Distance and unit when using ByRadius option.
Can use m, km, ft, or mi. Default is km.
RadiusUnit string
Sort string
Can be ASC or DESC. Default is no sort order.
As Inputs Of (at least 4 )
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
type GeoSearchStoreQuery (struct)
Fields (total 13 )
GeoSearchQuery GeoSearchQuery
GeoSearchQuery .BoxHeight float64
GeoSearchQuery .BoxUnit string
GeoSearchQuery .BoxWidth float64
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
GeoSearchQuery .Longitude float64
Latitude and Longitude when using FromLonLat option.
GeoSearchQuery .Member string
GeoSearchQuery .Radius float64
Distance and unit when using ByRadius option.
Can use m, km, ft, or mi. Default is km.
GeoSearchQuery .RadiusUnit string
GeoSearchQuery .Sort string
Can be ASC or DESC. Default is no sort order.
StoreDist bool
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.
As Inputs Of (at least 4 )
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
type IntCmd (struct)
Methods (total 11 )
(*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
Implements (at least 4 )
*IntCmd : Cmder
*IntCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*IntCmd : expvar.Var
*IntCmd : fmt.Stringer
As Outputs Of (at least 376 )
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
type IntSliceCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*IntSliceCmd : Cmder
*IntSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*IntSliceCmd : expvar.Var
*IntSliceCmd : fmt.Stringer
As Outputs Of (at least 9 )
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
type KeyValuesCmd (struct)
Methods (total 10 )
(*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 )
Implements (at least 4 )
*KeyValuesCmd : Cmder
*KeyValuesCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*KeyValuesCmd : expvar.Var
*KeyValuesCmd : fmt.Stringer
As Outputs Of (at least 9 )
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
type KeyValueSliceCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*KeyValueSliceCmd : Cmder
*KeyValueSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*KeyValueSliceCmd : expvar.Var
*KeyValueSliceCmd : fmt.Stringer
As Outputs Of (at least 5 )
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
type LPosArgs (struct)
Fields (total 2 )
MaxLen int64
Rank int64
As Inputs Of (at least 8 )
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
type MapStringIntCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*MapStringIntCmd : Cmder
*MapStringIntCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*MapStringIntCmd : expvar.Var
*MapStringIntCmd : fmt.Stringer
As Outputs Of (at least 10 )
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
type MapStringInterfaceCmd (struct)
Methods (total 10 )
(*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{}
Implements (at least 4 )
*MapStringInterfaceCmd : Cmder
*MapStringInterfaceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*MapStringInterfaceCmd : expvar.Var
*MapStringInterfaceCmd : fmt.Stringer
As Outputs Of (at least 3 )
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
type MapStringStringCmd (struct)
Methods (total 11 )
(*MapStringStringCmd) Args () []interface{}
(*MapStringStringCmd) Err () error
(*MapStringStringCmd) FullName () string
(*MapStringStringCmd) Name () string
(*MapStringStringCmd) Result () (map[string ]string , error )
(*MapStringStringCmd) Scan (dest 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.
(*MapStringStringCmd) SetErr (e error )
(*MapStringStringCmd) SetFirstKeyPos (keyPos int8 )
(*MapStringStringCmd) SetVal (val map[string ]string )
(*MapStringStringCmd) String () string
(*MapStringStringCmd) Val () map[string ]string
Implements (at least 5 )
*MapStringStringCmd : Cmder
*MapStringStringCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*MapStringStringCmd : database/sql.Scanner
*MapStringStringCmd : expvar.Var
*MapStringStringCmd : fmt.Stringer
As Outputs Of (at least 11 )
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
type Options (struct)
Options keeps the settings to set up redis connection.
Fields (total 25 )
Addr string
host:port address.
ClientName string
ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
ConnMaxIdleTime time .Duration
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 time .Duration
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 bool
ContextTimeoutEnabled controls whether the client respects context timeouts and deadlines.
See https://redis.uptrace.dev/guide/go-redis-debugging.html#timeouts
CredentialsProvider func() (username string , password string )
CredentialsProvider allows the username and password to be updated
before reconnecting. It should return the current username and password.
DB int
Database to be selected after connecting to the server.
DialTimeout time .Duration
Dial timeout for establishing new connections.
Default is 5 seconds.
Dialer func(ctx context .Context , network, addr string ) (net .Conn , error )
Dialer creates new network connection and has priority over
Network and Addr options.
Limiter Limiter
Limiter interface used to implement circuit breaker or rate limiter.
MaxIdleConns int
Maximum number of idle connections.
MaxRetries int
Maximum number of retries before giving up.
Default is 3 retries; -1 (not 0) disables retries.
MaxRetryBackoff time .Duration
Maximum backoff between each retry.
Default is 512 milliseconds; -1 disables backoff.
MinIdleConns int
Minimum number of idle connections which is useful when establishing
new connection is slow.
MinRetryBackoff time .Duration
Minimum backoff between each retry.
Default is 8 milliseconds; -1 disables backoff.
Network string
The network type, either tcp or unix.
Default is tcp.
OnConnect func(ctx context .Context , cn *Conn ) error
Hook that is called when new connection is established.
Password string
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.
PoolFIFO bool
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.
PoolSize int
Maximum number of socket connections.
Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolTimeout time .Duration
Amount of time client waits for connection if all connections
are busy before returning an error.
Default is ReadTimeout + 1 second.
ReadTimeout time .Duration
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.
TLSConfig *tls .Config
TLS Config to use. When set, TLS will be negotiated.
Username string
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.
WriteTimeout time .Duration
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.
As Outputs Of (at least 3 )
func ParseURL (redisURL string ) (*Options , error )
func (*Client ).Options () *Options
func (*UniversalOptions ).Simple () *Options
As Inputs Of (at least 3 )
func NewClient (opt *Options ) *Client
func NewDialer (opt *Options ) func(context .Context , string , string ) (net .Conn , error )
func NewSentinelClient (opt *Options ) *SentinelClient
type Pipeline (struct)
Pipeline implements pipelining as described in
http://redis.io/topics/pipelining .
Please note: it is not safe for concurrent use by multiple goroutines.
Methods (total 334 )
( 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
( Pipeline) AuthACL (ctx context .Context , username, 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
( Pipeline) BZMPop (ctx context .Context , timeout time .Duration , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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")
( Pipeline) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
BZPopMax Redis `BZPOPMAX key [key ...] timeout` command.
( Pipeline) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
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
( Pipeline) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *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`.
( Pipeline) BitPosSpan (ctx context .Context , key string , bit int8 , start, end int64 , span string ) *IntCmd
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
( Pipeline) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( Pipeline) ClientID (ctx context .Context ) *IntCmd
( Pipeline) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( Pipeline) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
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
( Pipeline) ClientSetName (ctx context .Context , name string ) *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
(*Pipeline) Discard ()
Discard resets the pipeline and discards queued commands.
(*Pipeline) Do (ctx context .Context , args ...interface{}) *Cmd
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
(*Pipeline) Exec (ctx context .Context ) ([]Cmder , error )
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
( Pipeline) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( Pipeline) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
( Pipeline) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( Pipeline) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
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
( Pipeline) Get (ctx context .Context , key string ) *StringCmd
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
( Pipeline) GetDel (ctx context .Context , key string ) *StringCmd
GetDel redis-server version >= 6.2.0.
( Pipeline) GetEx (ctx context .Context , key string , expiration time .Duration ) *StringCmd
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
( Pipeline) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
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.
( Pipeline) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( Pipeline) HRandField (ctx context .Context , key string , count int ) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
( Pipeline) HRandFieldWithValues (ctx context .Context , key string , count int ) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
( Pipeline) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( Pipeline) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
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
( Pipeline) Hello (ctx context .Context , ver int , username, password, clientName string ) *MapStringInterfaceCmd
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
( Pipeline) LMPop (ctx context .Context , direction string , count int64 , keys ...string ) *KeyValuesCmd
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
(*Pipeline) Len () int
Len returns the number of queued commands.
( Pipeline) MGet (ctx context .Context , keys ...string ) *SliceCmd
( Pipeline) MSet (ctx context .Context , values ...interface{}) *StatusCmd
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.
( Pipeline) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
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 )
(*Pipeline) Process (ctx context .Context , cmd 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
( Pipeline) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
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
( Pipeline) SMIsMember (ctx context .Context , key string , members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
( Pipeline) SMembers (ctx context .Context , key string ) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
( Pipeline) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
( Pipeline) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( Pipeline) SPop (ctx context .Context , key string ) *StringCmd
SPop Redis `SPOP key` command.
( Pipeline) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
SPopN Redis `SPOP key count` command.
( Pipeline) SPublish (ctx context .Context , channel string , message interface{}) *IntCmd
( Pipeline) SRandMember (ctx context .Context , key string ) *StringCmd
SRandMember Redis `SRANDMEMBER key` command.
( Pipeline) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
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
( Pipeline) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *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.
( Pipeline) SetArgs (ctx context .Context , key string , value interface{}, a SetArgs ) *StatusCmd
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
( Pipeline) SetEx (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
( Pipeline) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
( Pipeline) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
( Pipeline) XInfoStreamFull (ctx context .Context , key string , count int ) *XInfoStreamFullCmd
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
( Pipeline) XTrimMaxLen (ctx context .Context , key string , maxLen int64 ) *IntCmd
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
( Pipeline) ZAdd (ctx context .Context , key string , members ...Z ) *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
( Pipeline) ZAddGT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddGT Redis `ZADD key GT score member [score member ...]` command.
( Pipeline) ZAddLT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddLT Redis `ZADD key LT score member [score member ...]` command.
( Pipeline) ZAddNX (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddNX Redis `ZADD key NX score member [score member ...]` command.
( Pipeline) ZAddXX (ctx context .Context , key string , members ...Z ) *IntCmd
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
( Pipeline) ZDiff (ctx context .Context , keys ...string ) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
( Pipeline) ZDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
ZDiffStore redis-server version >=6.2.0.
( Pipeline) ZDiffWithScores (ctx context .Context , keys ...string ) *ZSliceCmd
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
( Pipeline) ZMPop (ctx context .Context , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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
( Pipeline) ZRandMember (ctx context .Context , key string , count int ) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
( Pipeline) ZRandMemberWithScores (ctx context .Context , key string , count int ) *ZSliceCmd
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
Implements (at least 4 )
*Pipeline : Cmdable
*Pipeline : Pipeliner
Pipeline : Scripter
*Pipeline : StatefulCmdable
type Pipeliner (interface)
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.
Methods (total 332 )
( 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
( Pipeliner) Discard ()
Discard is to discard all commands in the cache that have not yet been executed.
( Pipeliner) Do (ctx context .Context , args ...interface{}) *Cmd
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
( Pipeliner) Exec (ctx context .Context ) ([]Cmder , error )
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
( Pipeliner) Len () int
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 )
( Pipeliner) Process (ctx context .Context , cmd 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
Implemented By (at least one exported )
*Pipeline
Implements (at least 3 )
Pipeliner : Cmdable
Pipeliner : Scripter
Pipeliner : StatefulCmdable
As Outputs Of (at least 20 )
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
type PubSub (struct)
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.
Methods (total 15 )
(*PubSub) Channel (opts ...ChannelOption ) <-chan *Message
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.
(*PubSub) ChannelSize (size int ) <-chan *Message
ChannelSize is like Channel, but creates a Go channel
with specified buffer size.
Deprecated: use Channel(WithChannelSize(size)), remove in v9.
(*PubSub) ChannelWithSubscriptions (opts ...ChannelOption ) <-chan interface{}
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
(*PubSub) PSubscribe (ctx context .Context , patterns ...string ) error
PSubscribe the client to the given patterns. It returns
empty subscription if there are no patterns.
(*PubSub) PUnsubscribe (ctx context .Context , patterns ...string ) error
PUnsubscribe the client from the given patterns, or from all of
them if none is given.
(*PubSub) Ping (ctx context .Context , payload ...string ) error
(*PubSub) Receive (ctx context .Context ) (interface{}, 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.
(*PubSub) ReceiveMessage (ctx context .Context ) (*Message , error )
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.
(*PubSub) ReceiveTimeout (ctx context .Context , timeout time .Duration ) (interface{}, error )
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.
(*PubSub) SSubscribe (ctx context .Context , channels ...string ) error
SSubscribe Subscribes the client to the specified shard channels.
(*PubSub) SUnsubscribe (ctx context .Context , channels ...string ) error
SUnsubscribe unsubscribes the client from the given shard channels,
or from all of them if none is given.
(*PubSub) String () string
(*PubSub) Subscribe (ctx context .Context , channels ...string ) error
Subscribe the client to the specified channels. It returns
empty subscription if there are no channels.
(*PubSub) Unsubscribe (ctx context .Context , channels ...string ) error
Unsubscribe the client from the given channels, or from all of
them if none is given.
Implements (at least 4 )
*PubSub : github.com/prometheus/common/expfmt.Closer
*PubSub : expvar.Var
*PubSub : fmt.Stringer
*PubSub : io.Closer
As Outputs Of (at least 16 )
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 )
type Ring (struct)
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.
Methods (total 337 )
( Ring) ACLDryRun (ctx context .Context , username string , command ...interface{}) *StringCmd
(*Ring) AddHook (hook Hook )
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
( Ring) BZMPop (ctx context .Context , timeout time .Duration , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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")
( Ring) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
BZPopMax Redis `BZPOPMAX key [key ...] timeout` command.
( Ring) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
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
( Ring) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *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`.
( Ring) BitPosSpan (ctx context .Context , key string , bit int8 , start, end int64 , span string ) *IntCmd
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
( Ring) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( Ring) ClientID (ctx context .Context ) *IntCmd
( Ring) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( Ring) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
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
(*Ring) Close () error
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
(*Ring) Do (ctx context .Context , args ...interface{}) *Cmd
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
(*Ring) ForEachShard (ctx context .Context , fn func(ctx context .Context , client *Client ) error ) error
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
( Ring) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( Ring) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
( Ring) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( Ring) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
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
( Ring) Get (ctx context .Context , key string ) *StringCmd
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
( Ring) GetDel (ctx context .Context , key string ) *StringCmd
GetDel redis-server version >= 6.2.0.
( Ring) GetEx (ctx context .Context , key string , expiration time .Duration ) *StringCmd
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
( Ring) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
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.
( Ring) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( Ring) HRandField (ctx context .Context , key string , count int ) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
( Ring) HRandFieldWithValues (ctx context .Context , key string , count int ) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
( Ring) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( Ring) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
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
( Ring) LMPop (ctx context .Context , direction string , count int64 , keys ...string ) *KeyValuesCmd
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
(*Ring) Len () int
Len returns the current number of shards in the ring.
( Ring) MGet (ctx context .Context , keys ...string ) *SliceCmd
( Ring) MSet (ctx context .Context , values ...interface{}) *StatusCmd
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.
( Ring) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
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 ))
(*Ring) Options () *RingOptions
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
(*Ring) PSubscribe (ctx context .Context , channels ...string ) *PubSub
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 )
(*Ring) PoolStats () *PoolStats
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
( Ring) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
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
( Ring) SMIsMember (ctx context .Context , key string , members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
( Ring) SMembers (ctx context .Context , key string ) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
( Ring) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
( Ring) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( Ring) SPop (ctx context .Context , key string ) *StringCmd
SPop Redis `SPOP key` command.
( Ring) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
SPopN Redis `SPOP key count` command.
( Ring) SPublish (ctx context .Context , channel string , message interface{}) *IntCmd
( Ring) SRandMember (ctx context .Context , key string ) *StringCmd
SRandMember Redis `SRANDMEMBER key` command.
( Ring) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
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
(*Ring) SSubscribe (ctx context .Context , channels ...string ) *PubSub
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
( Ring) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *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.
(*Ring) SetAddrs (addrs map[string ]string )
( Ring) SetArgs (ctx context .Context , key string , value interface{}, a SetArgs ) *StatusCmd
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
( Ring) SetEx (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
( Ring) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
( Ring) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
(*Ring) Subscribe (ctx context .Context , channels ...string ) *PubSub
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
( Ring) XInfoStreamFull (ctx context .Context , key string , count int ) *XInfoStreamFullCmd
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
( Ring) XTrimMaxLen (ctx context .Context , key string , maxLen int64 ) *IntCmd
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
( Ring) ZAdd (ctx context .Context , key string , members ...Z ) *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
( Ring) ZAddGT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddGT Redis `ZADD key GT score member [score member ...]` command.
( Ring) ZAddLT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddLT Redis `ZADD key LT score member [score member ...]` command.
( Ring) ZAddNX (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddNX Redis `ZADD key NX score member [score member ...]` command.
( Ring) ZAddXX (ctx context .Context , key string , members ...Z ) *IntCmd
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
( Ring) ZDiff (ctx context .Context , keys ...string ) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
( Ring) ZDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
ZDiffStore redis-server version >=6.2.0.
( Ring) ZDiffWithScores (ctx context .Context , keys ...string ) *ZSliceCmd
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
( Ring) ZMPop (ctx context .Context , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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
( Ring) ZRandMember (ctx context .Context , key string , count int ) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
( Ring) ZRandMemberWithScores (ctx context .Context , key string , count int ) *ZSliceCmd
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
Implements (at least 5 )
*Ring : Cmdable
Ring : Scripter
*Ring : UniversalClient
*Ring : github.com/prometheus/common/expfmt.Closer
*Ring : io.Closer
As Outputs Of (at least one exported )
func NewRing (opt *RingOptions ) *Ring
type ScanCmd (struct)
Methods (total 11 )
(*ScanCmd) Args () []interface{}
(*ScanCmd) Err () error
(*ScanCmd) FullName () string
(*ScanCmd) Iterator () *ScanIterator
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 )
Implements (at least 4 )
*ScanCmd : Cmder
*ScanCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*ScanCmd : expvar.Var
*ScanCmd : fmt.Stringer
As Outputs Of (at least 22 )
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
type Script (struct)
Methods (total 9 )
(*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
(*Script) Run (ctx context .Context , c Scripter , keys []string , args ...interface{}) *Cmd
Run optimistically uses EVALSHA to run the script. If script does not exist
it is retried using EVAL.
(*Script) RunRO (ctx context .Context , c Scripter , keys []string , args ...interface{}) *Cmd
RunRO optimistically uses EVALSHA_RO to run the script. If script does not exist
it is retried using EVAL_RO.
As Outputs Of (at least one exported )
func NewScript (src string ) *Script
type Scripter (interface)
Methods (total 6 )
( 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
Implemented By (at least 10 )
Client
*ClusterClient
Cmdable (interface)
Conn
Pipeline
Pipeliner (interface)
Ring
StatefulCmdable (interface)
Tx
UniversalClient (interface)
As Inputs Of (at least 8 )
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
type SentinelClient (struct)
SentinelClient is a client for a Redis Sentinel.
Methods (total 19 )
(*SentinelClient) AddHook (hook Hook )
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.
(*SentinelClient) CkQuorum (ctx context .Context , name string ) *StringCmd
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.
( SentinelClient) Close () error
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.
(*SentinelClient) Failover (ctx context .Context , name string ) *StatusCmd
Failover forces a failover as if the master was not reachable, and without
asking for agreement to other Sentinels.
(*SentinelClient) FlushConfig (ctx context .Context ) *StatusCmd
FlushConfig forces Sentinel to rewrite its configuration on disk, including
the current Sentinel state.
(*SentinelClient) GetMasterAddrByName (ctx context .Context , name string ) *StringSliceCmd
(*SentinelClient) Master (ctx context .Context , name string ) *MapStringStringCmd
Master shows the state and info of the specified master.
(*SentinelClient) Masters (ctx context .Context ) *SliceCmd
Masters shows a list of monitored masters and their state.
(*SentinelClient) Monitor (ctx context .Context , name, ip, port, quorum string ) *StringCmd
Monitor tells the Sentinel to start monitoring a new master with the specified
name, ip, port, and quorum.
(*SentinelClient) PSubscribe (ctx context .Context , channels ...string ) *PubSub
PSubscribe subscribes the client to the given patterns.
Patterns can be omitted to create empty subscription.
(*SentinelClient) Ping (ctx context .Context ) *StringCmd
Ping is used to test if a connection is still alive, or to
measure latency.
(*SentinelClient) Process (ctx context .Context , cmd Cmder ) error
(*SentinelClient) Remove (ctx context .Context , name string ) *StringCmd
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.
(*SentinelClient) Replicas (ctx context .Context , name string ) *MapStringStringSliceCmd
Replicas shows a list of replicas for the specified master and their state.
(*SentinelClient) Reset (ctx context .Context , pattern string ) *IntCmd
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
(*SentinelClient) Set (ctx context .Context , name, option, value string ) *StringCmd
Set is used in order to change configuration parameters of a specific master.
( SentinelClient) String () string
(*SentinelClient) Subscribe (ctx context .Context , channels ...string ) *PubSub
Subscribe subscribes the client to the specified channels.
Channels can be omitted to create empty subscription.
Implements (at least 4 )
SentinelClient : github.com/prometheus/common/expfmt.Closer
SentinelClient : expvar.Var
SentinelClient : fmt.Stringer
SentinelClient : io.Closer
As Outputs Of (at least one exported )
func NewSentinelClient (opt *Options ) *SentinelClient
type SetArgs (struct)
SetArgs provides arguments for the SetArgs function.
Fields (total 5 )
ExpireAt time .Time
Get bool
When Get is true, the command returns the old value stored at key, or nil when key did not exist.
KeepTTL bool
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 string
Mode can be `NX` or `XX` or empty.
TTL time .Duration
Zero `TTL` or `Expiration` means that the key has no expiration time.
As Inputs Of (at least 4 )
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
type SliceCmd (struct)
Methods (total 11 )
(*SliceCmd) Args () []interface{}
(*SliceCmd) Err () error
(*SliceCmd) FullName () string
(*SliceCmd) Name () string
(*SliceCmd) Result () ([]interface{}, error )
(*SliceCmd) Scan (dst 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{}
Implements (at least 5 )
*SliceCmd : Cmder
*SliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*SliceCmd : database/sql.Scanner
*SliceCmd : expvar.Var
*SliceCmd : fmt.Stringer
As Outputs Of (at least 15 )
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
type Sort (struct)
Fields (total 6 )
Alpha bool
By string
Count int64
Get []string
Offset int64
Order string
As Inputs Of (at least 16 )
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
type StatefulCmdable (interface)
Methods (total 327 )
( 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
Implemented By (at least 4 )
*Conn
*Pipeline
Pipeliner (interface)
*Tx
Implements (at least 2 )
StatefulCmdable : Cmdable
StatefulCmdable : Scripter
type StatusCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*StatusCmd : Cmder
*StatusCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*StatusCmd : expvar.Var
*StatusCmd : fmt.Stringer
As Outputs Of (at least 203 )
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
type StringCmd (struct)
Methods (total 19 )
(*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
Implements (at least 5 )
*StringCmd : Cmder
*StringCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*StringCmd : database/sql.Scanner
*StringCmd : expvar.Var
*StringCmd : fmt.Stringer
As Outputs Of (at least 154 )
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
type StringSliceCmd (struct)
Methods (total 11 )
(*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
Implements (at least 4 )
*StringSliceCmd : Cmder
*StringSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*StringSliceCmd : expvar.Var
*StringSliceCmd : fmt.Stringer
As Outputs Of (at least 151 )
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
type Tx (struct)
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.
Methods (total 335 )
( Tx) ACLDryRun (ctx context .Context , username string , command ...interface{}) *StringCmd
(*Tx) AddHook (hook Hook )
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
( Tx) AuthACL (ctx context .Context , username, 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
( Tx) BZMPop (ctx context .Context , timeout time .Duration , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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")
( Tx) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
BZPopMax Redis `BZPOPMAX key [key ...] timeout` command.
( Tx) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
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
( Tx) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *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`.
( Tx) BitPosSpan (ctx context .Context , key string , bit int8 , start, end int64 , span string ) *IntCmd
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
( Tx) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( Tx) ClientID (ctx context .Context ) *IntCmd
( Tx) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( Tx) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
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
( Tx) ClientSetName (ctx context .Context , name string ) *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
(*Tx) Close (ctx context .Context ) error
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
( Tx) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( Tx) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
( Tx) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( Tx) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
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
( Tx) Get (ctx context .Context , key string ) *StringCmd
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
( Tx) GetDel (ctx context .Context , key string ) *StringCmd
GetDel redis-server version >= 6.2.0.
( Tx) GetEx (ctx context .Context , key string , expiration time .Duration ) *StringCmd
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
( Tx) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
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.
( Tx) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( Tx) HRandField (ctx context .Context , key string , count int ) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
( Tx) HRandFieldWithValues (ctx context .Context , key string , count int ) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
( Tx) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( Tx) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
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
( Tx) Hello (ctx context .Context , ver int , username, password, clientName string ) *MapStringInterfaceCmd
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
( Tx) LMPop (ctx context .Context , direction string , count int64 , keys ...string ) *KeyValuesCmd
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
( Tx) MSet (ctx context .Context , values ...interface{}) *StatusCmd
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.
( Tx) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
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
(*Tx) Pipeline () Pipeliner
Pipeline creates a pipeline. Usually it is more convenient to use Pipelined.
(*Tx) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
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
( Tx) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
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
( Tx) SMIsMember (ctx context .Context , key string , members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
( Tx) SMembers (ctx context .Context , key string ) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
( Tx) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
( Tx) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( Tx) SPop (ctx context .Context , key string ) *StringCmd
SPop Redis `SPOP key` command.
( Tx) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
SPopN Redis `SPOP key count` command.
( Tx) SPublish (ctx context .Context , channel string , message interface{}) *IntCmd
( Tx) SRandMember (ctx context .Context , key string ) *StringCmd
SRandMember Redis `SRANDMEMBER key` command.
( Tx) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
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
( Tx) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *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.
( Tx) SetArgs (ctx context .Context , key string , value interface{}, a SetArgs ) *StatusCmd
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
( Tx) SetEx (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
( Tx) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
( Tx) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
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
(*Tx) TxPipeline () Pipeliner
TxPipeline creates a pipeline. Usually it is more convenient to use TxPipelined.
(*Tx) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
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
(*Tx) Unwatch (ctx context .Context , keys ...string ) *StatusCmd
Unwatch flushes all the previously watched keys for a transaction.
( Tx) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
(*Tx) Watch (ctx context .Context , keys ...string ) *StatusCmd
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
( Tx) XInfoStreamFull (ctx context .Context , key string , count int ) *XInfoStreamFullCmd
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
( Tx) XTrimMaxLen (ctx context .Context , key string , maxLen int64 ) *IntCmd
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
( Tx) ZAdd (ctx context .Context , key string , members ...Z ) *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
( Tx) ZAddGT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddGT Redis `ZADD key GT score member [score member ...]` command.
( Tx) ZAddLT (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddLT Redis `ZADD key LT score member [score member ...]` command.
( Tx) ZAddNX (ctx context .Context , key string , members ...Z ) *IntCmd
ZAddNX Redis `ZADD key NX score member [score member ...]` command.
( Tx) ZAddXX (ctx context .Context , key string , members ...Z ) *IntCmd
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
( Tx) ZDiff (ctx context .Context , keys ...string ) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
( Tx) ZDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
ZDiffStore redis-server version >=6.2.0.
( Tx) ZDiffWithScores (ctx context .Context , keys ...string ) *ZSliceCmd
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
( Tx) ZMPop (ctx context .Context , order string , count int64 , keys ...string ) *ZSliceWithKeyCmd
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
( Tx) ZRandMember (ctx context .Context , key string , count int ) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
( Tx) ZRandMemberWithScores (ctx context .Context , key string , count int ) *ZSliceCmd
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
Implements (at least 7 )
*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
type UniversalClient (interface)
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.
Methods (total 330 )
( 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
Implemented By (at least 3 )
*Client
*ClusterClient
*Ring
Implements (at least 4 )
UniversalClient : Cmdable
UniversalClient : Scripter
UniversalClient : github.com/prometheus/common/expfmt.Closer
UniversalClient : io.Closer
As Outputs Of (at least 2 )
func NewUniversalClient (opts *UniversalOptions ) UniversalClient
func github.com/hibiken/asynq/internal/rdb.(*RDB ).Client () UniversalClient
As Inputs Of (at least one exported )
func github.com/hibiken/asynq/internal/rdb.NewRDB (client UniversalClient ) *rdb .RDB
type XAddArgs (struct)
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.
Fields (total 8 )
Approx bool
Approx causes MaxLen and MinID to use "~" matcher (instead of "=").
ID string
Limit int64
MaxLen int64
// MAXLEN N
MinID string
NoMkStream bool
Stream string
Values interface{}
As Inputs Of (at least 4 )
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
type XInfoConsumersCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*XInfoConsumersCmd : Cmder
*XInfoConsumersCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*XInfoConsumersCmd : expvar.Var
*XInfoConsumersCmd : fmt.Stringer
As Outputs Of (at least 5 )
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
type XInfoStreamFullCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*XInfoStreamFullCmd : Cmder
*XInfoStreamFullCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*XInfoStreamFullCmd : expvar.Var
*XInfoStreamFullCmd : fmt.Stringer
As Outputs Of (at least 5 )
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
type XMessageSliceCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*XMessageSliceCmd : Cmder
*XMessageSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*XMessageSliceCmd : expvar.Var
*XMessageSliceCmd : fmt.Stringer
As Outputs Of (at least 22 )
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
type XPendingCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*XPendingCmd : Cmder
*XPendingCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*XPendingCmd : expvar.Var
*XPendingCmd : fmt.Stringer
As Outputs Of (at least 6 )
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
type XStreamSliceCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*XStreamSliceCmd : Cmder
*XStreamSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*XStreamSliceCmd : expvar.Var
*XStreamSliceCmd : fmt.Stringer
As Outputs Of (at least 14 )
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
type Z (struct)
Z represents sorted set member.
Fields (total 2 )
Member interface{}
Score float64
As Outputs Of (at least 4 )
func (*ZSliceCmd ).Result () ([]Z , error )
func (*ZSliceCmd ).Val () []Z
func (*ZSliceWithKeyCmd ).Result () (string , []Z , error )
func (*ZSliceWithKeyCmd ).Val () (string , []Z )
As Inputs Of (at least 23 )
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 )
type ZAddArgs (struct)
ZAddArgs WARN: The GT, LT and NX options are mutually exclusive.
Fields (total 6 )
Ch bool
GT bool
LT bool
Members []Z
NX bool
XX bool
As Inputs Of (at least 8 )
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
type ZRangeArgs (struct)
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.
Fields (total 8 )
ByLex bool
ByScore bool
The ByScore and ByLex options are mutually exclusive.
Count int64
Key string
Offset int64
limit offset count.
Rev bool
Start interface{}
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{}
As Inputs Of (at least 12 )
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
type ZRangeBy (struct)
Fields (total 4 )
Count int64
Max string
Min string
Offset int64
As Inputs Of (at least 24 )
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
type ZSliceCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*ZSliceCmd : Cmder
*ZSliceCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*ZSliceCmd : expvar.Var
*ZSliceCmd : fmt.Stringer
As Outputs Of (at least 46 )
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
type ZSliceWithKeyCmd (struct)
Methods (total 10 )
(*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 )
Implements (at least 4 )
*ZSliceWithKeyCmd : Cmder
*ZSliceWithKeyCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*ZSliceWithKeyCmd : expvar.Var
*ZSliceWithKeyCmd : fmt.Stringer
As Outputs Of (at least 9 )
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
type ZStore (struct)
ZStore is used as an arg to ZInter/ZInterStore and ZUnion/ZUnionStore.
Fields (total 3 )
Aggregate string
Can be SUM, MIN or MAX.
Keys []string
Weights []float64
As Inputs Of (at least 24 )
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
type ZWithKeyCmd (struct)
Methods (total 10 )
(*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
Implements (at least 4 )
*ZWithKeyCmd : Cmder
*ZWithKeyCmd : github.com/polarsignals/frostdb/query/logicalplan.Named
*ZWithKeyCmd : expvar.Var
*ZWithKeyCmd : fmt.Stringer
As Outputs Of (at least 10 )
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)
func ParseClusterURL (redisURL string ) (*ClusterOptions , error )
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,
}
func ParseURL (redisURL string ) (*Options , error )
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,
}
Package-Level Variables (only one)
Package-Level Constants (total 3)
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .