package redis
Import Path
github.com/go-redis/redis/v8 (on go.dev )
Dependency Relation
imports 28 packages , and imported by 7 packages
Code Examples
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_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_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_SlowLogGet
{
const key = "slowlog-log-slower-than"
old := rdb.ConfigGet(ctx, key).Val()
rdb.ConfigSet(ctx, key, "0")
defer rdb.ConfigSet(ctx, key, old[1].(string))
if err := rdb.Do(ctx, "slowlog", "reset").Err(); err != nil {
panic(err)
}
rdb.Set(ctx, "test", "true", 0)
result, err := rdb.SlowLogGet(ctx, -1).Result()
if err != nil {
panic(err)
}
fmt.Println(len(result))
}
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 = 1000
increment := func(key string) error {
txf := func(tx *redis.Tx) error {
n, err := tx.Get(ctx, key).Int()
if err != nil && err != redis.Nil {
return err
}
n++
_, err = tx.TxPipelined(ctx, func(pipe redis.Pipeliner) error {
pipe.Set(ctx, key, n, 0)
return nil
})
return err
}
for i := 0; i < maxRetries; i++ {
err := rdb.Watch(ctx, txf, key)
if err == nil {
return nil
}
if err == redis.TxFailedErr {
continue
}
return err
}
return errors.New("increment reached maximum number of retries")
}
var wg sync.WaitGroup
for i := 0; i < 100; i++ {
wg.Add(1)
go func() {
defer wg.Done()
if err := increment("counter3"); err != nil {
fmt.Println("increment error:", err)
}
}()
}
wg.Wait()
n, err := rdb.Get(ctx, "counter3").Int()
fmt.Println("ended with", n, err)
}
Conn
{
conn := rdb.Conn(context.Background())
err := conn.ClientSetName(ctx, "foobar").Err()
if err != nil {
panic(err)
}
for i := 0; i < 10; i++ {
go rdb.Ping(ctx)
}
s, err := conn.ClientGetName(ctx).Result()
if err != nil {
panic(err)
}
fmt.Println(s)
}
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")
if err != nil {
panic(err)
}
fmt.Println("addr is", opt.Addr)
fmt.Println("db is", opt.DB)
fmt.Println("password is", opt.Password)
_ = redis.NewClient(opt)
}
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)
}
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")
}
_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 103, in which 79 are exported)
/* sort exporteds by: alphabet | popularity */
type BitCount (struct)
Fields (total 2, both are exported )
End int64
Start int64
As Inputs Of (at least 4, all are exported )
func Cmdable .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
func Pipeliner .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
func StatefulCmdable .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
func UniversalClient .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
type BoolCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val bool
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (bool , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () bool
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 68, all are exported )
func NewBoolCmd (ctx context .Context , args ...interface{}) *BoolCmd
func NewBoolResult (val bool , err error ) *BoolCmd
func Cmdable .ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
func Cmdable .Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func Cmdable .ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func Cmdable .HExists (ctx context .Context , key, field string ) *BoolCmd
func Cmdable .HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
func Cmdable .HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
func Cmdable .Move (ctx context .Context , key string , db int ) *BoolCmd
func Cmdable .MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
func Cmdable .Persist (ctx context .Context , key string ) *BoolCmd
func Cmdable .PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func Cmdable .PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func Cmdable .RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
func Cmdable .SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func Cmdable .SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func Cmdable .SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
func Cmdable .SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
func Pipeliner .ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
func Pipeliner .ClientSetName (ctx context .Context , name string ) *BoolCmd
func Pipeliner .Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func Pipeliner .ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func Pipeliner .HExists (ctx context .Context , key, field string ) *BoolCmd
func Pipeliner .HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
func Pipeliner .HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
func Pipeliner .Move (ctx context .Context , key string , db int ) *BoolCmd
func Pipeliner .MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
func Pipeliner .Persist (ctx context .Context , key string ) *BoolCmd
func Pipeliner .PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func Pipeliner .PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func Pipeliner .RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
func Pipeliner .SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func Pipeliner .SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func Pipeliner .SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
func Pipeliner .SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
func StatefulCmdable .ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
func StatefulCmdable .ClientSetName (ctx context .Context , name string ) *BoolCmd
func StatefulCmdable .Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func StatefulCmdable .ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func StatefulCmdable .HExists (ctx context .Context , key, field string ) *BoolCmd
func StatefulCmdable .HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
func StatefulCmdable .HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
func StatefulCmdable .Move (ctx context .Context , key string , db int ) *BoolCmd
func StatefulCmdable .MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
func StatefulCmdable .Persist (ctx context .Context , key string ) *BoolCmd
func StatefulCmdable .PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func StatefulCmdable .PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func StatefulCmdable .RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
func StatefulCmdable .SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func StatefulCmdable .SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func StatefulCmdable .SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
func StatefulCmdable .SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
func UniversalClient .ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
func UniversalClient .Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func UniversalClient .ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func UniversalClient .HExists (ctx context .Context , key, field string ) *BoolCmd
func UniversalClient .HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
func UniversalClient .HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
func UniversalClient .Move (ctx context .Context , key string , db int ) *BoolCmd
func UniversalClient .MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
func UniversalClient .Persist (ctx context .Context , key string ) *BoolCmd
func UniversalClient .PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
func UniversalClient .PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
func UniversalClient .RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
func UniversalClient .SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func UniversalClient .SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
func UniversalClient .SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
func UniversalClient .SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
type BoolSliceCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []bool
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]bool , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []bool
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 7, all are exported )
func NewBoolSliceCmd (ctx context .Context , args ...interface{}) *BoolSliceCmd
func NewBoolSliceResult (val []bool , err error ) *BoolSliceCmd
func Cmdable .ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
func Pipeliner .ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
func (*Script ).Exists (ctx context .Context , c scripter ) *BoolSliceCmd
func StatefulCmdable .ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
func UniversalClient .ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
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.
Fields (total 7, none are exported )
/* 7 unexporteds ... */ /* 7 unexporteds: */
baseClient *baseClient
baseClient .connPool pool .Pooler
baseClient .onClose func() error
// hook called when client is closed
baseClient .opt *Options
cmdable cmdable
ctx context .Context
hooks hooks
Methods (total 289, in which 261 are exported )
(*T) AddHook (hook Hook )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
( T) 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.
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
(*T) Conn (ctx context .Context ) *Conn
(*T) Context () context .Context
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
(*T) Do (ctx context .Context , args ...interface{}) *Cmd
Do creates a Cmd from the args and processes the cmd.
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
(*T) Options () *Options
Options returns read-only Options that were used to create the client.
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
(*T) PSubscribe (ctx context .Context , channels ...string ) *PubSub
PSubscribe subscribes the client to the given patterns.
Patterns can be omitted to create empty subscription.
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
(*T) Pipeline () Pipeliner
(*T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
(*T) PoolStats () *PoolStats
PoolStats returns connection pool stats.
(*T) Process (ctx context .Context , cmd Cmder ) error
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) String () string
(*T) 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()
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
(*T) TxPipeline () Pipeliner
TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
(*T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
(*T) Watch (ctx context .Context , fn func(*Tx ) error , keys ...string ) error
Watch prepares a transaction and marks the keys to be watched
for conditional execution if there are any keys.
The transaction is automatically closed when fn exits.
(*T) WithContext (ctx context .Context ) *Client
(*T) WithTimeout (timeout time .Duration ) *Client
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 28 unexporteds ... */ /* 28 unexporteds: */
( T) _generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
( T) _getConn (ctx context .Context ) (*pool .Conn , error )
( T) _process (ctx context .Context , cmd Cmder ) error
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
(*T) clone () *Client
( T) cmdTimeout (cmd Cmder ) time .Duration
( T) generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
( T) getAddr () string
( T) getConn (ctx context .Context ) (*pool .Conn , error )
( T) initConn (ctx context .Context , cn *pool .Conn ) error
(*T) lock ()
( T) newConn (ctx context .Context ) (*pool .Conn , error )
(*T) newTx (ctx context .Context ) *Tx
( T) pipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
(*T) processPipeline (ctx context .Context , cmds []Cmder ) error
(*T) processTxPipeline (ctx context .Context , cmds []Cmder ) error
(*T) pubSub () *PubSub
( T) releaseConn (ctx context .Context , cn *pool .Conn , err error )
( T) retryBackoff (attempt int ) time .Duration
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
( T) txPipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
( T) withConn (ctx context .Context , fn func(context .Context , *pool .Conn ) error ) error
( T) withTimeout (timeout time .Duration ) *baseClient
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 9, in which 5 are exported )
*T : Cmdable
*T : UniversalClient
T : expvar.Var
T : fmt.Stringer
T : io.Closer
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
T : context.stringer
T : runtime.stringer
As Outputs Of (at least 8, in which 4 are exported )
func NewClient (opt *Options ) *Client
func NewFailoverClient (failoverOpt *FailoverOptions ) *Client
func (*Client).WithContext (ctx context .Context ) *Client
func (*Client).WithTimeout (timeout time .Duration ) *Client
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
func (*Client).clone () *Client
func golang.org/x/pkgsite/cmd/worker.getCacheRedis (ctx context .Context , cfg *config .Config ) *Client
func golang.org/x/pkgsite/cmd/worker.getHARedis (ctx context .Context , cfg *config .Config ) *Client
func golang.org/x/pkgsite/cmd/worker.getRedis (ctx context .Context , host, port string , writeTimeout, readTimeout time .Duration ) *Client
As Inputs Of (at least 5, in which 4 are exported )
func golang.org/x/pkgsite/internal/cache.New (client *Client ) *cache .Cache
func golang.org/x/pkgsite/internal/frontend.(*Server ).Install (handle func(string , http .Handler ), redisClient *Client , authValues []string )
func golang.org/x/pkgsite/internal/middleware.Cache (name string , client *Client , expirer middleware .Expirer , authValues []string ) middleware .Middleware
func golang.org/x/pkgsite/internal/middleware.Quota (settings config .QuotaSettings , client *Client ) middleware .Middleware
/* at least one unexported ... */ /* at least one unexported: */
func golang.org/x/pkgsite/internal/middleware.enforceQuota (ctx context .Context , client *Client , qps int , header string , hmacKey []byte ) (blocked bool , reason string )
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.
Fields (total 8, none are exported )
/* 8 unexporteds ... */ /* 8 unexporteds: */
clusterClient *clusterClient
clusterClient .cmdsInfoCache *cmdsInfoCache
clusterClient .nodes *clusterNodes
clusterClient .opt *ClusterOptions
clusterClient .state *clusterStateHolder
cmdable cmdable
ctx context .Context
hooks hooks
Methods (total 296, in which 262 are exported )
(*T) AddHook (hook Hook )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
(*T) 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.
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
(*T) Context () context .Context
(*T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
(*T) Do (ctx context .Context , args ...interface{}) *Cmd
Do creates a Cmd from the args and processes the cmd.
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
(*T) 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.
(*T) 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.
(*T) 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.
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
(*T) Options () *ClusterOptions
Options returns read-only Options that were used to create the client.
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
(*T) PSubscribe (ctx context .Context , channels ...string ) *PubSub
PSubscribe subscribes the client to the given patterns.
Patterns can be omitted to create empty subscription.
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
(*T) Pipeline () Pipeliner
(*T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
(*T) PoolStats () *PoolStats
PoolStats returns accumulated connection pool stats.
(*T) Process (ctx context .Context , cmd Cmder ) error
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
(*T) ReloadState (ctx context .Context )
ReloadState reloads cluster state. If available it calls ClusterSlots func
to get cluster slots information.
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
(*T) Subscribe (ctx context .Context , channels ...string ) *PubSub
Subscribe subscribes the client to the specified channels.
Channels can be omitted to create empty subscription.
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
(*T) TxPipeline () Pipeliner
TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
(*T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
(*T) Watch (ctx context .Context , fn func(*Tx ) error , keys ...string ) error
(*T) WithContext (ctx context .Context ) *ClusterClient
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 34 unexporteds ... */ /* 34 unexporteds: */
(*T) _process (ctx context .Context , cmd Cmder ) error
(*T) _processPipeline (ctx context .Context , cmds []Cmder ) error
(*T) _processPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
(*T) _processTxPipeline (ctx context .Context , cmds []Cmder ) error
(*T) _processTxPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
(*T) checkMovedErr (ctx context .Context , cmd Cmder , err error , failedCmds *cmdsMap ) bool
( T) clone () hooks
(*T) cmdInfo (name string ) *CommandInfo
(*T) cmdNode (ctx context .Context , cmdInfo *CommandInfo , slot int ) (*clusterNode , error )
(*T) cmdSlot (cmd Cmder ) int
(*T) cmdsAreReadOnly (cmds []Cmder ) bool
(*T) cmdsInfo () (map[string ]*CommandInfo , error )
(*T) cmdsMoved (ctx context .Context , cmds []Cmder , moved, ask bool , addr string , failedCmds *cmdsMap ) error
(*T) loadState (ctx context .Context ) (*clusterState , error )
(*T) lock ()
(*T) mapCmdsByNode (ctx context .Context , cmdsMap *cmdsMap , cmds []Cmder ) error
(*T) mapCmdsBySlot (cmds []Cmder ) map[int ][]Cmder
(*T) pipelineReadCmds (ctx context .Context , node *clusterNode , rd *proto .Reader , cmds []Cmder , failedCmds *cmdsMap ) error
(*T) process (ctx context .Context , cmd Cmder ) error
(*T) processPipeline (ctx context .Context , cmds []Cmder ) error
(*T) processTxPipeline (ctx context .Context , cmds []Cmder ) error
(*T) pubSub () *PubSub
(*T) reaper (idleCheckFrequency time .Duration )
reaper closes idle connections to the cluster.
(*T) retryBackoff (attempt int ) time .Duration
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
(*T) slotMasterNode (ctx context .Context , slot int ) (*clusterNode , error )
( T) slotReadOnlyNode (state *clusterState , slot int ) (*clusterNode , error )
(*T) txPipelineReadQueued (ctx context .Context , rd *proto .Reader , statusCmd *StatusCmd , cmds []Cmder , failedCmds *cmdsMap ) error
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 5, in which 3 are exported )
*T : Cmdable
*T : UniversalClient
*T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
As Outputs Of (at least 3, all are exported )
func NewClusterClient (opt *ClusterOptions ) *ClusterClient
func NewFailoverClusterClient (failoverOpt *FailoverOptions ) *ClusterClient
func (*ClusterClient).WithContext (ctx context .Context ) *ClusterClient
type ClusterOptions (struct)
ClusterOptions are used to configure a cluster client and should be
passed to NewClusterClient.
Fields (total 24, all are exported )
Addrs []string
A seed list of host:port addresses of cluster nodes.
ClusterSlots func(context .Context ) ([]ClusterSlot , error )
Optional function that returns cluster slots information.
It is useful to manually create cluster of standalone Redis servers
and load-balance read/write operations between master and slaves.
It can use service like ZooKeeper to maintain configuration information
and Cluster.ReloadState to manually trigger state reloading.
DialTimeout time .Duration
Dialer func(ctx context .Context , network, addr string ) (net .Conn , error )
IdleCheckFrequency time .Duration
IdleTimeout time .Duration
MaxConnAge time .Duration
MaxRedirects int
The maximum number of retries before giving up. Command is retried
on network errors and MOVED/ASK redirects.
Default is 3 retries.
MaxRetries int
MaxRetryBackoff time .Duration
MinIdleConns int
MinRetryBackoff time .Duration
NewClient func(opt *Options ) *Client
NewClient creates a cluster node client with provided name and options.
OnConnect func(ctx context .Context , cn *Conn ) error
Password string
PoolSize int
PoolSize applies per cluster node and not for the whole cluster.
PoolTimeout time .Duration
ReadOnly bool
Enables read-only commands on slave nodes.
ReadTimeout time .Duration
RouteByLatency bool
Allows routing read-only commands to the closest master or slave node.
It automatically enables ReadOnly.
RouteRandomly bool
Allows routing read-only commands to the random master or slave node.
It automatically enables ReadOnly.
TLSConfig *tls .Config
Username string
WriteTimeout time .Duration
Methods (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
(*T) clientOptions () *Options
(*T) init ()
As Outputs Of (at least 3, in which 2 are exported )
func (*ClusterClient ).Options () *ClusterOptions
func (*UniversalOptions ).Cluster () *ClusterOptions
/* at least one unexported ... */ /* at least one unexported: */
func (*FailoverOptions ).clusterOptions () *ClusterOptions
As Inputs Of (at least 3, in which 1 are exported )
func NewClusterClient (opt *ClusterOptions ) *ClusterClient
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func newClusterNode (clOpt *ClusterOptions , addr string ) *clusterNode
func newClusterNodes (opt *ClusterOptions ) *clusterNodes
type Cmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val interface{}
Methods (total 19, in which 15 are exported )
(*T) Args () []interface{}
(*T) Bool () (bool , error )
(*T) Err () error
(*T) Float32 () (float32 , error )
(*T) Float64 () (float64 , error )
(*T) FullName () string
(*T) Int () (int , error )
(*T) Int64 () (int64 , error )
(*T) Name () string
(*T) Result () (interface{}, error )
(*T) SetErr (e error )
(*T) String () string
(*T) Text () (string , error )
(*T) Uint64 () (uint64 , error )
(*T) Val () interface{}
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 7, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*T : context.stringer
*T : gopkg.in/yaml.v2.jsonNumber
*T : runtime.stringer
As Outputs Of (at least 19, all are exported )
func NewCmd (ctx context .Context , args ...interface{}) *Cmd
func NewCmdResult (val interface{}, err error ) *Cmd
func (*Client ).Do (ctx context .Context , args ...interface{}) *Cmd
func (*ClusterClient ).Do (ctx context .Context , args ...interface{}) *Cmd
func Cmdable .Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
func Cmdable .EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
func (*Pipeline ).Do (ctx context .Context , args ...interface{}) *Cmd
func Pipeliner .Do (ctx context .Context , args ...interface{}) *Cmd
func Pipeliner .Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
func Pipeliner .EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
func (*Ring ).Do (ctx context .Context , args ...interface{}) *Cmd
func (*Script ).Eval (ctx context .Context , c scripter , keys []string , args ...interface{}) *Cmd
func (*Script ).EvalSha (ctx context .Context , c scripter , keys []string , args ...interface{}) *Cmd
func (*Script ).Run (ctx context .Context , c scripter , keys []string , args ...interface{}) *Cmd
func StatefulCmdable .Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
func StatefulCmdable .EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
func UniversalClient .Do (ctx context .Context , args ...interface{}) *Cmd
func UniversalClient .Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
func UniversalClient .EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
type Cmdable (interface)
Methods (total 242, all are exported )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
( T) Get (ctx context .Context , key string ) *StringCmd
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) MSet (ctx context .Context , values ...interface{}) *StatusCmd
( T) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
( T) Pipeline () Pipeliner
( T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRandMember (ctx context .Context , key string ) *StringCmd
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
( T) TxPipeline () Pipeliner
( T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream string , start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream string , start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
Implemented By (at least 9, all are exported )
*Client
*ClusterClient
*Conn
*Pipeline
Pipeliner (interface)
*Ring
StatefulCmdable (interface)
*Tx
UniversalClient (interface)
Implements (at least 2, neither is exported )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
type Cmder (interface)
Methods (total 9, in which 6 are exported )
( T) Args () []interface{}
( T) Err () error
( T) FullName () string
( T) Name () string
( T) SetErr (error )
( T) String () string
/* 3 unexporteds ... */ /* 3 unexporteds: */
( T) readReply (rd *proto .Reader ) error
( T) readTimeout () *time .Duration
( T) stringArg (int ) string
Implemented By (at least 28, all are exported )
*BoolCmd
*BoolSliceCmd
*ClusterSlotsCmd
*Cmd
*CommandsInfoCmd
*DurationCmd
*FloatCmd
*GeoLocationCmd
*GeoPosCmd
*IntCmd
*IntSliceCmd
*ScanCmd
*SliceCmd
*SlowLogCmd
*StatusCmd
*StringCmd
*StringIntMapCmd
*StringSliceCmd
*StringStringMapCmd
*StringStructMapCmd
*TimeCmd
*XInfoGroupsCmd
*XMessageSliceCmd
*XPendingCmd
*XPendingExtCmd
*XStreamSliceCmd
*ZSliceCmd
*ZWithKeyCmd
Implements (at least 5, in which 3 are exported )
T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
T : expvar.Var
T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : context.stringer
T : runtime.stringer
As Outputs Of (at least 24, in which 22 are exported )
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 )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func wrapMultiExec (ctx context .Context , cmds []Cmder ) []Cmder
func (*ClusterClient ).mapCmdsBySlot (cmds []Cmder ) map[int ][]Cmder
As Inputs Of (at least 49, in which 13 are exported )
func (*Client ).Process (ctx context .Context , cmd Cmder ) error
func (*ClusterClient ).Process (ctx context .Context , cmd Cmder ) error
func (*Conn ).Process (ctx context .Context , cmd Cmder ) error
func Hook .AfterProcess (ctx context .Context , cmd Cmder ) error
func Hook .AfterProcessPipeline (ctx context .Context , cmds []Cmder ) error
func Hook .BeforeProcess (ctx context .Context , cmd Cmder ) (context .Context , error )
func Hook .BeforeProcessPipeline (ctx context .Context , cmds []Cmder ) (context .Context , error )
func (*Pipeline ).Process (ctx context .Context , cmd Cmder ) error
func Pipeliner .Process (ctx context .Context , cmd Cmder ) error
func (*Ring ).Process (ctx context .Context , cmd Cmder ) error
func (*SentinelClient ).Process (ctx context .Context , cmd Cmder ) error
func (*Tx ).Process (ctx context .Context , cmd Cmder ) error
func UniversalClient .Process (ctx context .Context , cmd Cmder ) error
/* 36+ unexporteds ... */ /* 36+ unexporteds: */
func cmdFirstKeyPos (cmd Cmder , info *CommandInfo ) int
func cmdsFirstErr (cmds []Cmder ) error
func cmdSlot (cmd Cmder , pos int ) int
func cmdString (cmd Cmder , val interface{}) string
func pipelineReadCmds (rd *proto .Reader , cmds []Cmder ) error
func setCmdsErr (cmds []Cmder , e error )
func txPipelineReadQueued (rd *proto .Reader , statusCmd *StatusCmd , cmds []Cmder ) error
func wrapMultiExec (ctx context .Context , cmds []Cmder ) []Cmder
func writeCmd (wr *proto .Writer , cmd Cmder ) error
func writeCmds (wr *proto .Writer , cmds []Cmder ) error
func (*Client ).processPipeline (ctx context .Context , cmds []Cmder ) error
func (*Client ).processTxPipeline (ctx context .Context , cmds []Cmder ) error
func (*ClusterClient )._process (ctx context .Context , cmd Cmder ) error
func (*ClusterClient )._processPipeline (ctx context .Context , cmds []Cmder ) error
func (*ClusterClient )._processPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient )._processTxPipeline (ctx context .Context , cmds []Cmder ) error
func (*ClusterClient )._processTxPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient ).checkMovedErr (ctx context .Context , cmd Cmder , err error , failedCmds *cmdsMap ) bool
func (*ClusterClient ).cmdsAreReadOnly (cmds []Cmder ) bool
func (*ClusterClient ).cmdSlot (cmd Cmder ) int
func (*ClusterClient ).cmdsMoved (ctx context .Context , cmds []Cmder , moved, ask bool , addr string , failedCmds *cmdsMap ) error
func (*ClusterClient ).mapCmdsByNode (ctx context .Context , cmdsMap *cmdsMap , cmds []Cmder ) error
func (*ClusterClient ).mapCmdsBySlot (cmds []Cmder ) map[int ][]Cmder
func (*ClusterClient ).pipelineReadCmds (ctx context .Context , node *clusterNode , rd *proto .Reader , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient ).process (ctx context .Context , cmd Cmder ) error
func (*ClusterClient ).processPipeline (ctx context .Context , cmds []Cmder ) error
func (*ClusterClient ).processTxPipeline (ctx context .Context , cmds []Cmder ) error
func (*ClusterClient ).txPipelineReadQueued (ctx context .Context , rd *proto .Reader , statusCmd *StatusCmd , cmds []Cmder , failedCmds *cmdsMap ) error
func (*PubSub ).writeCmd (ctx context .Context , cn *pool .Conn , cmd Cmder ) error
func (*Ring )._process (ctx context .Context , cmd Cmder ) error
func (*Ring ).cmdShard (cmd Cmder ) (*ringShard , error )
func (*Ring ).generalProcessPipeline (ctx context .Context , cmds []Cmder , tx bool ) error
func (*Ring ).process (ctx context .Context , cmd Cmder ) error
func (*Ring ).processPipeline (ctx context .Context , cmds []Cmder ) error
func (*Ring ).processShardPipeline (ctx context .Context , hash string , cmds []Cmder , tx bool ) error
func (*Ring ).processTxPipeline (ctx context .Context , cmds []Cmder ) error
type CommandInfo (struct)
Fields (total 8, all are exported )
ACLFlags []string
Arity int8
FirstKeyPos int8
Flags []string
LastKeyPos int8
Name string
ReadOnly bool
StepCount int8
As Outputs Of (at least 6, in which 2 are exported )
func (*CommandsInfoCmd ).Result () (map[string ]*CommandInfo , error )
func (*CommandsInfoCmd ).Val () map[string ]*CommandInfo
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
func (*ClusterClient ).cmdInfo (name string ) *CommandInfo
func (*ClusterClient ).cmdsInfo () (map[string ]*CommandInfo , error )
func (*Ring ).cmdInfo (name string ) *CommandInfo
func (*Ring ).cmdsInfo () (map[string ]*CommandInfo , error )
As Inputs Of (at least 3, in which 1 are exported )
func NewCommandsInfoCmdResult (val map[string ]*CommandInfo , err error ) *CommandsInfoCmd
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func cmdFirstKeyPos (cmd Cmder , info *CommandInfo ) int
func (*ClusterClient ).cmdNode (ctx context .Context , cmdInfo *CommandInfo , slot int ) (*clusterNode , error )
type Conn (struct)
Conn is like Client, but its pool contains single connection.
Fields (total 8, none are exported )
/* 8 unexporteds ... */ /* 8 unexporteds: */
conn *conn
conn .baseClient baseClient
conn .baseClient .connPool pool .Pooler
conn .baseClient .onClose func() error
// hook called when client is closed
conn .baseClient .opt *Options
conn .cmdable cmdable
conn .statefulCmdable statefulCmdable
ctx context .Context
Methods (total 281, in which 255 are exported )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) Auth (ctx context .Context , password string ) *StatusCmd
( T) AuthACL (ctx context .Context , username, password string ) *StatusCmd
Perform an AUTH command, using the given user and pass.
Should be used to authenticate the current connection with one of the connections defined in the ACL list
when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientSetName (ctx context .Context , name string ) *BoolCmd
ClientSetName assigns a name to the connection.
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
( T) 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.
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
(*T) Pipeline () Pipeliner
(*T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
(*T) Process (ctx context .Context , cmd Cmder ) error
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Select (ctx context .Context , index int ) *StatusCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) String () string
( T) SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
(*T) TxPipeline () Pipeliner
TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
(*T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 26 unexporteds ... */ /* 26 unexporteds: */
( T) _generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
( T) _getConn (ctx context .Context ) (*pool .Conn , error )
( T) _process (ctx context .Context , cmd Cmder ) error
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
( T) clone () *baseClient
( T) cmdTimeout (cmd Cmder ) time .Duration
( T) generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
( T) getAddr () string
( T) getConn (ctx context .Context ) (*pool .Conn , error )
( T) initConn (ctx context .Context , cn *pool .Conn ) error
( T) newConn (ctx context .Context ) (*pool .Conn , error )
( T) pipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
( T) process (ctx context .Context , cmd Cmder ) error
( T) processPipeline (ctx context .Context , cmds []Cmder ) error
( T) processTxPipeline (ctx context .Context , cmds []Cmder ) error
( T) releaseConn (ctx context .Context , cn *pool .Conn , err error )
( T) retryBackoff (attempt int ) time .Duration
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
( T) txPipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
( T) withConn (ctx context .Context , fn func(context .Context , *pool .Conn ) error ) error
( T) withTimeout (timeout time .Duration ) *baseClient
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 9, in which 5 are exported )
*T : Cmdable
*T : StatefulCmdable
T : expvar.Var
T : fmt.Stringer
T : io.Closer
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
T : context.stringer
T : runtime.stringer
As Outputs Of (at least 2, in which 1 are exported )
func (*Client ).Conn (ctx context .Context ) *Conn
/* at least one unexported ... */ /* at least one unexported: */
func newConn (ctx context .Context , opt *Options , connPool pool .Pooler ) *Conn
type DurationCmd (struct)
Fields (total 7, none are exported )
/* 7 unexporteds ... */ /* 7 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
precision time .Duration
val time .Duration
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (time .Duration , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () time .Duration
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 14, all are exported )
func NewDurationCmd (ctx context .Context , precision time .Duration , args ...interface{}) *DurationCmd
func NewDurationResult (val time .Duration , err error ) *DurationCmd
func Cmdable .ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
func Cmdable .PTTL (ctx context .Context , key string ) *DurationCmd
func Cmdable .TTL (ctx context .Context , key string ) *DurationCmd
func Pipeliner .ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
func Pipeliner .PTTL (ctx context .Context , key string ) *DurationCmd
func Pipeliner .TTL (ctx context .Context , key string ) *DurationCmd
func StatefulCmdable .ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
func StatefulCmdable .PTTL (ctx context .Context , key string ) *DurationCmd
func StatefulCmdable .TTL (ctx context .Context , key string ) *DurationCmd
func UniversalClient .ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
func UniversalClient .PTTL (ctx context .Context , key string ) *DurationCmd
func UniversalClient .TTL (ctx context .Context , key string ) *DurationCmd
type FloatCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val float64
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (float64 , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () float64
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 34, all are exported )
func NewFloatCmd (ctx context .Context , args ...interface{}) *FloatCmd
func NewFloatResult (val float64 , err error ) *FloatCmd
func Cmdable .GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
func Cmdable .HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
func Cmdable .IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
func Cmdable .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func Cmdable .ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
func Cmdable .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func Cmdable .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
func Cmdable .ZScore (ctx context .Context , key, member string ) *FloatCmd
func Pipeliner .GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
func Pipeliner .HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
func Pipeliner .IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
func Pipeliner .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func Pipeliner .ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
func Pipeliner .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func Pipeliner .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
func Pipeliner .ZScore (ctx context .Context , key, member string ) *FloatCmd
func StatefulCmdable .GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
func StatefulCmdable .HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
func StatefulCmdable .IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
func StatefulCmdable .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func StatefulCmdable .ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
func StatefulCmdable .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func StatefulCmdable .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
func StatefulCmdable .ZScore (ctx context .Context , key, member string ) *FloatCmd
func UniversalClient .GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
func UniversalClient .HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
func UniversalClient .IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
func UniversalClient .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func UniversalClient .ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
func UniversalClient .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func UniversalClient .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
func UniversalClient .ZScore (ctx context .Context , key, member string ) *FloatCmd
type GeoLocation (struct)
GeoLocation is used with GeoAdd to add geospatial location.
Fields (total 5, all are exported )
Dist float64
GeoHash int64
Latitude float64
Longitude float64
Name string
As Outputs Of (at least 2, both are exported )
func (*GeoLocationCmd ).Result () ([]GeoLocation , error )
func (*GeoLocationCmd ).Val () []GeoLocation
As Inputs Of (at least 5, all are exported )
func NewGeoLocationCmdResult (val []GeoLocation , err error ) *GeoLocationCmd
func Cmdable .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
func Pipeliner .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
func StatefulCmdable .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
func UniversalClient .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
type GeoLocationCmd (struct)
Fields (total 7, none are exported )
/* 7 unexporteds ... */ /* 7 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
locations []GeoLocation
q *GeoRadiusQuery
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]GeoLocation , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []GeoLocation
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 10, all are exported )
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)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []*GeoPos
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]*GeoPos , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []*GeoPos
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 6, all are exported )
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, all are exported )
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 20, in which 17 are exported )
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
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func geoLocationArgs (q *GeoRadiusQuery , args ...interface{}) []interface{}
func newGeoLocationParser (q *GeoRadiusQuery ) proto .MultiBulkParse
func newGeoLocationSliceParser (q *GeoRadiusQuery ) proto .MultiBulkParse
type IntCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val int64
Methods (total 13, in which 9 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (int64 , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Uint64 () (uint64 , error )
(*T) Val () int64
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 320, all are exported )
func NewIntCmd (ctx context .Context , args ...interface{}) *IntCmd
func NewIntResult (val int64 , err error ) *IntCmd
func (*ClusterClient ).DBSize (ctx context .Context ) *IntCmd
func Cmdable .Append (ctx context .Context , key, value string ) *IntCmd
func Cmdable .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
func Cmdable .BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
func Cmdable .BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
func Cmdable .BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
func Cmdable .BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
func Cmdable .BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
func Cmdable .ClientID (ctx context .Context ) *IntCmd
func Cmdable .ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
func Cmdable .ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
func Cmdable .ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
func Cmdable .ClusterKeySlot (ctx context .Context , key string ) *IntCmd
func Cmdable .DBSize (ctx context .Context ) *IntCmd
func Cmdable .Decr (ctx context .Context , key string ) *IntCmd
func Cmdable .DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
func Cmdable .Del (ctx context .Context , keys ...string ) *IntCmd
func Cmdable .Exists (ctx context .Context , keys ...string ) *IntCmd
func Cmdable .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
func Cmdable .GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
func Cmdable .GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
func Cmdable .GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
func Cmdable .HDel (ctx context .Context , key string , fields ...string ) *IntCmd
func Cmdable .HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
func Cmdable .HLen (ctx context .Context , key string ) *IntCmd
func Cmdable .HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
func Cmdable .Incr (ctx context .Context , key string ) *IntCmd
func Cmdable .IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
func Cmdable .LastSave (ctx context .Context ) *IntCmd
func Cmdable .LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
func Cmdable .LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func Cmdable .LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func Cmdable .LLen (ctx context .Context , key string ) *IntCmd
func Cmdable .LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func Cmdable .LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func Cmdable .LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
func Cmdable .MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
func Cmdable .ObjectRefCount (ctx context .Context , key string ) *IntCmd
func Cmdable .PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
func Cmdable .PFCount (ctx context .Context , keys ...string ) *IntCmd
func Cmdable .Publish (ctx context .Context , channel string , message interface{}) *IntCmd
func Cmdable .PubSubNumPat (ctx context .Context ) *IntCmd
func Cmdable .RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func Cmdable .RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func Cmdable .SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
func Cmdable .SCard (ctx context .Context , key string ) *IntCmd
func Cmdable .SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func Cmdable .SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
func Cmdable .SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
func Cmdable .SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func Cmdable .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
func Cmdable .SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func Cmdable .StrLen (ctx context .Context , key string ) *IntCmd
func Cmdable .SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func Cmdable .Touch (ctx context .Context , keys ...string ) *IntCmd
func Cmdable .Unlink (ctx context .Context , keys ...string ) *IntCmd
func Cmdable .XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
func Cmdable .XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
func Cmdable .XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
func Cmdable .XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
func Cmdable .XLen (ctx context .Context , stream string ) *IntCmd
func Cmdable .XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
func Cmdable .XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
func Cmdable .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZCard (ctx context .Context , key string ) *IntCmd
func Cmdable .ZCount (ctx context .Context , key, min, max string ) *IntCmd
func Cmdable .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func Cmdable .ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
func Cmdable .ZRank (ctx context .Context , key, member string ) *IntCmd
func Cmdable .ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func Cmdable .ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
func Cmdable .ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
func Cmdable .ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
func Cmdable .ZRevRank (ctx context .Context , key, member string ) *IntCmd
func Cmdable .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
func Pipeliner .Append (ctx context .Context , key, value string ) *IntCmd
func Pipeliner .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
func Pipeliner .BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
func Pipeliner .BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
func Pipeliner .BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
func Pipeliner .BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
func Pipeliner .BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
func Pipeliner .ClientID (ctx context .Context ) *IntCmd
func Pipeliner .ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
func Pipeliner .ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
func Pipeliner .ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
func Pipeliner .ClusterKeySlot (ctx context .Context , key string ) *IntCmd
func Pipeliner .DBSize (ctx context .Context ) *IntCmd
func Pipeliner .Decr (ctx context .Context , key string ) *IntCmd
func Pipeliner .DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
func Pipeliner .Del (ctx context .Context , keys ...string ) *IntCmd
func Pipeliner .Exists (ctx context .Context , keys ...string ) *IntCmd
func Pipeliner .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
func Pipeliner .GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
func Pipeliner .GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
func Pipeliner .GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
func Pipeliner .HDel (ctx context .Context , key string , fields ...string ) *IntCmd
func Pipeliner .HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
func Pipeliner .HLen (ctx context .Context , key string ) *IntCmd
func Pipeliner .HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
func Pipeliner .Incr (ctx context .Context , key string ) *IntCmd
func Pipeliner .IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
func Pipeliner .LastSave (ctx context .Context ) *IntCmd
func Pipeliner .LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
func Pipeliner .LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func Pipeliner .LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func Pipeliner .LLen (ctx context .Context , key string ) *IntCmd
func Pipeliner .LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func Pipeliner .LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func Pipeliner .LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
func Pipeliner .MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
func Pipeliner .ObjectRefCount (ctx context .Context , key string ) *IntCmd
func Pipeliner .PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
func Pipeliner .PFCount (ctx context .Context , keys ...string ) *IntCmd
func Pipeliner .Publish (ctx context .Context , channel string , message interface{}) *IntCmd
func Pipeliner .PubSubNumPat (ctx context .Context ) *IntCmd
func Pipeliner .RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func Pipeliner .RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func Pipeliner .SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
func Pipeliner .SCard (ctx context .Context , key string ) *IntCmd
func Pipeliner .SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func Pipeliner .SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
func Pipeliner .SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
func Pipeliner .SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func Pipeliner .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
func Pipeliner .SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func Pipeliner .StrLen (ctx context .Context , key string ) *IntCmd
func Pipeliner .SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func Pipeliner .Touch (ctx context .Context , keys ...string ) *IntCmd
func Pipeliner .Unlink (ctx context .Context , keys ...string ) *IntCmd
func Pipeliner .XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
func Pipeliner .XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
func Pipeliner .XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
func Pipeliner .XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
func Pipeliner .XLen (ctx context .Context , stream string ) *IntCmd
func Pipeliner .XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
func Pipeliner .XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
func Pipeliner .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZCard (ctx context .Context , key string ) *IntCmd
func Pipeliner .ZCount (ctx context .Context , key, min, max string ) *IntCmd
func Pipeliner .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func Pipeliner .ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
func Pipeliner .ZRank (ctx context .Context , key, member string ) *IntCmd
func Pipeliner .ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func Pipeliner .ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
func Pipeliner .ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
func Pipeliner .ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
func Pipeliner .ZRevRank (ctx context .Context , key, member string ) *IntCmd
func Pipeliner .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
func (*SentinelClient ).Reset (ctx context .Context , pattern string ) *IntCmd
func StatefulCmdable .Append (ctx context .Context , key, value string ) *IntCmd
func StatefulCmdable .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
func StatefulCmdable .BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
func StatefulCmdable .BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
func StatefulCmdable .BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
func StatefulCmdable .BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
func StatefulCmdable .BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
func StatefulCmdable .ClientID (ctx context .Context ) *IntCmd
func StatefulCmdable .ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
func StatefulCmdable .ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
func StatefulCmdable .ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
func StatefulCmdable .ClusterKeySlot (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .DBSize (ctx context .Context ) *IntCmd
func StatefulCmdable .Decr (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
func StatefulCmdable .Del (ctx context .Context , keys ...string ) *IntCmd
func StatefulCmdable .Exists (ctx context .Context , keys ...string ) *IntCmd
func StatefulCmdable .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
func StatefulCmdable .GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
func StatefulCmdable .GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
func StatefulCmdable .GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
func StatefulCmdable .HDel (ctx context .Context , key string , fields ...string ) *IntCmd
func StatefulCmdable .HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
func StatefulCmdable .HLen (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
func StatefulCmdable .Incr (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
func StatefulCmdable .LastSave (ctx context .Context ) *IntCmd
func StatefulCmdable .LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
func StatefulCmdable .LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func StatefulCmdable .LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func StatefulCmdable .LLen (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func StatefulCmdable .LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func StatefulCmdable .LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
func StatefulCmdable .MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
func StatefulCmdable .ObjectRefCount (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
func StatefulCmdable .PFCount (ctx context .Context , keys ...string ) *IntCmd
func StatefulCmdable .Publish (ctx context .Context , channel string , message interface{}) *IntCmd
func StatefulCmdable .PubSubNumPat (ctx context .Context ) *IntCmd
func StatefulCmdable .RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func StatefulCmdable .RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func StatefulCmdable .SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
func StatefulCmdable .SCard (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func StatefulCmdable .SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
func StatefulCmdable .SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
func StatefulCmdable .SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func StatefulCmdable .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
func StatefulCmdable .SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func StatefulCmdable .StrLen (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func StatefulCmdable .Touch (ctx context .Context , keys ...string ) *IntCmd
func StatefulCmdable .Unlink (ctx context .Context , keys ...string ) *IntCmd
func StatefulCmdable .XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
func StatefulCmdable .XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
func StatefulCmdable .XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
func StatefulCmdable .XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
func StatefulCmdable .XLen (ctx context .Context , stream string ) *IntCmd
func StatefulCmdable .XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
func StatefulCmdable .XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
func StatefulCmdable .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZCard (ctx context .Context , key string ) *IntCmd
func StatefulCmdable .ZCount (ctx context .Context , key, min, max string ) *IntCmd
func StatefulCmdable .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func StatefulCmdable .ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
func StatefulCmdable .ZRank (ctx context .Context , key, member string ) *IntCmd
func StatefulCmdable .ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func StatefulCmdable .ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
func StatefulCmdable .ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
func StatefulCmdable .ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
func StatefulCmdable .ZRevRank (ctx context .Context , key, member string ) *IntCmd
func StatefulCmdable .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
func UniversalClient .Append (ctx context .Context , key, value string ) *IntCmd
func UniversalClient .BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
func UniversalClient .BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
func UniversalClient .BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
func UniversalClient .BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
func UniversalClient .BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
func UniversalClient .BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
func UniversalClient .ClientID (ctx context .Context ) *IntCmd
func UniversalClient .ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
func UniversalClient .ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
func UniversalClient .ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
func UniversalClient .ClusterKeySlot (ctx context .Context , key string ) *IntCmd
func UniversalClient .DBSize (ctx context .Context ) *IntCmd
func UniversalClient .Decr (ctx context .Context , key string ) *IntCmd
func UniversalClient .DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
func UniversalClient .Del (ctx context .Context , keys ...string ) *IntCmd
func UniversalClient .Exists (ctx context .Context , keys ...string ) *IntCmd
func UniversalClient .GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
func UniversalClient .GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
func UniversalClient .GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
func UniversalClient .GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
func UniversalClient .HDel (ctx context .Context , key string , fields ...string ) *IntCmd
func UniversalClient .HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
func UniversalClient .HLen (ctx context .Context , key string ) *IntCmd
func UniversalClient .HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
func UniversalClient .Incr (ctx context .Context , key string ) *IntCmd
func UniversalClient .IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
func UniversalClient .LastSave (ctx context .Context ) *IntCmd
func UniversalClient .LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
func UniversalClient .LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func UniversalClient .LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
func UniversalClient .LLen (ctx context .Context , key string ) *IntCmd
func UniversalClient .LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func UniversalClient .LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func UniversalClient .LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
func UniversalClient .MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
func UniversalClient .ObjectRefCount (ctx context .Context , key string ) *IntCmd
func UniversalClient .PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
func UniversalClient .PFCount (ctx context .Context , keys ...string ) *IntCmd
func UniversalClient .Publish (ctx context .Context , channel string , message interface{}) *IntCmd
func UniversalClient .PubSubNumPat (ctx context .Context ) *IntCmd
func UniversalClient .RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
func UniversalClient .RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
func UniversalClient .SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
func UniversalClient .SCard (ctx context .Context , key string ) *IntCmd
func UniversalClient .SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func UniversalClient .SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
func UniversalClient .SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
func UniversalClient .SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func UniversalClient .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
func UniversalClient .SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func UniversalClient .StrLen (ctx context .Context , key string ) *IntCmd
func UniversalClient .SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
func UniversalClient .Touch (ctx context .Context , keys ...string ) *IntCmd
func UniversalClient .Unlink (ctx context .Context , keys ...string ) *IntCmd
func UniversalClient .XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
func UniversalClient .XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
func UniversalClient .XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
func UniversalClient .XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
func UniversalClient .XLen (ctx context .Context , stream string ) *IntCmd
func UniversalClient .XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
func UniversalClient .XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
func UniversalClient .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZCard (ctx context .Context , key string ) *IntCmd
func UniversalClient .ZCount (ctx context .Context , key, min, max string ) *IntCmd
func UniversalClient .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func UniversalClient .ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
func UniversalClient .ZRank (ctx context .Context , key, member string ) *IntCmd
func UniversalClient .ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
func UniversalClient .ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
func UniversalClient .ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
func UniversalClient .ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
func UniversalClient .ZRevRank (ctx context .Context , key, member string ) *IntCmd
func UniversalClient .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
type IntSliceCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []int64
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]int64 , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []int64
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 5, all are exported )
func NewIntSliceCmd (ctx context .Context , args ...interface{}) *IntSliceCmd
func Cmdable .BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
func Pipeliner .BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
func StatefulCmdable .BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
func UniversalClient .BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
type Options (struct)
Fields (total 22, in which 21 are exported )
Addr string
host:port address.
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.
IdleCheckFrequency time .Duration
Frequency of idle checks made by idle connections reaper.
Default is 1 minute. -1 disables idle connections reaper,
but idle connections are still discarded by the client
if IdleTimeout is set.
IdleTimeout time .Duration
Amount of time after which client closes idle connections.
Should be less than server's timeout.
Default is 5 minutes. -1 disables idle timeout check.
Limiter Limiter
Limiter interface used to implemented circuit breaker or rate limiter.
MaxConnAge time .Duration
Connection age at which client retires (closes) the connection.
Default is to not close aged connections.
MaxRetries int
Maximum number of retries before giving up.
Default is 3 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.
PoolSize int
Maximum number of socket connections.
Default is 10 connections per every CPU as reported by runtime.NumCPU.
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. Use value -1 for no timeout and 0 for default.
Default is 3 seconds.
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.
Default is ReadTimeout.
/* one unexported ... */ /* one unexported: */
readOnly bool
Enables read only queries on slave nodes.
Methods (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
(*T) clone () *Options
(*T) init ()
As Outputs Of (at least 8, in which 3 are exported )
func ParseURL (redisURL string ) (*Options , error )
func (*Client ).Options () *Options
func (*UniversalOptions ).Simple () *Options
/* 5+ unexporteds ... */ /* 5+ unexporteds: */
func (*ClusterOptions ).clientOptions () *Options
func (*FailoverOptions ).clientOptions () *Options
func (*FailoverOptions ).sentinelOptions (addr string ) *Options
func (*Options).clone () *Options
func (*RingOptions ).clientOptions () *Options
As Inputs Of (at least 5, in which 2 are exported )
func NewClient (opt *Options ) *Client
func NewSentinelClient (opt *Options ) *SentinelClient
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func newBaseClient (opt *Options , connPool pool .Pooler ) *baseClient
func newConn (ctx context .Context , opt *Options , connPool pool .Pooler ) *Conn
func newConnPool (opt *Options ) *pool .ConnPool
type Pipeline (struct)
Pipeline implements pipelining as described in
http://redis.io/topics/pipelining. It's safe for concurrent use
by multiple goroutines.
Fields (total 7, none are exported )
/* 7 unexporteds ... */ /* 7 unexporteds: */
closed bool
cmdable cmdable
cmds []Cmder
ctx context .Context
exec pipelineExecer
mu sync .Mutex
statefulCmdable statefulCmdable
Methods (total 266, in which 257 are exported )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) Auth (ctx context .Context , password string ) *StatusCmd
( T) AuthACL (ctx context .Context , username, password string ) *StatusCmd
Perform an AUTH command, using the given user and pass.
Should be used to authenticate the current connection with one of the connections defined in the ACL list
when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientSetName (ctx context .Context , name string ) *BoolCmd
ClientSetName assigns a name to the connection.
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
(*T) Close () error
Close closes the pipeline, releasing any open resources.
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
(*T) Discard () error
Discard resets the pipeline and discards queued commands.
(*T) Do (ctx context .Context , args ...interface{}) *Cmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
(*T) 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.
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
(*T) Pipeline () Pipeliner
(*T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
(*T) Process (ctx context .Context , cmd Cmder ) error
Process queues the cmd for later execution.
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Select (ctx context .Context , index int ) *StatusCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
(*T) TxPipeline () Pipeliner
(*T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 9 unexporteds ... */ /* 9 unexporteds: */
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
(*T) discard () error
(*T) init ()
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 6, in which 4 are exported )
*T : Cmdable
*T : Pipeliner
*T : StatefulCmdable
*T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
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
singe step.
See https://redis.io/topics/pipelining
Pay attention, that Pipeline is not a transaction, so you can get unexpected
results in case of big pipelines and small read/write timeouts.
Redis client has retransmission logic in case of timeouts, pipeline
can be retransmitted and commands can be executed more then once.
To avoid this: it is good idea to use reasonable bigger read/write timeouts
depends of your batch size and/or use TxPipeline.
Methods (total 252, all are exported )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) Auth (ctx context .Context , password string ) *StatusCmd
( T) AuthACL (ctx context .Context , username, password string ) *StatusCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientSetName (ctx context .Context , name string ) *BoolCmd
( T) Close () error
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Discard () error
( T) Do (ctx context .Context , args ...interface{}) *Cmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exec (ctx context .Context ) ([]Cmder , error )
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
( T) Get (ctx context .Context , key string ) *StringCmd
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) MSet (ctx context .Context , values ...interface{}) *StatusCmd
( T) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
( T) Pipeline () Pipeliner
( T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Process (ctx context .Context , cmd Cmder ) error
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRandMember (ctx context .Context , key string ) *StringCmd
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Select (ctx context .Context , index int ) *StatusCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
( T) TxPipeline () Pipeliner
( T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream string , start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream string , start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
Implemented By (at least one exported )
*Pipeline
Implements (at least 5, in which 3 are exported )
T : Cmdable
T : StatefulCmdable
T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
As Outputs Of (at least 20, all are exported )
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.
Fields (total 14, none are exported )
/* 14 unexporteds ... */ /* 14 unexporteds: */
allCh chan interface{}
chOnce sync .Once
channels map[string ]struct{}
closeConn func(*pool .Conn ) error
closed bool
cmd *Cmd
cn *pool .Conn
exit chan struct{}
msgCh chan *Message
mu sync .Mutex
newConn func(ctx context .Context , channels []string ) (*pool .Conn , error )
opt *Options
patterns map[string ]struct{}
ping chan struct{}
Methods (total 31, in which 13 are exported )
(*T) Channel () <-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.
(*T) ChannelSize (size int ) <-chan *Message
ChannelSize is like Channel, but creates a Go channel
with specified buffer size.
(*T) ChannelWithSubscriptions (ctx context .Context , size int ) <-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.
(*T) Close () error
(*T) PSubscribe (ctx context .Context , patterns ...string ) error
PSubscribe the client to the given patterns. It returns
empty subscription if there are no patterns.
(*T) PUnsubscribe (ctx context .Context , patterns ...string ) error
PUnsubscribe the client from the given patterns, or from all of
them if none is given.
(*T) Ping (ctx context .Context , payload ...string ) error
(*T) 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.
(*T) 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.
(*T) 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.
(*T) String () string
(*T) Subscribe (ctx context .Context , channels ...string ) error
Subscribe the client to the specified channels. It returns
empty subscription if there are no channels.
(*T) Unsubscribe (ctx context .Context , channels ...string ) error
Unsubscribe the client from the given channels, or from all of
them if none is given.
/* 18 unexporteds ... */ /* 18 unexporteds: */
(*T) _subscribe (ctx context .Context , cn *pool .Conn , redisCmd string , channels []string ) error
(*T) closeTheCn (reason error ) error
(*T) conn (ctx context .Context , newChannels []string ) (*pool .Conn , error )
(*T) connWithLock (ctx context .Context ) (*pool .Conn , error )
(*T) getContext () context .Context
(*T) init ()
(*T) initAllChan (size int )
initAllChan must be in sync with initMsgChan.
(*T) initMsgChan (size int )
initMsgChan must be in sync with initAllChan.
(*T) initPing ()
(*T) newMessage (reply interface{}) (interface{}, error )
(*T) reconnect (ctx context .Context , reason error )
(*T) releaseConn (ctx context .Context , cn *pool .Conn , err error , allowTimeout bool )
(*T) releaseConnWithLock (ctx context .Context , cn *pool .Conn , err error , allowTimeout bool )
(*T) resubscribe (ctx context .Context , cn *pool .Conn ) error
(*T) retryBackoff (attempt int ) time .Duration
(*T) sendMessage (msg interface{}, timer *time .Timer )
(*T) subscribe (ctx context .Context , redisCmd string , channels ...string ) error
(*T) writeCmd (ctx context .Context , cn *pool .Conn , cmd Cmder ) error
Implements (at least 5, in which 3 are exported )
*T : expvar.Var
*T : fmt.Stringer
*T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 13, in which 10 are exported )
func (*Client ).PSubscribe (ctx context .Context , channels ...string ) *PubSub
func (*Client ).Subscribe (ctx context .Context , channels ...string ) *PubSub
func (*ClusterClient ).PSubscribe (ctx context .Context , channels ...string ) *PubSub
func (*ClusterClient ).Subscribe (ctx context .Context , channels ...string ) *PubSub
func (*Ring ).PSubscribe (ctx context .Context , channels ...string ) *PubSub
func (*Ring ).Subscribe (ctx context .Context , channels ...string ) *PubSub
func (*SentinelClient ).PSubscribe (ctx context .Context , channels ...string ) *PubSub
func (*SentinelClient ).Subscribe (ctx context .Context , channels ...string ) *PubSub
func UniversalClient .PSubscribe (ctx context .Context , channels ...string ) *PubSub
func UniversalClient .Subscribe (ctx context .Context , channels ...string ) *PubSub
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func (*Client ).pubSub () *PubSub
func (*ClusterClient ).pubSub () *PubSub
func (*SentinelClient ).pubSub () *PubSub
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.
Fields (total 7, none are exported )
/* 7 unexporteds ... */ /* 7 unexporteds: */
cmdable cmdable
ctx context .Context
hooks hooks
ring *ring
ring .cmdsInfoCache *cmdsInfoCache
ring .opt *RingOptions
ring .shards *ringShards
Methods (total 279, in which 260 are exported )
(*T) AddHook (hook Hook )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
(*T) 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.
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
(*T) Context () context .Context
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
(*T) Do (ctx context .Context , args ...interface{}) *Cmd
Do creates a Cmd from the args and processes the cmd.
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
(*T) 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.
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
(*T) Len () int
Len returns the current number of shards in the ring.
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
(*T) Options () *RingOptions
Options returns read-only Options that were used to create the client.
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
(*T) PSubscribe (ctx context .Context , channels ...string ) *PubSub
PSubscribe subscribes the client to the given patterns.
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
(*T) Pipeline () Pipeliner
(*T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
(*T) PoolStats () *PoolStats
PoolStats returns accumulated connection pool stats.
(*T) Process (ctx context .Context , cmd Cmder ) error
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
(*T) Subscribe (ctx context .Context , channels ...string ) *PubSub
Subscribe subscribes the client to the specified channels.
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
(*T) TxPipeline () Pipeliner
(*T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
(*T) Watch (ctx context .Context , fn func(*Tx ) error , keys ...string ) error
(*T) WithContext (ctx context .Context ) *Ring
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 19 unexporteds ... */ /* 19 unexporteds: */
(*T) _process (ctx context .Context , cmd Cmder ) error
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
( T) clone () hooks
(*T) cmdInfo (name string ) *CommandInfo
(*T) cmdShard (cmd Cmder ) (*ringShard , error )
(*T) cmdsInfo () (map[string ]*CommandInfo , error )
(*T) generalProcessPipeline (ctx context .Context , cmds []Cmder , tx bool ) error
(*T) lock ()
(*T) process (ctx context .Context , cmd Cmder ) error
(*T) processPipeline (ctx context .Context , cmds []Cmder ) error
(*T) processShardPipeline (ctx context .Context , hash string , cmds []Cmder , tx bool ) error
(*T) processTxPipeline (ctx context .Context , cmds []Cmder ) error
(*T) retryBackoff (attempt int ) time .Duration
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 6, in which 3 are exported )
*T : Cmdable
*T : UniversalClient
*T : io.Closer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
*T : github.com/aws/aws-sdk-go/aws/corehandlers.lener
As Outputs Of (at least 2, both are exported )
func NewRing (opt *RingOptions ) *Ring
func (*Ring).WithContext (ctx context .Context ) *Ring
type RingOptions (struct)
RingOptions are used to configure a ring client and should be
passed to NewRing.
Fields (total 23, all are exported )
Addrs map[string ]string
Map of name => host:port addresses of ring shards.
DB int
DialTimeout time .Duration
Dialer func(ctx context .Context , network, addr string ) (net .Conn , error )
HeartbeatFrequency time .Duration
Frequency of PING commands sent to check shards availability.
Shard is considered down after 3 subsequent failed checks.
IdleCheckFrequency time .Duration
IdleTimeout time .Duration
Limiter Limiter
MaxConnAge time .Duration
MaxRetries int
MaxRetryBackoff time .Duration
MinIdleConns int
MinRetryBackoff time .Duration
NewClient func(name string , opt *Options ) *Client
NewClient creates a shard client with provided name and options.
NewConsistentHash func(shards []string ) ConsistentHash
NewConsistentHash returns a consistent hash that is used
to distribute keys across the shards.
See https://medium.com/@dgryski/consistent-hashing-algorithmic-tradeoffs-ef6b8e2fcae8
for consistent hashing algorithmic tradeoffs.
OnConnect func(ctx context .Context , cn *Conn ) error
Password string
PoolSize int
PoolTimeout time .Duration
ReadTimeout time .Duration
TLSConfig *tls .Config
Username string
WriteTimeout time .Duration
Methods (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
(*T) clientOptions () *Options
(*T) init ()
As Outputs Of (at least one exported )
func (*Ring ).Options () *RingOptions
As Inputs Of (at least 3, in which 1 are exported )
func NewRing (opt *RingOptions ) *Ring
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func newRingShard (opt *RingOptions , name, addr string ) *ringShard
func newRingShards (opt *RingOptions ) *ringShards
type ScanCmd (struct)
Fields (total 8, none are exported )
/* 8 unexporteds ... */ /* 8 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
cursor uint64
page []string
process cmdable
Methods (total 13, in which 9 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Iterator () *ScanIterator
Iterator creates a new ScanIterator.
(*T) Name () string
(*T) Result () (keys []string , cursor uint64 , err error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () (keys []string , cursor uint64 )
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 18, all are exported )
func NewScanCmd (ctx context .Context , process cmdable , args ...interface{}) *ScanCmd
func NewScanCmdResult (keys []string , cursor uint64 , err error ) *ScanCmd
func Cmdable .HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func Cmdable .Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
func Cmdable .SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func Cmdable .ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func Pipeliner .HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func Pipeliner .Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
func Pipeliner .SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func Pipeliner .ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func StatefulCmdable .HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func StatefulCmdable .Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
func StatefulCmdable .SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func StatefulCmdable .ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func UniversalClient .HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func UniversalClient .Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
func UniversalClient .SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
func UniversalClient .ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
type Script (struct)
Fields (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
hash string
src string
Methods (total 6, all are exported )
(*T) Eval (ctx context .Context , c scripter , keys []string , args ...interface{}) *Cmd
(*T) EvalSha (ctx context .Context , c scripter , keys []string , args ...interface{}) *Cmd
(*T) Exists (ctx context .Context , c scripter ) *BoolSliceCmd
(*T) Hash () string
(*T) Load (ctx context .Context , c scripter ) *StringCmd
(*T) 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.
As Outputs Of (at least one exported )
func NewScript (src string ) *Script
As Types Of (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
var github.com/go-redis/redis_rate/v9.allowAtMost *Script
var github.com/go-redis/redis_rate/v9.allowN *Script
type SentinelClient (struct)
SentinelClient is a client for a Redis Sentinel.
Fields (total 5, none are exported )
/* 5 unexporteds ... */ /* 5 unexporteds: */
baseClient *baseClient
baseClient .connPool pool .Pooler
baseClient .onClose func() error
// hook called when client is closed
baseClient .opt *Options
ctx context .Context
Methods (total 40, in which 20 are exported )
(*T) 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.
( T) 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.
(*T) Context () context .Context
(*T) 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.
(*T) FlushConfig (ctx context .Context ) *StatusCmd
FlushConfig forces Sentinel to rewrite its configuration on disk, including
the current Sentinel state.
(*T) GetMasterAddrByName (ctx context .Context , name string ) *StringSliceCmd
(*T) Master (ctx context .Context , name string ) *StringStringMapCmd
Master shows the state and info of the specified master.
(*T) Masters (ctx context .Context ) *SliceCmd
Masters shows a list of monitored masters and their state.
(*T) 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.
(*T) PSubscribe (ctx context .Context , channels ...string ) *PubSub
PSubscribe subscribes the client to the given patterns.
Patterns can be omitted to create empty subscription.
(*T) Ping (ctx context .Context ) *StringCmd
Ping is used to test if a connection is still alive, or to
measure latency.
(*T) Process (ctx context .Context , cmd Cmder ) error
(*T) 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.
(*T) 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 slave and sentinel
already discovered and associated with the master.
(*T) Sentinels (ctx context .Context , name string ) *SliceCmd
(*T) Set (ctx context .Context , name, option, value string ) *StringCmd
Set is used in order to change configuration parameters of a specific master.
(*T) Slaves (ctx context .Context , name string ) *SliceCmd
Slaves shows a list of slaves for the specified master and their state.
( T) String () string
(*T) Subscribe (ctx context .Context , channels ...string ) *PubSub
Subscribe subscribes the client to the specified channels.
Channels can be omitted to create empty subscription.
(*T) WithContext (ctx context .Context ) *SentinelClient
/* 20 unexporteds ... */ /* 20 unexporteds: */
( T) _generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
( T) _getConn (ctx context .Context ) (*pool .Conn , error )
( T) _process (ctx context .Context , cmd Cmder ) error
( T) clone () *baseClient
( T) cmdTimeout (cmd Cmder ) time .Duration
( T) generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
( T) getAddr () string
( T) getConn (ctx context .Context ) (*pool .Conn , error )
( T) initConn (ctx context .Context , cn *pool .Conn ) error
( T) newConn (ctx context .Context ) (*pool .Conn , error )
( T) pipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
( T) process (ctx context .Context , cmd Cmder ) error
( T) processPipeline (ctx context .Context , cmds []Cmder ) error
( T) processTxPipeline (ctx context .Context , cmds []Cmder ) error
(*T) pubSub () *PubSub
( T) releaseConn (ctx context .Context , cn *pool .Conn , err error )
( T) retryBackoff (attempt int ) time .Duration
( T) txPipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
( T) withConn (ctx context .Context , fn func(context .Context , *pool .Conn ) error ) error
( T) withTimeout (timeout time .Duration ) *baseClient
Implements (at least 5, in which 3 are exported )
T : expvar.Var
T : fmt.Stringer
T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : context.stringer
T : runtime.stringer
As Outputs Of (at least 2, both are exported )
func NewSentinelClient (opt *Options ) *SentinelClient
func (*SentinelClient).WithContext (ctx context .Context ) *SentinelClient
type SliceCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []interface{}
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]interface{}, error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []interface{}
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 21, all are exported )
func NewSliceCmd (ctx context .Context , args ...interface{}) *SliceCmd
func NewSliceResult (val []interface{}, err error ) *SliceCmd
func Cmdable .ConfigGet (ctx context .Context , parameter string ) *SliceCmd
func Cmdable .HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
func Cmdable .MGet (ctx context .Context , keys ...string ) *SliceCmd
func Cmdable .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
func Pipeliner .ConfigGet (ctx context .Context , parameter string ) *SliceCmd
func Pipeliner .HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
func Pipeliner .MGet (ctx context .Context , keys ...string ) *SliceCmd
func Pipeliner .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
func (*SentinelClient ).Masters (ctx context .Context ) *SliceCmd
func (*SentinelClient ).Sentinels (ctx context .Context , name string ) *SliceCmd
func (*SentinelClient ).Slaves (ctx context .Context , name string ) *SliceCmd
func StatefulCmdable .ConfigGet (ctx context .Context , parameter string ) *SliceCmd
func StatefulCmdable .HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
func StatefulCmdable .MGet (ctx context .Context , keys ...string ) *SliceCmd
func StatefulCmdable .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
func UniversalClient .ConfigGet (ctx context .Context , parameter string ) *SliceCmd
func UniversalClient .HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
func UniversalClient .MGet (ctx context .Context , keys ...string ) *SliceCmd
func UniversalClient .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
type Sort (struct)
Fields (total 6, all are exported )
Alpha bool
By string
Count int64
Get []string
Offset int64
Order string
Methods (only one, which is unexported )
/* one unexported ... */ /* one unexported: */
(*T) args (key string ) []interface{}
As Inputs Of (at least 12, all are exported )
func Cmdable .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func Cmdable .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
func Cmdable .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
func Pipeliner .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func Pipeliner .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
func Pipeliner .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
func StatefulCmdable .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func StatefulCmdable .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
func StatefulCmdable .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
func UniversalClient .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func UniversalClient .SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
func UniversalClient .SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
type StatefulCmdable (interface)
Methods (total 247, all are exported )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) Auth (ctx context .Context , password string ) *StatusCmd
( T) AuthACL (ctx context .Context , username, password string ) *StatusCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientSetName (ctx context .Context , name string ) *BoolCmd
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
( T) Get (ctx context .Context , key string ) *StringCmd
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) MSet (ctx context .Context , values ...interface{}) *StatusCmd
( T) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
( T) Pipeline () Pipeliner
( T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRandMember (ctx context .Context , key string ) *StringCmd
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Select (ctx context .Context , index int ) *StatusCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
( T) TxPipeline () Pipeliner
( T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream string , start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream string , start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
Implemented By (at least 4, all are exported )
*Conn
*Pipeline
Pipeliner (interface)
*Tx
Implements (at least 3, in which 1 are exported )
T : Cmdable
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
type StatusCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val string
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (string , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () string
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 194, all are exported )
func NewStatusCmd (ctx context .Context , args ...interface{}) *StatusCmd
func NewStatusResult (val string , err error ) *StatusCmd
func Cmdable .BgRewriteAOF (ctx context .Context ) *StatusCmd
func Cmdable .BgSave (ctx context .Context ) *StatusCmd
func Cmdable .ClientKill (ctx context .Context , ipPort string ) *StatusCmd
func Cmdable .ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
func Cmdable .ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func Cmdable .ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
func Cmdable .ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func Cmdable .ClusterFailover (ctx context .Context ) *StatusCmd
func Cmdable .ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
func Cmdable .ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
func Cmdable .ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
func Cmdable .ClusterResetHard (ctx context .Context ) *StatusCmd
func Cmdable .ClusterResetSoft (ctx context .Context ) *StatusCmd
func Cmdable .ClusterSaveConfig (ctx context .Context ) *StatusCmd
func Cmdable .ConfigResetStat (ctx context .Context ) *StatusCmd
func Cmdable .ConfigRewrite (ctx context .Context ) *StatusCmd
func Cmdable .ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
func Cmdable .FlushAll (ctx context .Context ) *StatusCmd
func Cmdable .FlushAllAsync (ctx context .Context ) *StatusCmd
func Cmdable .FlushDB (ctx context .Context ) *StatusCmd
func Cmdable .FlushDBAsync (ctx context .Context ) *StatusCmd
func Cmdable .LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
func Cmdable .LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
func Cmdable .Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
func Cmdable .MSet (ctx context .Context , values ...interface{}) *StatusCmd
func Cmdable .PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
func Cmdable .Ping (ctx context .Context ) *StatusCmd
func Cmdable .Quit (ctx context .Context ) *StatusCmd
func Cmdable .ReadOnly (ctx context .Context ) *StatusCmd
func Cmdable .ReadWrite (ctx context .Context ) *StatusCmd
func Cmdable .Rename (ctx context .Context , key, newkey string ) *StatusCmd
func Cmdable .Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func Cmdable .RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func Cmdable .Save (ctx context .Context ) *StatusCmd
func Cmdable .ScriptFlush (ctx context .Context ) *StatusCmd
func Cmdable .ScriptKill (ctx context .Context ) *StatusCmd
func Cmdable .Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
func Cmdable .Shutdown (ctx context .Context ) *StatusCmd
func Cmdable .ShutdownNoSave (ctx context .Context ) *StatusCmd
func Cmdable .ShutdownSave (ctx context .Context ) *StatusCmd
func Cmdable .SlaveOf (ctx context .Context , host, port string ) *StatusCmd
func Cmdable .Type (ctx context .Context , key string ) *StatusCmd
func Cmdable .XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
func Cmdable .XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
func Cmdable .XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
func Pipeliner .Auth (ctx context .Context , password string ) *StatusCmd
func Pipeliner .AuthACL (ctx context .Context , username, password string ) *StatusCmd
func Pipeliner .BgRewriteAOF (ctx context .Context ) *StatusCmd
func Pipeliner .BgSave (ctx context .Context ) *StatusCmd
func Pipeliner .ClientKill (ctx context .Context , ipPort string ) *StatusCmd
func Pipeliner .ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
func Pipeliner .ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func Pipeliner .ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
func Pipeliner .ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func Pipeliner .ClusterFailover (ctx context .Context ) *StatusCmd
func Pipeliner .ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
func Pipeliner .ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
func Pipeliner .ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
func Pipeliner .ClusterResetHard (ctx context .Context ) *StatusCmd
func Pipeliner .ClusterResetSoft (ctx context .Context ) *StatusCmd
func Pipeliner .ClusterSaveConfig (ctx context .Context ) *StatusCmd
func Pipeliner .ConfigResetStat (ctx context .Context ) *StatusCmd
func Pipeliner .ConfigRewrite (ctx context .Context ) *StatusCmd
func Pipeliner .ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
func Pipeliner .FlushAll (ctx context .Context ) *StatusCmd
func Pipeliner .FlushAllAsync (ctx context .Context ) *StatusCmd
func Pipeliner .FlushDB (ctx context .Context ) *StatusCmd
func Pipeliner .FlushDBAsync (ctx context .Context ) *StatusCmd
func Pipeliner .LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
func Pipeliner .LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
func Pipeliner .Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
func Pipeliner .MSet (ctx context .Context , values ...interface{}) *StatusCmd
func Pipeliner .PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
func Pipeliner .Ping (ctx context .Context ) *StatusCmd
func Pipeliner .Quit (ctx context .Context ) *StatusCmd
func Pipeliner .ReadOnly (ctx context .Context ) *StatusCmd
func Pipeliner .ReadWrite (ctx context .Context ) *StatusCmd
func Pipeliner .Rename (ctx context .Context , key, newkey string ) *StatusCmd
func Pipeliner .Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func Pipeliner .RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func Pipeliner .Save (ctx context .Context ) *StatusCmd
func Pipeliner .ScriptFlush (ctx context .Context ) *StatusCmd
func Pipeliner .ScriptKill (ctx context .Context ) *StatusCmd
func Pipeliner .Select (ctx context .Context , index int ) *StatusCmd
func Pipeliner .Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
func Pipeliner .Shutdown (ctx context .Context ) *StatusCmd
func Pipeliner .ShutdownNoSave (ctx context .Context ) *StatusCmd
func Pipeliner .ShutdownSave (ctx context .Context ) *StatusCmd
func Pipeliner .SlaveOf (ctx context .Context , host, port string ) *StatusCmd
func Pipeliner .SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
func Pipeliner .Type (ctx context .Context , key string ) *StatusCmd
func Pipeliner .XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
func Pipeliner .XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
func Pipeliner .XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
func (*SentinelClient ).Failover (ctx context .Context , name string ) *StatusCmd
func (*SentinelClient ).FlushConfig (ctx context .Context ) *StatusCmd
func StatefulCmdable .Auth (ctx context .Context , password string ) *StatusCmd
func StatefulCmdable .AuthACL (ctx context .Context , username, password string ) *StatusCmd
func StatefulCmdable .BgRewriteAOF (ctx context .Context ) *StatusCmd
func StatefulCmdable .BgSave (ctx context .Context ) *StatusCmd
func StatefulCmdable .ClientKill (ctx context .Context , ipPort string ) *StatusCmd
func StatefulCmdable .ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
func StatefulCmdable .ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func StatefulCmdable .ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
func StatefulCmdable .ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func StatefulCmdable .ClusterFailover (ctx context .Context ) *StatusCmd
func StatefulCmdable .ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
func StatefulCmdable .ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
func StatefulCmdable .ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
func StatefulCmdable .ClusterResetHard (ctx context .Context ) *StatusCmd
func StatefulCmdable .ClusterResetSoft (ctx context .Context ) *StatusCmd
func StatefulCmdable .ClusterSaveConfig (ctx context .Context ) *StatusCmd
func StatefulCmdable .ConfigResetStat (ctx context .Context ) *StatusCmd
func StatefulCmdable .ConfigRewrite (ctx context .Context ) *StatusCmd
func StatefulCmdable .ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
func StatefulCmdable .FlushAll (ctx context .Context ) *StatusCmd
func StatefulCmdable .FlushAllAsync (ctx context .Context ) *StatusCmd
func StatefulCmdable .FlushDB (ctx context .Context ) *StatusCmd
func StatefulCmdable .FlushDBAsync (ctx context .Context ) *StatusCmd
func StatefulCmdable .LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
func StatefulCmdable .LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
func StatefulCmdable .Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
func StatefulCmdable .MSet (ctx context .Context , values ...interface{}) *StatusCmd
func StatefulCmdable .PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
func StatefulCmdable .Ping (ctx context .Context ) *StatusCmd
func StatefulCmdable .Quit (ctx context .Context ) *StatusCmd
func StatefulCmdable .ReadOnly (ctx context .Context ) *StatusCmd
func StatefulCmdable .ReadWrite (ctx context .Context ) *StatusCmd
func StatefulCmdable .Rename (ctx context .Context , key, newkey string ) *StatusCmd
func StatefulCmdable .Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func StatefulCmdable .RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func StatefulCmdable .Save (ctx context .Context ) *StatusCmd
func StatefulCmdable .ScriptFlush (ctx context .Context ) *StatusCmd
func StatefulCmdable .ScriptKill (ctx context .Context ) *StatusCmd
func StatefulCmdable .Select (ctx context .Context , index int ) *StatusCmd
func StatefulCmdable .Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
func StatefulCmdable .Shutdown (ctx context .Context ) *StatusCmd
func StatefulCmdable .ShutdownNoSave (ctx context .Context ) *StatusCmd
func StatefulCmdable .ShutdownSave (ctx context .Context ) *StatusCmd
func StatefulCmdable .SlaveOf (ctx context .Context , host, port string ) *StatusCmd
func StatefulCmdable .SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
func StatefulCmdable .Type (ctx context .Context , key string ) *StatusCmd
func StatefulCmdable .XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
func StatefulCmdable .XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
func StatefulCmdable .XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
func (*Tx ).Unwatch (ctx context .Context , keys ...string ) *StatusCmd
func (*Tx ).Watch (ctx context .Context , keys ...string ) *StatusCmd
func UniversalClient .BgRewriteAOF (ctx context .Context ) *StatusCmd
func UniversalClient .BgSave (ctx context .Context ) *StatusCmd
func UniversalClient .ClientKill (ctx context .Context , ipPort string ) *StatusCmd
func UniversalClient .ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
func UniversalClient .ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func UniversalClient .ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
func UniversalClient .ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
func UniversalClient .ClusterFailover (ctx context .Context ) *StatusCmd
func UniversalClient .ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
func UniversalClient .ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
func UniversalClient .ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
func UniversalClient .ClusterResetHard (ctx context .Context ) *StatusCmd
func UniversalClient .ClusterResetSoft (ctx context .Context ) *StatusCmd
func UniversalClient .ClusterSaveConfig (ctx context .Context ) *StatusCmd
func UniversalClient .ConfigResetStat (ctx context .Context ) *StatusCmd
func UniversalClient .ConfigRewrite (ctx context .Context ) *StatusCmd
func UniversalClient .ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
func UniversalClient .FlushAll (ctx context .Context ) *StatusCmd
func UniversalClient .FlushAllAsync (ctx context .Context ) *StatusCmd
func UniversalClient .FlushDB (ctx context .Context ) *StatusCmd
func UniversalClient .FlushDBAsync (ctx context .Context ) *StatusCmd
func UniversalClient .LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
func UniversalClient .LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
func UniversalClient .Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
func UniversalClient .MSet (ctx context .Context , values ...interface{}) *StatusCmd
func UniversalClient .PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
func UniversalClient .Ping (ctx context .Context ) *StatusCmd
func UniversalClient .Quit (ctx context .Context ) *StatusCmd
func UniversalClient .ReadOnly (ctx context .Context ) *StatusCmd
func UniversalClient .ReadWrite (ctx context .Context ) *StatusCmd
func UniversalClient .Rename (ctx context .Context , key, newkey string ) *StatusCmd
func UniversalClient .Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func UniversalClient .RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
func UniversalClient .Save (ctx context .Context ) *StatusCmd
func UniversalClient .ScriptFlush (ctx context .Context ) *StatusCmd
func UniversalClient .ScriptKill (ctx context .Context ) *StatusCmd
func UniversalClient .Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
func UniversalClient .Shutdown (ctx context .Context ) *StatusCmd
func UniversalClient .ShutdownNoSave (ctx context .Context ) *StatusCmd
func UniversalClient .ShutdownSave (ctx context .Context ) *StatusCmd
func UniversalClient .SlaveOf (ctx context .Context , host, port string ) *StatusCmd
func UniversalClient .Type (ctx context .Context , key string ) *StatusCmd
func UniversalClient .XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
func UniversalClient .XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
func UniversalClient .XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
As Inputs Of (at least 2, neither is exported )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func txPipelineReadQueued (rd *proto .Reader , statusCmd *StatusCmd , cmds []Cmder ) error
func (*ClusterClient ).txPipelineReadQueued (ctx context .Context , rd *proto .Reader , statusCmd *StatusCmd , cmds []Cmder , failedCmds *cmdsMap ) error
type StringCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val string
Methods (total 20, in which 16 are exported )
(*T) Args () []interface{}
(*T) Bytes () ([]byte , error )
(*T) Err () error
(*T) Float32 () (float32 , error )
(*T) Float64 () (float64 , error )
(*T) FullName () string
(*T) Int () (int , error )
(*T) Int64 () (int64 , error )
(*T) Name () string
(*T) Result () (string , error )
(*T) Scan (val interface{}) error
(*T) SetErr (e error )
(*T) String () string
(*T) Time () (time .Time , error )
(*T) Uint64 () (uint64 , error )
(*T) Val () string
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 8, in which 5 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : database/sql.Scanner
*T : expvar.Var
*T : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*T : context.stringer
*T : gopkg.in/yaml.v2.jsonNumber
*T : runtime.stringer
As Outputs Of (at least 100, all are exported )
func NewStringCmd (ctx context .Context , args ...interface{}) *StringCmd
func NewStringResult (val string , err error ) *StringCmd
func Cmdable .BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
func Cmdable .ClientGetName (ctx context .Context ) *StringCmd
func Cmdable .ClientList (ctx context .Context ) *StringCmd
func Cmdable .ClusterInfo (ctx context .Context ) *StringCmd
func Cmdable .ClusterNodes (ctx context .Context ) *StringCmd
func Cmdable .DebugObject (ctx context .Context , key string ) *StringCmd
func Cmdable .Dump (ctx context .Context , key string ) *StringCmd
func Cmdable .Echo (ctx context .Context , message interface{}) *StringCmd
func Cmdable .Get (ctx context .Context , key string ) *StringCmd
func Cmdable .GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
func Cmdable .GetSet (ctx context .Context , key string , value interface{}) *StringCmd
func Cmdable .HGet (ctx context .Context , key, field string ) *StringCmd
func Cmdable .Info (ctx context .Context , section ...string ) *StringCmd
func Cmdable .LIndex (ctx context .Context , key string , index int64 ) *StringCmd
func Cmdable .LPop (ctx context .Context , key string ) *StringCmd
func Cmdable .ObjectEncoding (ctx context .Context , key string ) *StringCmd
func Cmdable .RandomKey (ctx context .Context ) *StringCmd
func Cmdable .RPop (ctx context .Context , key string ) *StringCmd
func Cmdable .RPopLPush (ctx context .Context , source, destination string ) *StringCmd
func Cmdable .ScriptLoad (ctx context .Context , script string ) *StringCmd
func Cmdable .SPop (ctx context .Context , key string ) *StringCmd
func Cmdable .SRandMember (ctx context .Context , key string ) *StringCmd
func Cmdable .XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
func Pipeliner .BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
func Pipeliner .ClientGetName (ctx context .Context ) *StringCmd
func Pipeliner .ClientList (ctx context .Context ) *StringCmd
func Pipeliner .ClusterInfo (ctx context .Context ) *StringCmd
func Pipeliner .ClusterNodes (ctx context .Context ) *StringCmd
func Pipeliner .DebugObject (ctx context .Context , key string ) *StringCmd
func Pipeliner .Dump (ctx context .Context , key string ) *StringCmd
func Pipeliner .Echo (ctx context .Context , message interface{}) *StringCmd
func Pipeliner .Get (ctx context .Context , key string ) *StringCmd
func Pipeliner .GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
func Pipeliner .GetSet (ctx context .Context , key string , value interface{}) *StringCmd
func Pipeliner .HGet (ctx context .Context , key, field string ) *StringCmd
func Pipeliner .Info (ctx context .Context , section ...string ) *StringCmd
func Pipeliner .LIndex (ctx context .Context , key string , index int64 ) *StringCmd
func Pipeliner .LPop (ctx context .Context , key string ) *StringCmd
func Pipeliner .ObjectEncoding (ctx context .Context , key string ) *StringCmd
func Pipeliner .RandomKey (ctx context .Context ) *StringCmd
func Pipeliner .RPop (ctx context .Context , key string ) *StringCmd
func Pipeliner .RPopLPush (ctx context .Context , source, destination string ) *StringCmd
func Pipeliner .ScriptLoad (ctx context .Context , script string ) *StringCmd
func Pipeliner .SPop (ctx context .Context , key string ) *StringCmd
func Pipeliner .SRandMember (ctx context .Context , key string ) *StringCmd
func Pipeliner .XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
func (*Script ).Load (ctx context .Context , c scripter ) *StringCmd
func (*SentinelClient ).CkQuorum (ctx context .Context , name string ) *StringCmd
func (*SentinelClient ).Monitor (ctx context .Context , name, ip, port, quorum string ) *StringCmd
func (*SentinelClient ).Ping (ctx context .Context ) *StringCmd
func (*SentinelClient ).Remove (ctx context .Context , name string ) *StringCmd
func (*SentinelClient ).Set (ctx context .Context , name, option, value string ) *StringCmd
func StatefulCmdable .BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
func StatefulCmdable .ClientGetName (ctx context .Context ) *StringCmd
func StatefulCmdable .ClientList (ctx context .Context ) *StringCmd
func StatefulCmdable .ClusterInfo (ctx context .Context ) *StringCmd
func StatefulCmdable .ClusterNodes (ctx context .Context ) *StringCmd
func StatefulCmdable .DebugObject (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .Dump (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .Echo (ctx context .Context , message interface{}) *StringCmd
func StatefulCmdable .Get (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
func StatefulCmdable .GetSet (ctx context .Context , key string , value interface{}) *StringCmd
func StatefulCmdable .HGet (ctx context .Context , key, field string ) *StringCmd
func StatefulCmdable .Info (ctx context .Context , section ...string ) *StringCmd
func StatefulCmdable .LIndex (ctx context .Context , key string , index int64 ) *StringCmd
func StatefulCmdable .LPop (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .ObjectEncoding (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .RandomKey (ctx context .Context ) *StringCmd
func StatefulCmdable .RPop (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .RPopLPush (ctx context .Context , source, destination string ) *StringCmd
func StatefulCmdable .ScriptLoad (ctx context .Context , script string ) *StringCmd
func StatefulCmdable .SPop (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .SRandMember (ctx context .Context , key string ) *StringCmd
func StatefulCmdable .XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
func UniversalClient .BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
func UniversalClient .ClientGetName (ctx context .Context ) *StringCmd
func UniversalClient .ClientList (ctx context .Context ) *StringCmd
func UniversalClient .ClusterInfo (ctx context .Context ) *StringCmd
func UniversalClient .ClusterNodes (ctx context .Context ) *StringCmd
func UniversalClient .DebugObject (ctx context .Context , key string ) *StringCmd
func UniversalClient .Dump (ctx context .Context , key string ) *StringCmd
func UniversalClient .Echo (ctx context .Context , message interface{}) *StringCmd
func UniversalClient .Get (ctx context .Context , key string ) *StringCmd
func UniversalClient .GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
func UniversalClient .GetSet (ctx context .Context , key string , value interface{}) *StringCmd
func UniversalClient .HGet (ctx context .Context , key, field string ) *StringCmd
func UniversalClient .Info (ctx context .Context , section ...string ) *StringCmd
func UniversalClient .LIndex (ctx context .Context , key string , index int64 ) *StringCmd
func UniversalClient .LPop (ctx context .Context , key string ) *StringCmd
func UniversalClient .ObjectEncoding (ctx context .Context , key string ) *StringCmd
func UniversalClient .RandomKey (ctx context .Context ) *StringCmd
func UniversalClient .RPop (ctx context .Context , key string ) *StringCmd
func UniversalClient .RPopLPush (ctx context .Context , source, destination string ) *StringCmd
func UniversalClient .ScriptLoad (ctx context .Context , script string ) *StringCmd
func UniversalClient .SPop (ctx context .Context , key string ) *StringCmd
func UniversalClient .SRandMember (ctx context .Context , key string ) *StringCmd
func UniversalClient .XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
type StringIntMapCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val map[string ]int64
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (map[string ]int64 , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () map[string ]int64
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 6, all are exported )
func NewStringIntMapCmd (ctx context .Context , args ...interface{}) *StringIntMapCmd
func NewStringIntMapCmdResult (val map[string ]int64 , err error ) *StringIntMapCmd
func Cmdable .PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
func Pipeliner .PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
func StatefulCmdable .PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
func UniversalClient .PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
type StringSliceCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []string
Methods (total 13, in which 9 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]string , error )
(*T) ScanSlice (container interface{}) error
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []string
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 99, all are exported )
func NewStringSliceCmd (ctx context .Context , args ...interface{}) *StringSliceCmd
func NewStringSliceResult (val []string , err error ) *StringSliceCmd
func Cmdable .BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func Cmdable .BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func Cmdable .ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
func Cmdable .ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
func Cmdable .GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
func Cmdable .HKeys (ctx context .Context , key string ) *StringSliceCmd
func Cmdable .HVals (ctx context .Context , key string ) *StringSliceCmd
func Cmdable .Keys (ctx context .Context , pattern string ) *StringSliceCmd
func Cmdable .LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func Cmdable .PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
func Cmdable .SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
func Cmdable .SInter (ctx context .Context , keys ...string ) *StringSliceCmd
func Cmdable .SMembers (ctx context .Context , key string ) *StringSliceCmd
func Cmdable .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func Cmdable .SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func Cmdable .SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func Cmdable .SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
func Cmdable .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
func Cmdable .ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func Cmdable .ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func Cmdable .ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func Cmdable .ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func Cmdable .ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func Cmdable .ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func Pipeliner .BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func Pipeliner .BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func Pipeliner .ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
func Pipeliner .ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
func Pipeliner .GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
func Pipeliner .HKeys (ctx context .Context , key string ) *StringSliceCmd
func Pipeliner .HVals (ctx context .Context , key string ) *StringSliceCmd
func Pipeliner .Keys (ctx context .Context , pattern string ) *StringSliceCmd
func Pipeliner .LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func Pipeliner .PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
func Pipeliner .SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
func Pipeliner .SInter (ctx context .Context , keys ...string ) *StringSliceCmd
func Pipeliner .SMembers (ctx context .Context , key string ) *StringSliceCmd
func Pipeliner .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func Pipeliner .SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func Pipeliner .SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func Pipeliner .SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
func Pipeliner .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
func Pipeliner .ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func Pipeliner .ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func Pipeliner .ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func Pipeliner .ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func Pipeliner .ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func Pipeliner .ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func (*SentinelClient ).GetMasterAddrByName (ctx context .Context , name string ) *StringSliceCmd
func StatefulCmdable .BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func StatefulCmdable .BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func StatefulCmdable .ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
func StatefulCmdable .ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
func StatefulCmdable .GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
func StatefulCmdable .HKeys (ctx context .Context , key string ) *StringSliceCmd
func StatefulCmdable .HVals (ctx context .Context , key string ) *StringSliceCmd
func StatefulCmdable .Keys (ctx context .Context , pattern string ) *StringSliceCmd
func StatefulCmdable .LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func StatefulCmdable .PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
func StatefulCmdable .SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
func StatefulCmdable .SInter (ctx context .Context , keys ...string ) *StringSliceCmd
func StatefulCmdable .SMembers (ctx context .Context , key string ) *StringSliceCmd
func StatefulCmdable .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func StatefulCmdable .SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func StatefulCmdable .SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func StatefulCmdable .SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
func StatefulCmdable .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
func StatefulCmdable .ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func StatefulCmdable .ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func StatefulCmdable .ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func StatefulCmdable .ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func StatefulCmdable .ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func StatefulCmdable .ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func UniversalClient .BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func UniversalClient .BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
func UniversalClient .ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
func UniversalClient .ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
func UniversalClient .GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
func UniversalClient .HKeys (ctx context .Context , key string ) *StringSliceCmd
func UniversalClient .HVals (ctx context .Context , key string ) *StringSliceCmd
func UniversalClient .Keys (ctx context .Context , pattern string ) *StringSliceCmd
func UniversalClient .LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func UniversalClient .PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
func UniversalClient .SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
func UniversalClient .SInter (ctx context .Context , keys ...string ) *StringSliceCmd
func UniversalClient .SMembers (ctx context .Context , key string ) *StringSliceCmd
func UniversalClient .Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
func UniversalClient .SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func UniversalClient .SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
func UniversalClient .SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
func UniversalClient .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
func UniversalClient .ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func UniversalClient .ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func UniversalClient .ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func UniversalClient .ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
func UniversalClient .ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
func UniversalClient .ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
type StringStringMapCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val map[string ]string
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (map[string ]string , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () map[string ]string
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 7, all are exported )
func NewStringStringMapCmd (ctx context .Context , args ...interface{}) *StringStringMapCmd
func NewStringStringMapResult (val map[string ]string , err error ) *StringStringMapCmd
func Cmdable .HGetAll (ctx context .Context , key string ) *StringStringMapCmd
func Pipeliner .HGetAll (ctx context .Context , key string ) *StringStringMapCmd
func (*SentinelClient ).Master (ctx context .Context , name string ) *StringStringMapCmd
func StatefulCmdable .HGetAll (ctx context .Context , key string ) *StringStringMapCmd
func UniversalClient .HGetAll (ctx context .Context , key string ) *StringStringMapCmd
type StringStructMapCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val map[string ]struct{}
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (map[string ]struct{}, error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () map[string ]struct{}
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 5, all are exported )
func NewStringStructMapCmd (ctx context .Context , args ...interface{}) *StringStructMapCmd
func Cmdable .SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
func Pipeliner .SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
func StatefulCmdable .SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
func UniversalClient .SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
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 it is better to use Pipeline.
Fields (total 8, none are exported )
/* 8 unexporteds ... */ /* 8 unexporteds: */
baseClient baseClient
baseClient .connPool pool .Pooler
baseClient .onClose func() error
// hook called when client is closed
baseClient .opt *Options
cmdable cmdable
ctx context .Context
hooks hooks
statefulCmdable statefulCmdable
Methods (total 284, in which 260 are exported )
(*T) AddHook (hook Hook )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) Auth (ctx context .Context , password string ) *StatusCmd
( T) AuthACL (ctx context .Context , username, password string ) *StatusCmd
Perform an AUTH command, using the given user and pass.
Should be used to authenticate the current connection with one of the connections defined in the ACL list
when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientSetName (ctx context .Context , name string ) *BoolCmd
ClientSetName assigns a name to the connection.
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
(*T) Close (ctx context .Context ) error
Close closes the transaction, releasing any open resources.
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
(*T) Context () context .Context
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
(*T) Pipeline () Pipeliner
Pipeline creates a pipeline. Usually it is more convenient to use Pipelined.
(*T) 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.
(*T) Process (ctx context .Context , cmd Cmder ) error
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Select (ctx context .Context , index int ) *StatusCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
(*T) String () string
( T) SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
(*T) TxPipeline () Pipeliner
TxPipeline creates a pipeline. Usually it is more convenient to use TxPipelined.
(*T) 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.
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
(*T) Unwatch (ctx context .Context , keys ...string ) *StatusCmd
Unwatch flushes all the previously watched keys for a transaction.
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
(*T) Watch (ctx context .Context , keys ...string ) *StatusCmd
Watch marks the keys to be watched for conditional execution
of a transaction.
(*T) WithContext (ctx context .Context ) *Tx
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 24 unexporteds ... */ /* 24 unexporteds: */
(*T) _generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
(*T) _getConn (ctx context .Context ) (*pool .Conn , error )
(*T) _process (ctx context .Context , cmd Cmder ) error
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
(*T) cmdTimeout (cmd Cmder ) time .Duration
(*T) generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
(*T) getAddr () string
(*T) getConn (ctx context .Context ) (*pool .Conn , error )
(*T) init ()
(*T) initConn (ctx context .Context , cn *pool .Conn ) error
(*T) lock ()
(*T) newConn (ctx context .Context ) (*pool .Conn , error )
(*T) pipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
(*T) releaseConn (ctx context .Context , cn *pool .Conn , err error )
(*T) retryBackoff (attempt int ) time .Duration
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
(*T) txPipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
(*T) withConn (ctx context .Context , fn func(context .Context , *pool .Conn ) error ) error
(*T) withTimeout (timeout time .Duration ) *baseClient
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 8, in which 4 are exported )
*T : Cmdable
*T : StatefulCmdable
*T : expvar.Var
*T : fmt.Stringer
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 2, in which 1 are exported )
func (*Tx).WithContext (ctx context .Context ) *Tx
/* at least one unexported ... */ /* at least one unexported: */
func (*Client ).newTx (ctx context .Context ) *Tx
type UniversalClient (interface)
UniversalClient is an abstract client which - based on the provided options -
can connect to either clusters, or sentinel-backed failover instances
or simple single-instance servers. This can be useful for testing
cluster-specific applications locally.
Methods (total 250, all are exported )
( T) AddHook (Hook )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) Close () error
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) Context () context .Context
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Do (ctx context .Context , args ...interface{}) *Cmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
( T) Get (ctx context .Context , key string ) *StringCmd
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) HMGet (ctx context .Context , key string , fields ...string ) *SliceCmd
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) HSet (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) MSet (ctx context .Context , values ...interface{}) *StatusCmd
( T) MSetNX (ctx context .Context , values ...interface{}) *BoolCmd
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PSubscribe (ctx context .Context , channels ...string ) *PubSub
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
( T) Pipeline () Pipeliner
( T) Pipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Process (ctx context .Context , cmd Cmder ) error
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRandMember (ctx context .Context , key string ) *StringCmd
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) Subscribe (ctx context .Context , channels ...string ) *PubSub
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
( T) TxPipeline () Pipeliner
( T) TxPipelined (ctx context .Context , fn func(Pipeliner ) error ) ([]Cmder , error )
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Watch (ctx context .Context , fn func(*Tx ) error , keys ...string ) error
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream string , start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream string , start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
Implemented By (at least 3, all are exported )
*Client
*ClusterClient
*Ring
Implements (at least 4, in which 2 are exported )
T : Cmdable
T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
As Outputs Of (at least one exported )
func NewUniversalClient (opts *UniversalOptions ) UniversalClient
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.
Fields (total 5, all are exported )
ID string
MaxLen int64
// MAXLEN N
MaxLenApprox int64
// MAXLEN ~ N
Stream string
Values interface{}
As Inputs Of (at least 4, all are exported )
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 XClaimArgs (struct)
Fields (total 5, all are exported )
Consumer string
Group string
Messages []string
MinIdle time .Duration
Stream string
As Inputs Of (at least 9, in which 8 are exported )
func Cmdable .XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
func Cmdable .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
func Pipeliner .XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
func Pipeliner .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
func StatefulCmdable .XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
func StatefulCmdable .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
func UniversalClient .XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
func UniversalClient .XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
/* at least one unexported ... */ /* at least one unexported: */
func xClaimArgs (a *XClaimArgs ) []interface{}
type XInfoGroupsCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []XInfoGroups
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]XInfoGroups , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []XInfoGroups
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 5, all are exported )
func NewXInfoGroupsCmd (ctx context .Context , stream string ) *XInfoGroupsCmd
func Cmdable .XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
func Pipeliner .XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
func StatefulCmdable .XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
func UniversalClient .XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
type XMessageSliceCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []XMessage
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]XMessage , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []XMessage
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 22, all are exported )
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)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val *XPending
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (*XPending , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () *XPending
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 5, all are exported )
func NewXPendingCmd (ctx context .Context , args ...interface{}) *XPendingCmd
func Cmdable .XPending (ctx context .Context , stream, group string ) *XPendingCmd
func Pipeliner .XPending (ctx context .Context , stream, group string ) *XPendingCmd
func StatefulCmdable .XPending (ctx context .Context , stream, group string ) *XPendingCmd
func UniversalClient .XPending (ctx context .Context , stream, group string ) *XPendingCmd
type XPendingExtCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []XPendingExt
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]XPendingExt , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []XPendingExt
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 5, all are exported )
func NewXPendingExtCmd (ctx context .Context , args ...interface{}) *XPendingExtCmd
func Cmdable .XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
func Pipeliner .XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
func StatefulCmdable .XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
func UniversalClient .XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
type XStreamSliceCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []XStream
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]XStream , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []XStream
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 14, all are exported )
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, both are exported )
Member interface{}
Score float64
As Outputs Of (at least 2, both are exported )
func (*ZSliceCmd ).Result () ([]Z , error )
func (*ZSliceCmd ).Val () []Z
As Inputs Of (at least 37, all are exported )
func NewZSliceCmdResult (val []Z , err error ) *ZSliceCmd
func Cmdable .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Cmdable .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func Cmdable .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func Cmdable .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
func Pipeliner .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func Pipeliner .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func Pipeliner .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func Pipeliner .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
func StatefulCmdable .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func StatefulCmdable .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func StatefulCmdable .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func StatefulCmdable .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
func UniversalClient .ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
func UniversalClient .ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
func UniversalClient .ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
func UniversalClient .ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
type ZRangeBy (struct)
Fields (total 4, all are exported )
Count int64
Max string
Min string
Offset int64
As Inputs Of (at least 24, all are exported )
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)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val []Z
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () ([]Z , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () []Z
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 26, all are exported )
func NewZSliceCmd (ctx context .Context , args ...interface{}) *ZSliceCmd
func NewZSliceCmdResult (val []Z , err error ) *ZSliceCmd
func Cmdable .ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func Cmdable .ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func Cmdable .ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func Cmdable .ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
func Cmdable .ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func Cmdable .ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
func Pipeliner .ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func Pipeliner .ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func Pipeliner .ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func Pipeliner .ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
func Pipeliner .ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func Pipeliner .ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
func StatefulCmdable .ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func StatefulCmdable .ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func StatefulCmdable .ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func StatefulCmdable .ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
func StatefulCmdable .ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func StatefulCmdable .ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
func UniversalClient .ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func UniversalClient .ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
func UniversalClient .ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func UniversalClient .ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
func UniversalClient .ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
func UniversalClient .ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
type ZStore (struct)
ZStore is used as an arg to ZInterStore and ZUnionStore.
Fields (total 3, all are exported )
Aggregate string
Can be SUM, MIN or MAX.
Keys []string
Weights []float64
As Inputs Of (at least 8, all are exported )
func Cmdable .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func Cmdable .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
func Pipeliner .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func Pipeliner .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
func StatefulCmdable .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func StatefulCmdable .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
func UniversalClient .ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
func UniversalClient .ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
type ZWithKeyCmd (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseCmd baseCmd
baseCmd ._readTimeout *time .Duration
baseCmd .args []interface{}
baseCmd .ctx context .Context
baseCmd .err error
val *ZWithKey
Methods (total 12, in which 8 are exported )
(*T) Args () []interface{}
(*T) Err () error
(*T) FullName () string
(*T) Name () string
(*T) Result () (*ZWithKey , error )
(*T) SetErr (e error )
(*T) String () string
(*T) Val () *ZWithKey
/* 4 unexporteds ... */ /* 4 unexporteds: */
(*T) readReply (rd *proto .Reader ) error
(*T) readTimeout () *time .Duration
(*T) setReadTimeout (d time .Duration )
(*T) stringArg (pos int ) string
Implements (at least 6, in which 4 are exported )
*T : Cmder
*T : github.com/go-git/go-git/v5/plumbing/transport.AuthMethod
*T : expvar.Var
*T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 10, all are exported )
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
/* 24 unexporteds ... */ /* 24 unexporteds: */ type baseClient (struct)
Fields (total 3, none are exported )
/* 3 unexporteds ... */ /* 3 unexporteds: */
connPool pool .Pooler
onClose func() error
// hook called when client is closed
opt *Options
Methods (total 21, in which 2 are exported )
(*T) 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.
(*T) String () string
/* 19 unexporteds ... */ /* 19 unexporteds: */
(*T) _generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
(*T) _getConn (ctx context .Context ) (*pool .Conn , error )
(*T) _process (ctx context .Context , cmd Cmder ) error
(*T) clone () *baseClient
(*T) cmdTimeout (cmd Cmder ) time .Duration
(*T) generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
(*T) getAddr () string
(*T) getConn (ctx context .Context ) (*pool .Conn , error )
(*T) initConn (ctx context .Context , cn *pool .Conn ) error
(*T) newConn (ctx context .Context ) (*pool .Conn , error )
(*T) pipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
(*T) process (ctx context .Context , cmd Cmder ) error
(*T) processPipeline (ctx context .Context , cmds []Cmder ) error
(*T) processTxPipeline (ctx context .Context , cmds []Cmder ) error
(*T) releaseConn (ctx context .Context , cn *pool .Conn , err error )
(*T) retryBackoff (attempt int ) time .Duration
(*T) txPipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
(*T) withConn (ctx context .Context , fn func(context .Context , *pool .Conn ) error ) error
(*T) withTimeout (timeout time .Duration ) *baseClient
Implements (at least 5, in which 3 are exported )
*T : expvar.Var
*T : fmt.Stringer
*T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newBaseClient (opt *Options , connPool pool .Pooler ) *baseClient
type clusterNode (struct)
Fields (total 4, in which 1 are exported )
Client *Client
/* 3 unexporteds ... */ /* 3 unexporteds: */
failing uint32
// atomic
generation uint32
// atomic
latency uint32
// atomic
Methods (total 8, in which 7 are exported )
(*T) Close () error
(*T) Failing () bool
(*T) Generation () uint32
(*T) Latency () time .Duration
(*T) MarkAsFailing ()
(*T) SetGeneration (gen uint32 )
(*T) String () string
/* one unexported ... */ /* one unexported: */
(*T) updateLatency ()
Implements (at least 5, in which 3 are exported )
*T : expvar.Var
*T : fmt.Stringer
*T : io.Closer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
*T : context.stringer
*T : runtime.stringer
As Outputs Of (at least 4, none are exported )
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
func appendUniqueNode (nodes []*clusterNode , node *clusterNode ) []*clusterNode
func newClusterNode (clOpt *ClusterOptions , addr string ) *clusterNode
func (*ClusterClient ).cmdNode (ctx context .Context , cmdInfo *CommandInfo , slot int ) (*clusterNode , error )
func (*ClusterClient ).slotMasterNode (ctx context .Context , slot int ) (*clusterNode , error )
As Inputs Of (at least 5, none are exported )
/* 5+ unexporteds ... */ /* 5+ unexporteds: */
func appendUniqueNode (nodes []*clusterNode , node *clusterNode ) []*clusterNode
func appendUniqueNode (nodes []*clusterNode , node *clusterNode ) []*clusterNode
func (*ClusterClient )._processPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient )._processTxPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient ).pipelineReadCmds (ctx context .Context , node *clusterNode , rd *proto .Reader , cmds []Cmder , failedCmds *cmdsMap ) error
type clusterNodes (struct)
Fields (total 7, none are exported )
/* 7 unexporteds ... */ /* 7 unexporteds: */
_generation uint32
// atomic
activeAddrs []string
addrs []string
closed bool
mu sync .RWMutex
nodes map[string ]*clusterNode
opt *ClusterOptions
Methods (total 8, in which 7 are exported )
(*T) Addrs () ([]string , error )
(*T) All () ([]*clusterNode , error )
(*T) Close () error
(*T) GC (generation uint32 )
GC removes unused nodes.
(*T) Get (addr string ) (*clusterNode , error )
(*T) NextGeneration () uint32
(*T) Random () (*clusterNode , error )
/* one unexported ... */ /* one unexported: */
(*T) get (addr string ) (*clusterNode , error )
Implements (at least one exported )
*T : io.Closer
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newClusterNodes (opt *ClusterOptions ) *clusterNodes
As Inputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newClusterState (nodes *clusterNodes , slots []ClusterSlot , origin string ) (*clusterState , error )
type clusterState (struct)
Fields (total 6, in which 2 are exported )
Masters []*clusterNode
Slaves []*clusterNode
/* 4 unexporteds ... */ /* 4 unexporteds: */
createdAt time .Time
generation uint32
nodes *clusterNodes
slots []*clusterSlot
Methods (total 5, none are exported )
/* 5 unexporteds ... */ /* 5 unexporteds: */
(*T) slotClosestNode (slot int ) (*clusterNode , error )
(*T) slotMasterNode (slot int ) (*clusterNode , error )
(*T) slotNodes (slot int ) []*clusterNode
(*T) slotRandomNode (slot int ) (*clusterNode , error )
(*T) slotSlaveNode (slot int ) (*clusterNode , error )
As Outputs Of (at least 2, neither is exported )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func newClusterState (nodes *clusterNodes , slots []ClusterSlot , origin string ) (*clusterState , error )
func (*ClusterClient ).loadState (ctx context .Context ) (*clusterState , error )
type cmdable (func)
Methods (total 250, in which 243 are exported )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 7 unexporteds ... */ /* 7 unexporteds: */
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 2, neither is exported )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
As Inputs Of (at least one exported )
func NewScanCmd (ctx context .Context , process cmdable , args ...interface{}) *ScanCmd
type cmdsMap (struct)
Fields (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
m map[*clusterNode ][]Cmder
mu sync .Mutex
Methods (only one, which is exported )
(*T) Add (node *clusterNode , cmds ...Cmder )
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newCmdsMap () *cmdsMap
As Inputs Of (at least 7, none are exported )
/* 7+ unexporteds ... */ /* 7+ unexporteds: */
func (*ClusterClient )._processPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient )._processTxPipelineNode (ctx context .Context , node *clusterNode , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient ).checkMovedErr (ctx context .Context , cmd Cmder , err error , failedCmds *cmdsMap ) bool
func (*ClusterClient ).cmdsMoved (ctx context .Context , cmds []Cmder , moved, ask bool , addr string , failedCmds *cmdsMap ) error
func (*ClusterClient ).mapCmdsByNode (ctx context .Context , cmdsMap *cmdsMap , cmds []Cmder ) error
func (*ClusterClient ).pipelineReadCmds (ctx context .Context , node *clusterNode , rd *proto .Reader , cmds []Cmder , failedCmds *cmdsMap ) error
func (*ClusterClient ).txPipelineReadQueued (ctx context .Context , rd *proto .Reader , statusCmd *StatusCmd , cmds []Cmder , failedCmds *cmdsMap ) error
type conn (struct)
Fields (total 6, none are exported )
/* 6 unexporteds ... */ /* 6 unexporteds: */
baseClient baseClient
baseClient .connPool pool .Pooler
baseClient .onClose func() error
// hook called when client is closed
baseClient .opt *Options
cmdable cmdable
statefulCmdable statefulCmdable
Methods (total 276, in which 250 are exported )
( T) Append (ctx context .Context , key, value string ) *IntCmd
( T) Auth (ctx context .Context , password string ) *StatusCmd
( T) AuthACL (ctx context .Context , username, password string ) *StatusCmd
Perform an AUTH command, using the given user and pass.
Should be used to authenticate the current connection with one of the connections defined in the ACL list
when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
( T) BLPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPop (ctx context .Context , timeout time .Duration , keys ...string ) *StringSliceCmd
( T) BRPopLPush (ctx context .Context , source, destination string , timeout time .Duration ) *StringCmd
( T) BZPopMax (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMAX key [key ...] timeout` command.
( T) BZPopMin (ctx context .Context , timeout time .Duration , keys ...string ) *ZWithKeyCmd
Redis `BZPOPMIN key [key ...] timeout` command.
( T) BgRewriteAOF (ctx context .Context ) *StatusCmd
( T) BgSave (ctx context .Context ) *StatusCmd
( T) BitCount (ctx context .Context , key string , bitCount *BitCount ) *IntCmd
( T) BitField (ctx context .Context , key string , args ...interface{}) *IntSliceCmd
( T) BitOpAnd (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpNot (ctx context .Context , destKey string , key string ) *IntCmd
( T) BitOpOr (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitOpXor (ctx context .Context , destKey string , keys ...string ) *IntCmd
( T) BitPos (ctx context .Context , key string , bit int64 , pos ...int64 ) *IntCmd
( T) ClientGetName (ctx context .Context ) *StringCmd
ClientGetName returns the name of the connection.
( T) ClientID (ctx context .Context ) *IntCmd
( T) ClientKill (ctx context .Context , ipPort string ) *StatusCmd
( T) ClientKillByFilter (ctx context .Context , keys ...string ) *IntCmd
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
( T) ClientList (ctx context .Context ) *StringCmd
( T) ClientPause (ctx context .Context , dur time .Duration ) *BoolCmd
( T) ClientSetName (ctx context .Context , name string ) *BoolCmd
ClientSetName assigns a name to the connection.
( T) ClientUnblock (ctx context .Context , id int64 ) *IntCmd
( T) ClientUnblockWithError (ctx context .Context , id int64 ) *IntCmd
(*T) 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.
( T) ClusterAddSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterAddSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterCountFailureReports (ctx context .Context , nodeID string ) *IntCmd
( T) ClusterCountKeysInSlot (ctx context .Context , slot int ) *IntCmd
( T) ClusterDelSlots (ctx context .Context , slots ...int ) *StatusCmd
( T) ClusterDelSlotsRange (ctx context .Context , min, max int ) *StatusCmd
( T) ClusterFailover (ctx context .Context ) *StatusCmd
( T) ClusterForget (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterGetKeysInSlot (ctx context .Context , slot int , count int ) *StringSliceCmd
( T) ClusterInfo (ctx context .Context ) *StringCmd
( T) ClusterKeySlot (ctx context .Context , key string ) *IntCmd
( T) ClusterMeet (ctx context .Context , host, port string ) *StatusCmd
( T) ClusterNodes (ctx context .Context ) *StringCmd
( T) ClusterReplicate (ctx context .Context , nodeID string ) *StatusCmd
( T) ClusterResetHard (ctx context .Context ) *StatusCmd
( T) ClusterResetSoft (ctx context .Context ) *StatusCmd
( T) ClusterSaveConfig (ctx context .Context ) *StatusCmd
( T) ClusterSlaves (ctx context .Context , nodeID string ) *StringSliceCmd
( T) ClusterSlots (ctx context .Context ) *ClusterSlotsCmd
( T) Command (ctx context .Context ) *CommandsInfoCmd
( T) ConfigGet (ctx context .Context , parameter string ) *SliceCmd
( T) ConfigResetStat (ctx context .Context ) *StatusCmd
( T) ConfigRewrite (ctx context .Context ) *StatusCmd
( T) ConfigSet (ctx context .Context , parameter, value string ) *StatusCmd
( T) DBSize (ctx context .Context ) *IntCmd
( T) DebugObject (ctx context .Context , key string ) *StringCmd
( T) Decr (ctx context .Context , key string ) *IntCmd
( T) DecrBy (ctx context .Context , key string , decrement int64 ) *IntCmd
( T) Del (ctx context .Context , keys ...string ) *IntCmd
( T) Dump (ctx context .Context , key string ) *StringCmd
( T) Echo (ctx context .Context , message interface{}) *StringCmd
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) Exists (ctx context .Context , keys ...string ) *IntCmd
( T) Expire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) ExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) FlushAll (ctx context .Context ) *StatusCmd
( T) FlushAllAsync (ctx context .Context ) *StatusCmd
( T) FlushDB (ctx context .Context ) *StatusCmd
( T) FlushDBAsync (ctx context .Context ) *StatusCmd
( T) GeoAdd (ctx context .Context , key string , geoLocation ...*GeoLocation ) *IntCmd
( T) GeoDist (ctx context .Context , key string , member1, member2, unit string ) *FloatCmd
( T) GeoHash (ctx context .Context , key string , members ...string ) *StringSliceCmd
( T) GeoPos (ctx context .Context , key string , members ...string ) *GeoPosCmd
( T) GeoRadius (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
( T) GeoRadiusByMember (ctx context .Context , key, member string , query *GeoRadiusQuery ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUSBYMEMBER_RO command.
( T) GeoRadiusByMemberStore (ctx context .Context , key, member string , query *GeoRadiusQuery ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
( T) GeoRadiusStore (ctx context .Context , key string , longitude, latitude float64 , query *GeoRadiusQuery ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
( T) Get (ctx context .Context , key string ) *StringCmd
Redis `GET key` command. It returns redis.Nil error when key does not exist.
( T) GetBit (ctx context .Context , key string , offset int64 ) *IntCmd
( T) GetRange (ctx context .Context , key string , start, end int64 ) *StringCmd
( T) GetSet (ctx context .Context , key string , value interface{}) *StringCmd
( T) HDel (ctx context .Context , key string , fields ...string ) *IntCmd
( T) HExists (ctx context .Context , key, field string ) *BoolCmd
( T) HGet (ctx context .Context , key, field string ) *StringCmd
( T) HGetAll (ctx context .Context , key string ) *StringStringMapCmd
( T) HIncrBy (ctx context .Context , key, field string , incr int64 ) *IntCmd
( T) HIncrByFloat (ctx context .Context , key, field string , incr float64 ) *FloatCmd
( T) HKeys (ctx context .Context , key string ) *StringSliceCmd
( T) HLen (ctx context .Context , key string ) *IntCmd
( T) 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.
( T) HMSet (ctx context .Context , key string , values ...interface{}) *BoolCmd
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
( T) HScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) 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"})
Note that it requires Redis v4 for multiple field/value pairs support.
( T) HSetNX (ctx context .Context , key, field string , value interface{}) *BoolCmd
( T) HVals (ctx context .Context , key string ) *StringSliceCmd
( T) Incr (ctx context .Context , key string ) *IntCmd
( T) IncrBy (ctx context .Context , key string , value int64 ) *IntCmd
( T) IncrByFloat (ctx context .Context , key string , value float64 ) *FloatCmd
( T) Info (ctx context .Context , section ...string ) *StringCmd
( T) Keys (ctx context .Context , pattern string ) *StringSliceCmd
( T) LIndex (ctx context .Context , key string , index int64 ) *StringCmd
( T) LInsert (ctx context .Context , key, op string , pivot, value interface{}) *IntCmd
( T) LInsertAfter (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LInsertBefore (ctx context .Context , key string , pivot, value interface{}) *IntCmd
( T) LLen (ctx context .Context , key string ) *IntCmd
( T) LPop (ctx context .Context , key string ) *StringCmd
( T) LPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) LRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) LRem (ctx context .Context , key string , count int64 , value interface{}) *IntCmd
( T) LSet (ctx context .Context , key string , index int64 , value interface{}) *StatusCmd
( T) LTrim (ctx context .Context , key string , start, stop int64 ) *StatusCmd
( T) LastSave (ctx context .Context ) *IntCmd
( T) MGet (ctx context .Context , keys ...string ) *SliceCmd
( T) 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"})
( T) 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"})
( T) MemoryUsage (ctx context .Context , key string , samples ...int ) *IntCmd
( T) Migrate (ctx context .Context , host, port, key string , db int , timeout time .Duration ) *StatusCmd
( T) Move (ctx context .Context , key string , db int ) *BoolCmd
( T) ObjectEncoding (ctx context .Context , key string ) *StringCmd
( T) ObjectIdleTime (ctx context .Context , key string ) *DurationCmd
( T) ObjectRefCount (ctx context .Context , key string ) *IntCmd
( T) PExpire (ctx context .Context , key string , expiration time .Duration ) *BoolCmd
( T) PExpireAt (ctx context .Context , key string , tm time .Time ) *BoolCmd
( T) PFAdd (ctx context .Context , key string , els ...interface{}) *IntCmd
( T) PFCount (ctx context .Context , keys ...string ) *IntCmd
( T) PFMerge (ctx context .Context , dest string , keys ...string ) *StatusCmd
( T) PTTL (ctx context .Context , key string ) *DurationCmd
( T) Persist (ctx context .Context , key string ) *BoolCmd
( T) Ping (ctx context .Context ) *StatusCmd
( T) PubSubChannels (ctx context .Context , pattern string ) *StringSliceCmd
( T) PubSubNumPat (ctx context .Context ) *IntCmd
( T) PubSubNumSub (ctx context .Context , channels ...string ) *StringIntMapCmd
( T) Publish (ctx context .Context , channel string , message interface{}) *IntCmd
Publish posts the message to the channel.
( T) Quit (ctx context .Context ) *StatusCmd
( T) RPop (ctx context .Context , key string ) *StringCmd
( T) RPopLPush (ctx context .Context , source, destination string ) *StringCmd
( T) RPush (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RPushX (ctx context .Context , key string , values ...interface{}) *IntCmd
( T) RandomKey (ctx context .Context ) *StringCmd
( T) ReadOnly (ctx context .Context ) *StatusCmd
( T) ReadWrite (ctx context .Context ) *StatusCmd
( T) Rename (ctx context .Context , key, newkey string ) *StatusCmd
( T) RenameNX (ctx context .Context , key, newkey string ) *BoolCmd
( T) Restore (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) RestoreReplace (ctx context .Context , key string , ttl time .Duration , value string ) *StatusCmd
( T) SAdd (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SCard (ctx context .Context , key string ) *IntCmd
( T) SDiff (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SDiffStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SInter (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SInterStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) SIsMember (ctx context .Context , key string , member interface{}) *BoolCmd
( T) SMembers (ctx context .Context , key string ) *StringSliceCmd
Redis `SMEMBERS key` command output as a slice.
( T) SMembersMap (ctx context .Context , key string ) *StringStructMapCmd
Redis `SMEMBERS key` command output as a map.
( T) SMove (ctx context .Context , source, destination string , member interface{}) *BoolCmd
( T) SPop (ctx context .Context , key string ) *StringCmd
Redis `SPOP key` command.
( T) SPopN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SPOP key count` command.
( T) SRandMember (ctx context .Context , key string ) *StringCmd
Redis `SRANDMEMBER key` command.
( T) SRandMemberN (ctx context .Context , key string , count int64 ) *StringSliceCmd
Redis `SRANDMEMBER key count` command.
( T) SRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) SScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) SUnion (ctx context .Context , keys ...string ) *StringSliceCmd
( T) SUnionStore (ctx context .Context , destination string , keys ...string ) *IntCmd
( T) Save (ctx context .Context ) *StatusCmd
( T) Scan (ctx context .Context , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptFlush (ctx context .Context ) *StatusCmd
( T) ScriptKill (ctx context .Context ) *StatusCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
( T) Select (ctx context .Context , index int ) *StatusCmd
( T) Set (ctx context .Context , key string , value interface{}, expiration time .Duration ) *StatusCmd
Redis `SET key value [expiration]` command.
Use expiration for `SETEX`-like behavior.
Zero expiration means the key has no expiration time.
( T) SetBit (ctx context .Context , key string , offset int64 , value int ) *IntCmd
( T) SetNX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time.
( T) SetRange (ctx context .Context , key string , offset int64 , value string ) *IntCmd
( T) SetXX (ctx context .Context , key string , value interface{}, expiration time .Duration ) *BoolCmd
Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time.
( T) Shutdown (ctx context .Context ) *StatusCmd
( T) ShutdownNoSave (ctx context .Context ) *StatusCmd
( T) ShutdownSave (ctx context .Context ) *StatusCmd
( T) SlaveOf (ctx context .Context , host, port string ) *StatusCmd
( T) SlowLogGet (ctx context .Context , num int64 ) *SlowLogCmd
( T) Sort (ctx context .Context , key string , sort *Sort ) *StringSliceCmd
( T) SortInterfaces (ctx context .Context , key string , sort *Sort ) *SliceCmd
( T) SortStore (ctx context .Context , key, store string , sort *Sort ) *IntCmd
( T) StrLen (ctx context .Context , key string ) *IntCmd
(*T) String () string
( T) SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
( T) Sync (ctx context .Context )
( T) TTL (ctx context .Context , key string ) *DurationCmd
( T) Time (ctx context .Context ) *TimeCmd
( T) Touch (ctx context .Context , keys ...string ) *IntCmd
( T) Type (ctx context .Context , key string ) *StatusCmd
( T) Unlink (ctx context .Context , keys ...string ) *IntCmd
( T) Wait (ctx context .Context , numSlaves int , timeout time .Duration ) *IntCmd
( T) XAck (ctx context .Context , stream, group string , ids ...string ) *IntCmd
( T) XAdd (ctx context .Context , a *XAddArgs ) *StringCmd
( T) XClaim (ctx context .Context , a *XClaimArgs ) *XMessageSliceCmd
( T) XClaimJustID (ctx context .Context , a *XClaimArgs ) *StringSliceCmd
( T) XDel (ctx context .Context , stream string , ids ...string ) *IntCmd
( T) XGroupCreate (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupCreateMkStream (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XGroupDelConsumer (ctx context .Context , stream, group, consumer string ) *IntCmd
( T) XGroupDestroy (ctx context .Context , stream, group string ) *IntCmd
( T) XGroupSetID (ctx context .Context , stream, group, start string ) *StatusCmd
( T) XInfoGroups (ctx context .Context , key string ) *XInfoGroupsCmd
( T) XLen (ctx context .Context , stream string ) *IntCmd
( T) XPending (ctx context .Context , stream, group string ) *XPendingCmd
( T) XPendingExt (ctx context .Context , a *XPendingExtArgs ) *XPendingExtCmd
( T) XRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XRead (ctx context .Context , a *XReadArgs ) *XStreamSliceCmd
( T) XReadGroup (ctx context .Context , a *XReadGroupArgs ) *XStreamSliceCmd
( T) XReadStreams (ctx context .Context , streams ...string ) *XStreamSliceCmd
( T) XRevRange (ctx context .Context , stream, start, stop string ) *XMessageSliceCmd
( T) XRevRangeN (ctx context .Context , stream, start, stop string , count int64 ) *XMessageSliceCmd
( T) XTrim (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) XTrimApprox (ctx context .Context , key string , maxLen int64 ) *IntCmd
( T) ZAdd (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key score member [score member ...]` command.
( T) ZAddCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key CH score member [score member ...]` command.
( T) ZAddNX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX score member [score member ...]` command.
( T) ZAddNXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key NX CH score member [score member ...]` command.
( T) ZAddXX (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX score member [score member ...]` command.
( T) ZAddXXCh (ctx context .Context , key string , members ...*Z ) *IntCmd
Redis `ZADD key XX CH score member [score member ...]` command.
( T) ZCard (ctx context .Context , key string ) *IntCmd
( T) ZCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZIncr (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key INCR score member` command.
( T) ZIncrBy (ctx context .Context , key string , increment float64 , member string ) *FloatCmd
( T) ZIncrNX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key NX INCR score member` command.
( T) ZIncrXX (ctx context .Context , key string , member *Z ) *FloatCmd
Redis `ZADD key XX INCR score member` command.
( T) ZInterStore (ctx context .Context , destination string , store *ZStore ) *IntCmd
( T) ZLexCount (ctx context .Context , key, min, max string ) *IntCmd
( T) ZPopMax (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZPopMin (ctx context .Context , key string , count ...int64 ) *ZSliceCmd
( T) ZRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRank (ctx context .Context , key, member string ) *IntCmd
( T) ZRem (ctx context .Context , key string , members ...interface{}) *IntCmd
( T) ZRemRangeByLex (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRemRangeByRank (ctx context .Context , key string , start, stop int64 ) *IntCmd
( T) ZRemRangeByScore (ctx context .Context , key, min, max string ) *IntCmd
( T) ZRevRange (ctx context .Context , key string , start, stop int64 ) *StringSliceCmd
( T) ZRevRangeByLex (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScore (ctx context .Context , key string , opt *ZRangeBy ) *StringSliceCmd
( T) ZRevRangeByScoreWithScores (ctx context .Context , key string , opt *ZRangeBy ) *ZSliceCmd
( T) ZRevRangeWithScores (ctx context .Context , key string , start, stop int64 ) *ZSliceCmd
( T) ZRevRank (ctx context .Context , key, member string ) *IntCmd
( T) ZScan (ctx context .Context , key string , cursor uint64 , match string , count int64 ) *ScanCmd
( T) ZScore (ctx context .Context , key, member string ) *FloatCmd
( T) ZUnionStore (ctx context .Context , dest string , store *ZStore ) *IntCmd
/* 26 unexporteds ... */ /* 26 unexporteds: */
(*T) _generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
(*T) _getConn (ctx context .Context ) (*pool .Conn , error )
(*T) _process (ctx context .Context , cmd Cmder ) error
( T) bitOp (ctx context .Context , op, destKey string , keys ...string ) *IntCmd
(*T) clone () *baseClient
(*T) cmdTimeout (cmd Cmder ) time .Duration
(*T) generalProcessPipeline (ctx context .Context , cmds []Cmder , p pipelineProcessor ) error
(*T) getAddr () string
(*T) getConn (ctx context .Context ) (*pool .Conn , error )
(*T) initConn (ctx context .Context , cn *pool .Conn ) error
(*T) newConn (ctx context .Context ) (*pool .Conn , error )
(*T) pipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
(*T) process (ctx context .Context , cmd Cmder ) error
(*T) processPipeline (ctx context .Context , cmds []Cmder ) error
(*T) processTxPipeline (ctx context .Context , cmds []Cmder ) error
(*T) releaseConn (ctx context .Context , cn *pool .Conn , err error )
(*T) retryBackoff (attempt int ) time .Duration
( T) shutdown (ctx context .Context , modifier string ) *StatusCmd
(*T) txPipelineProcessCmds (ctx context .Context , cn *pool .Conn , cmds []Cmder ) (bool , error )
(*T) withConn (ctx context .Context , fn func(context .Context , *pool .Conn ) error ) error
(*T) withTimeout (timeout time .Duration ) *baseClient
( T) zAdd (ctx context .Context , a []interface{}, n int , members ...*Z ) *IntCmd
( T) zIncr (ctx context .Context , a []interface{}, n int , members ...*Z ) *FloatCmd
( T) zRange (ctx context .Context , key string , start, stop int64 , withScores bool ) *StringSliceCmd
( T) zRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy , withScores bool ) *StringSliceCmd
( T) zRevRangeBy (ctx context .Context , zcmd, key string , opt *ZRangeBy ) *StringSliceCmd
Implements (at least 7, in which 3 are exported )
*T : expvar.Var
*T : fmt.Stringer
*T : io.Closer
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
T : scripter
T : github.com/go-redis/redis_rate/v9.rediser
*T : context.stringer
*T : runtime.stringer
type hooks (struct)
Fields (only one, which is unexported )
/* one unexported ... */ /* one unexported: */
hooks []Hook
Methods (total 6, in which 1 are exported )
(*T) AddHook (hook Hook )
/* 5 unexporteds ... */ /* 5 unexporteds: */
( T) clone () hooks
(*T) lock ()
( T) process (ctx context .Context , cmd Cmder , fn func(context .Context , Cmder ) error ) error
( T) processPipeline (ctx context .Context , cmds []Cmder , fn func(context .Context , []Cmder ) error ) error
( T) processTxPipeline (ctx context .Context , cmds []Cmder , fn func(context .Context , []Cmder ) error ) error
type scripter (interface)
Methods (total 4, all are exported )
( T) Eval (ctx context .Context , script string , keys []string , args ...interface{}) *Cmd
( T) EvalSha (ctx context .Context , sha1 string , keys []string , args ...interface{}) *Cmd
( T) ScriptExists (ctx context .Context , hashes ...string ) *BoolSliceCmd
( T) ScriptLoad (ctx context .Context , script string ) *StringCmd
Implemented By (at least 13, in which 10 are exported )
Client
ClusterClient
Cmdable (interface)
Conn
Pipeline
Pipeliner (interface)
Ring
StatefulCmdable (interface)
Tx
UniversalClient (interface)
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
cmdable
conn
github.com/go-redis/redis_rate/v9.rediser (interface)
Implements (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
T : github.com/go-redis/redis_rate/v9.rediser
As Inputs Of (at least 5, all are exported )
func (*Script ).Eval (ctx context .Context , c scripter , keys []string , args ...interface{}) *Cmd
func (*Script ).EvalSha (ctx context .Context , c scripter , keys []string , args ...interface{}) *Cmd
func (*Script ).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
type sentinelFailover (struct)
Fields (total 8, none are exported )
/* 8 unexporteds ... */ /* 8 unexporteds: */
_masterAddr string
mu sync .RWMutex
onFailover func(ctx context .Context , addr string )
onUpdate func(ctx context .Context )
opt *FailoverOptions
pubsub *PubSub
sentinel *SentinelClient
sentinelAddrs []string
Methods (total 11, in which 3 are exported )
(*T) Close () error
(*T) MasterAddr (ctx context .Context ) (string , error )
(*T) RandomSlaveAddr (ctx context .Context ) (string , error )
/* 8 unexporteds ... */ /* 8 unexporteds: */
(*T) closeSentinel () error
(*T) discoverSentinels (ctx context .Context )
(*T) getMasterAddr (ctx context .Context , sentinel *SentinelClient ) string
(*T) getSlaveAddrs (ctx context .Context , sentinel *SentinelClient ) []string
(*T) listen (pubsub *PubSub )
(*T) setSentinel (ctx context .Context , sentinel *SentinelClient )
(*T) slaveAddrs (ctx context .Context ) ([]string , error )
(*T) trySwitchMaster (ctx context .Context , addr string )
Implements (at least one exported )
*T : io.Closer
As Inputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func masterSlaveDialer (failover *sentinelFailover ) func(ctx context .Context , network, addr string ) (net .Conn , error )
type statefulCmdable (func)
Methods (total 5, all are exported )
( T) Auth (ctx context .Context , password string ) *StatusCmd
( T) AuthACL (ctx context .Context , username, password string ) *StatusCmd
Perform an AUTH command, using the given user and pass.
Should be used to authenticate the current connection with one of the connections defined in the ACL list
when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
( T) ClientSetName (ctx context .Context , name string ) *BoolCmd
ClientSetName assigns a name to the connection.
( T) Select (ctx context .Context , index int ) *StatusCmd
( T) SwapDB (ctx context .Context , index1, index2 int ) *StatusCmd
The pages are generated with Golds v0.3.2-preview . (GOOS=darwin 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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds .