README

Redis client for Golang Build Status

Supports:

API docs: http://godoc.org/gopkg.in/redis.v3. Examples: http://godoc.org/gopkg.in/redis.v3#pkg-examples.

Installation

Install:

go get gopkg.in/redis.v3

Quickstart

func ExampleNewClient() {
	client := redis.NewClient(&redis.Options{
		Addr:     "localhost:6379",
		Password: "", // no password set
		DB:       0,  // use default DB
	})

	pong, err := client.Ping().Result()
	fmt.Println(pong, err)
	// Output: PONG <nil>
}

func ExampleClient() {
	err := client.Set("key", "value", 0).Err()
	if err != nil {
		panic(err)
	}

	val, err := client.Get("key").Result()
	if err != nil {
		panic(err)
	}
	fmt.Println("key", val)

	val2, err := client.Get("key2").Result()
	if err == redis.Nil {
		fmt.Println("key2 does not exists")
	} else if err != nil {
		panic(err)
	} else {
		fmt.Println("key2", val2)
	}
	// Output: key value
	// key2 does not exists
}

Howto

Please go through examples to get an idea how to use this package.

Look and feel

Some corner cases:

SET key value EX 10 NX
set, err := client.SetNX("key", "value", 10*time.Second).Result()

SORT list LIMIT 0 2 ASC
vals, err := client.Sort("list", redis.Sort{Offset: 0, Count: 2, Order: "ASC"}).Result()

ZRANGEBYSCORE zset -inf +inf WITHSCORES LIMIT 0 2
vals, err := client.ZRangeByScoreWithScores("zset", redis.ZRangeByScore{
    Min: "-inf",
    Max: "+inf",
    Offset: 0,
    Count: 2,
}).Result()

ZINTERSTORE out 2 zset1 zset2 WEIGHTS 2 3 AGGREGATE SUM
vals, err := client.ZInterStore("out", redis.ZStore{Weights: []int64{2, 3}}, "zset1", "zset2").Result()

EVAL "return {KEYS[1],ARGV[1]}" 1 "key" "hello"
vals, err := client.Eval("return {KEYS[1],ARGV[1]}", []string{"key"}, []string{"hello"}).Result()

Benchmark

go-redis vs redigo:

BenchmarkSetGoRedis10Conns64Bytes-4 	  200000	      7621 ns/op	     210 B/op	       6 allocs/op
BenchmarkSetGoRedis100Conns64Bytes-4	  200000	      7554 ns/op	     210 B/op	       6 allocs/op
BenchmarkSetGoRedis10Conns1KB-4     	  200000	      7697 ns/op	     210 B/op	       6 allocs/op
BenchmarkSetGoRedis100Conns1KB-4    	  200000	      7688 ns/op	     210 B/op	       6 allocs/op
BenchmarkSetGoRedis10Conns10KB-4    	  200000	      9214 ns/op	     210 B/op	       6 allocs/op
BenchmarkSetGoRedis100Conns10KB-4   	  200000	      9181 ns/op	     210 B/op	       6 allocs/op
BenchmarkSetGoRedis10Conns1MB-4     	    2000	    583242 ns/op	    2337 B/op	       6 allocs/op
BenchmarkSetGoRedis100Conns1MB-4    	    2000	    583089 ns/op	    2338 B/op	       6 allocs/op
BenchmarkSetRedigo10Conns64Bytes-4  	  200000	      7576 ns/op	     208 B/op	       7 allocs/op
BenchmarkSetRedigo100Conns64Bytes-4 	  200000	      7782 ns/op	     208 B/op	       7 allocs/op
BenchmarkSetRedigo10Conns1KB-4      	  200000	      7958 ns/op	     208 B/op	       7 allocs/op
BenchmarkSetRedigo100Conns1KB-4     	  200000	      7725 ns/op	     208 B/op	       7 allocs/op
BenchmarkSetRedigo10Conns10KB-4     	  100000	     18442 ns/op	     208 B/op	       7 allocs/op
BenchmarkSetRedigo100Conns10KB-4    	  100000	     18818 ns/op	     208 B/op	       7 allocs/op
BenchmarkSetRedigo10Conns1MB-4      	    2000	    668829 ns/op	     226 B/op	       7 allocs/op
BenchmarkSetRedigo100Conns1MB-4     	    2000	    679542 ns/op	     226 B/op	       7 allocs/op

Redis Cluster:

BenchmarkRedisPing-4                	  200000	      6983 ns/op	     116 B/op	       4 allocs/op
BenchmarkRedisClusterPing-4         	  100000	     11535 ns/op	     117 B/op	       4 allocs/op

Shameless plug

Check my PostgreSQL client for Go.

Expand ▾ Collapse ▴

Documentation

Overview

    Package redis implements a Redis client.

    Example (CustomCommand)
    Output:
    
    "" redis: nil
    

    Index

    Examples

    Constants

    This section is empty.

    Variables

    View Source
    var Logger *log.Logger
    View Source
    var Nil = errorf("redis: nil")

      Redis nil reply, .e.g. when key does not exist.

      View Source
      var TxFailedErr = errorf("redis: transaction failed")

        Redis transaction failed.

        Functions

        func SetLogger

        func SetLogger(logger *log.Logger)

        Types

        type BitCount

        type BitCount struct {
        	Start, End int64
        }

        type BoolCmd

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

        func NewBoolCmd

        func NewBoolCmd(args ...interface{}) *BoolCmd

        func (*BoolCmd) Err

        func (cmd *BoolCmd) Err() error

        func (*BoolCmd) Result

        func (cmd *BoolCmd) Result() (bool, error)

        func (*BoolCmd) String

        func (cmd *BoolCmd) String() string

        func (*BoolCmd) Val

        func (cmd *BoolCmd) Val() bool

        type BoolSliceCmd

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

        func NewBoolSliceCmd

        func NewBoolSliceCmd(args ...interface{}) *BoolSliceCmd

        func (*BoolSliceCmd) Err

        func (cmd *BoolSliceCmd) Err() error

        func (*BoolSliceCmd) Result

        func (cmd *BoolSliceCmd) Result() ([]bool, error)

        func (*BoolSliceCmd) String

        func (cmd *BoolSliceCmd) String() string

        func (*BoolSliceCmd) Val

        func (cmd *BoolSliceCmd) Val() []bool

        type Client

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

          Client is a Redis client representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines.

          Example
          Output:
          
          key value
          key2 does not exists
          

          func NewClient

          func NewClient(opt *Options) *Client

            NewClient returns a client to the Redis Server specified by Options.

            Example
            Output:
            
            PONG <nil>
            

            func NewFailoverClient

            func NewFailoverClient(failoverOpt *FailoverOptions) *Client

              NewFailoverClient returns a Redis client that uses Redis Sentinel for automatic failover. It's safe for concurrent use by multiple goroutines.

              Example
              Output:
              
              

              func (*Client) Append

              func (c *Client) Append(key, value string) *IntCmd

              func (*Client) Auth

              func (c *Client) Auth(password string) *StatusCmd

              func (*Client) BLPop

              func (c *Client) BLPop(timeout time.Duration, keys ...string) *StringSliceCmd
              Example
              Output:
              
              queue message
              

              func (*Client) BRPop

              func (c *Client) BRPop(timeout time.Duration, keys ...string) *StringSliceCmd

              func (*Client) BRPopLPush

              func (c *Client) BRPopLPush(source, destination string, timeout time.Duration) *StringCmd

              func (*Client) BgRewriteAOF

              func (c *Client) BgRewriteAOF() *StatusCmd

              func (*Client) BgSave

              func (c *Client) BgSave() *StatusCmd

              func (*Client) BitCount

              func (c *Client) BitCount(key string, bitCount *BitCount) *IntCmd

              func (*Client) BitOpAnd

              func (c *Client) BitOpAnd(destKey string, keys ...string) *IntCmd

              func (*Client) BitOpNot

              func (c *Client) BitOpNot(destKey string, key string) *IntCmd

              func (*Client) BitOpOr

              func (c *Client) BitOpOr(destKey string, keys ...string) *IntCmd

              func (*Client) BitOpXor

              func (c *Client) BitOpXor(destKey string, keys ...string) *IntCmd

              func (*Client) BitPos

              func (c *Client) BitPos(key string, bit int64, pos ...int64) *IntCmd

              func (*Client) ClientGetName

              func (c *Client) ClientGetName() *StringCmd

                ClientGetName returns the name of the one of many connections in the pool.

                func (*Client) ClientKill

                func (c *Client) ClientKill(ipPort string) *StatusCmd

                func (*Client) ClientList

                func (c *Client) ClientList() *StringCmd

                func (*Client) ClientPause

                func (c *Client) ClientPause(dur time.Duration) *BoolCmd

                func (*Client) ClientSetName

                func (c *Client) ClientSetName(name string) *BoolCmd

                  ClientSetName assigns a name to the one of many connections in the pool.

                  func (*Client) Close

                  func (c *Client) Close() error

                    Close closes the client, releasing any open resources.

                    It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines.

                    func (*Client) ClusterAddSlots

                    func (c *Client) ClusterAddSlots(slots ...int) *StatusCmd

                    func (*Client) ClusterAddSlotsRange

                    func (c *Client) ClusterAddSlotsRange(min, max int) *StatusCmd

                    func (*Client) ClusterCountFailureReports

                    func (c *Client) ClusterCountFailureReports(nodeID string) *IntCmd

                    func (*Client) ClusterCountKeysInSlot

                    func (c *Client) ClusterCountKeysInSlot(slot int) *IntCmd

                    func (*Client) ClusterDelSlots

                    func (c *Client) ClusterDelSlots(slots ...int) *StatusCmd

                    func (*Client) ClusterDelSlotsRange

                    func (c *Client) ClusterDelSlotsRange(min, max int) *StatusCmd

                    func (*Client) ClusterFailover

                    func (c *Client) ClusterFailover() *StatusCmd

                    func (*Client) ClusterForget

                    func (c *Client) ClusterForget(nodeID string) *StatusCmd

                    func (*Client) ClusterInfo

                    func (c *Client) ClusterInfo() *StringCmd

                    func (*Client) ClusterKeySlot

                    func (c *Client) ClusterKeySlot(key string) *IntCmd

                    func (*Client) ClusterMeet

                    func (c *Client) ClusterMeet(host, port string) *StatusCmd

                    func (*Client) ClusterNodes

                    func (c *Client) ClusterNodes() *StringCmd

                    func (*Client) ClusterReplicate

                    func (c *Client) ClusterReplicate(nodeID string) *StatusCmd

                    func (*Client) ClusterResetHard

                    func (c *Client) ClusterResetHard() *StatusCmd

                    func (*Client) ClusterResetSoft

                    func (c *Client) ClusterResetSoft() *StatusCmd

                    func (*Client) ClusterSaveConfig

                    func (c *Client) ClusterSaveConfig() *StatusCmd

                    func (*Client) ClusterSlaves

                    func (c *Client) ClusterSlaves(nodeID string) *StringSliceCmd

                    func (*Client) ClusterSlots

                    func (c *Client) ClusterSlots() *ClusterSlotCmd

                    func (*Client) ConfigGet

                    func (c *Client) ConfigGet(parameter string) *SliceCmd

                    func (*Client) ConfigResetStat

                    func (c *Client) ConfigResetStat() *StatusCmd

                    func (*Client) ConfigSet

                    func (c *Client) ConfigSet(parameter, value string) *StatusCmd

                    func (*Client) DbSize

                    func (c *Client) DbSize() *IntCmd

                    func (*Client) DebugObject

                    func (c *Client) DebugObject(key string) *StringCmd

                    func (*Client) Decr

                    func (c *Client) Decr(key string) *IntCmd

                    func (*Client) DecrBy

                    func (c *Client) DecrBy(key string, decrement int64) *IntCmd

                    func (*Client) Del

                    func (c *Client) Del(keys ...string) *IntCmd

                    func (*Client) Dump

                    func (c *Client) Dump(key string) *StringCmd

                    func (*Client) Echo

                    func (c *Client) Echo(message string) *StringCmd

                    func (*Client) Eval

                    func (c *Client) Eval(script string, keys []string, args []string) *Cmd

                    func (*Client) EvalSha

                    func (c *Client) EvalSha(sha1 string, keys []string, args []string) *Cmd

                    func (*Client) Exists

                    func (c *Client) Exists(key string) *BoolCmd

                    func (*Client) Expire

                    func (c *Client) Expire(key string, expiration time.Duration) *BoolCmd

                    func (*Client) ExpireAt

                    func (c *Client) ExpireAt(key string, tm time.Time) *BoolCmd

                    func (*Client) FlushAll

                    func (c *Client) FlushAll() *StatusCmd

                    func (*Client) FlushDb

                    func (c *Client) FlushDb() *StatusCmd

                    func (*Client) GeoAdd

                    func (c *Client) GeoAdd(key string, geoLocation ...*GeoLocation) *IntCmd

                    func (*Client) GeoDist

                    func (c *Client) GeoDist(key string, member1, member2, unit string) *FloatCmd

                    func (*Client) GeoHash

                    func (c *Client) GeoHash(key string, members ...string) *StringSliceCmd

                    func (*Client) GeoRadius

                    func (c *Client) GeoRadius(key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd

                    func (*Client) GeoRadiusByMember

                    func (c *Client) GeoRadiusByMember(key, member string, query *GeoRadiusQuery) *GeoLocationCmd

                    func (*Client) Get

                    func (c *Client) Get(key string) *StringCmd

                    func (*Client) GetBit

                    func (c *Client) GetBit(key string, offset int64) *IntCmd

                    func (*Client) GetRange

                    func (c *Client) GetRange(key string, start, end int64) *StringCmd

                    func (*Client) GetSet

                    func (c *Client) GetSet(key string, value interface{}) *StringCmd

                    func (*Client) HDel

                    func (c *Client) HDel(key string, fields ...string) *IntCmd

                    func (*Client) HExists

                    func (c *Client) HExists(key, field string) *BoolCmd

                    func (*Client) HGet

                    func (c *Client) HGet(key, field string) *StringCmd

                    func (*Client) HGetAll

                    func (c *Client) HGetAll(key string) *StringSliceCmd

                    func (*Client) HGetAllMap

                    func (c *Client) HGetAllMap(key string) *StringStringMapCmd

                    func (*Client) HIncrBy

                    func (c *Client) HIncrBy(key, field string, incr int64) *IntCmd

                    func (*Client) HIncrByFloat

                    func (c *Client) HIncrByFloat(key, field string, incr float64) *FloatCmd

                    func (*Client) HKeys

                    func (c *Client) HKeys(key string) *StringSliceCmd

                    func (*Client) HLen

                    func (c *Client) HLen(key string) *IntCmd

                    func (*Client) HMGet

                    func (c *Client) HMGet(key string, fields ...string) *SliceCmd

                    func (*Client) HMSet

                    func (c *Client) HMSet(key, field, value string, pairs ...string) *StatusCmd

                    func (*Client) HMSetMap

                    func (c *Client) HMSetMap(key string, fields map[string]string) *StatusCmd

                    func (*Client) HScan

                    func (c *Client) HScan(key string, cursor int64, match string, count int64) *ScanCmd

                    func (*Client) HSet

                    func (c *Client) HSet(key, field, value string) *BoolCmd

                    func (*Client) HSetNX

                    func (c *Client) HSetNX(key, field, value string) *BoolCmd

                    func (*Client) HVals

                    func (c *Client) HVals(key string) *StringSliceCmd

                    func (*Client) Incr

                    func (c *Client) Incr(key string) *IntCmd
                    Example
                    Output:
                    
                    1 <nil>
                    

                    func (*Client) IncrBy

                    func (c *Client) IncrBy(key string, value int64) *IntCmd

                    func (*Client) IncrByFloat

                    func (c *Client) IncrByFloat(key string, value float64) *FloatCmd

                    func (*Client) Info

                    func (c *Client) Info(section ...string) *StringCmd

                    func (*Client) Keys

                    func (c *Client) Keys(pattern string) *StringSliceCmd

                    func (*Client) LIndex

                    func (c *Client) LIndex(key string, index int64) *StringCmd

                    func (*Client) LInsert

                    func (c *Client) LInsert(key, op, pivot, value string) *IntCmd

                    func (*Client) LLen

                    func (c *Client) LLen(key string) *IntCmd

                    func (*Client) LPop

                    func (c *Client) LPop(key string) *StringCmd

                    func (*Client) LPush

                    func (c *Client) LPush(key string, values ...string) *IntCmd

                    func (*Client) LPushX

                    func (c *Client) LPushX(key, value interface{}) *IntCmd

                    func (*Client) LRange

                    func (c *Client) LRange(key string, start, stop int64) *StringSliceCmd

                    func (*Client) LRem

                    func (c *Client) LRem(key string, count int64, value interface{}) *IntCmd

                    func (*Client) LSet

                    func (c *Client) LSet(key string, index int64, value interface{}) *StatusCmd

                    func (*Client) LTrim

                    func (c *Client) LTrim(key string, start, stop int64) *StatusCmd

                    func (*Client) LastSave

                    func (c *Client) LastSave() *IntCmd

                    func (*Client) MGet

                    func (c *Client) MGet(keys ...string) *SliceCmd

                    func (*Client) MSet

                    func (c *Client) MSet(pairs ...string) *StatusCmd

                    func (*Client) MSetNX

                    func (c *Client) MSetNX(pairs ...string) *BoolCmd

                    func (*Client) Migrate

                    func (c *Client) Migrate(host, port, key string, db int64, timeout time.Duration) *StatusCmd

                    func (*Client) Move

                    func (c *Client) Move(key string, db int64) *BoolCmd

                    func (*Client) Multi

                    func (c *Client) Multi() *Multi

                      Deprecated. Use Watch instead.

                      func (*Client) ObjectEncoding

                      func (c *Client) ObjectEncoding(keys ...string) *StringCmd

                      func (*Client) ObjectIdleTime

                      func (c *Client) ObjectIdleTime(keys ...string) *DurationCmd

                      func (*Client) ObjectRefCount

                      func (c *Client) ObjectRefCount(keys ...string) *IntCmd

                      func (*Client) PExpire

                      func (c *Client) PExpire(key string, expiration time.Duration) *BoolCmd

                      func (*Client) PExpireAt

                      func (c *Client) PExpireAt(key string, tm time.Time) *BoolCmd

                      func (*Client) PFAdd

                      func (c *Client) PFAdd(key string, fields ...string) *IntCmd

                      func (*Client) PFCount

                      func (c *Client) PFCount(keys ...string) *IntCmd

                      func (*Client) PFMerge

                      func (c *Client) PFMerge(dest string, keys ...string) *StatusCmd

                      func (*Client) PSubscribe

                      func (c *Client) PSubscribe(channels ...string) (*PubSub, error)

                        Subscribes the client to the given patterns.

                        func (*Client) PTTL

                        func (c *Client) PTTL(key string) *DurationCmd

                        func (*Client) Persist

                        func (c *Client) Persist(key string) *BoolCmd

                        func (*Client) Ping

                        func (c *Client) Ping() *StatusCmd

                        func (*Client) Pipeline

                        func (c *Client) Pipeline() *Pipeline

                        func (*Client) Pipelined

                        func (c *Client) Pipelined(fn func(*Pipeline) error) ([]Cmder, error)
                        Example
                        Output:
                        
                        1 <nil>
                        

                        func (*Client) PoolStats

                        func (c *Client) PoolStats() *PoolStats

                          PoolStats returns connection pool stats.

                          func (*Client) Process

                          func (c *Client) Process(cmd Cmder)

                          func (*Client) PubSub

                          func (c *Client) PubSub() *PubSub

                            Deprecated. Use Subscribe/PSubscribe instead.

                            func (*Client) PubSubChannels

                            func (c *Client) PubSubChannels(pattern string) *StringSliceCmd

                            func (*Client) PubSubNumPat

                            func (c *Client) PubSubNumPat() *IntCmd

                            func (*Client) PubSubNumSub

                            func (c *Client) PubSubNumSub(channels ...string) *StringIntMapCmd

                            func (*Client) Publish

                            func (c *Client) Publish(channel, message string) *IntCmd

                              Posts a message to the given channel.

                              func (*Client) Quit

                              func (c *Client) Quit() *StatusCmd

                              func (*Client) RPop

                              func (c *Client) RPop(key string) *StringCmd

                              func (*Client) RPopLPush

                              func (c *Client) RPopLPush(source, destination string) *StringCmd

                              func (*Client) RPush

                              func (c *Client) RPush(key string, values ...string) *IntCmd

                              func (*Client) RPushX

                              func (c *Client) RPushX(key string, value interface{}) *IntCmd

                              func (*Client) RandomKey

                              func (c *Client) RandomKey() *StringCmd

                              func (*Client) ReadWrite

                              func (c *Client) ReadWrite() *StatusCmd

                              func (*Client) Readonly

                              func (c *Client) Readonly() *StatusCmd

                              func (*Client) Rename

                              func (c *Client) Rename(key, newkey string) *StatusCmd

                              func (*Client) RenameNX

                              func (c *Client) RenameNX(key, newkey string) *BoolCmd

                              func (*Client) Restore

                              func (c *Client) Restore(key string, ttl time.Duration, value string) *StatusCmd

                              func (*Client) RestoreReplace

                              func (c *Client) RestoreReplace(key string, ttl time.Duration, value string) *StatusCmd

                              func (*Client) SAdd

                              func (c *Client) SAdd(key string, members ...string) *IntCmd

                              func (*Client) SCard

                              func (c *Client) SCard(key string) *IntCmd

                              func (*Client) SDiff

                              func (c *Client) SDiff(keys ...string) *StringSliceCmd

                              func (*Client) SDiffStore

                              func (c *Client) SDiffStore(destination string, keys ...string) *IntCmd

                              func (*Client) SInter

                              func (c *Client) SInter(keys ...string) *StringSliceCmd

                              func (*Client) SInterStore

                              func (c *Client) SInterStore(destination string, keys ...string) *IntCmd

                              func (*Client) SIsMember

                              func (c *Client) SIsMember(key string, member interface{}) *BoolCmd

                              func (*Client) SMembers

                              func (c *Client) SMembers(key string) *StringSliceCmd

                              func (*Client) SMove

                              func (c *Client) SMove(source, destination string, member interface{}) *BoolCmd

                              func (*Client) SPop

                              func (c *Client) SPop(key string) *StringCmd

                                Redis `SPOP key` command.

                                func (*Client) SPopN

                                func (c *Client) SPopN(key string, count int64) *StringSliceCmd

                                  Redis `SPOP key count` command.

                                  func (*Client) SRandMember

                                  func (c *Client) SRandMember(key string) *StringCmd

                                    Redis `SRANDMEMBER key` command.

                                    func (*Client) SRandMemberN

                                    func (c *Client) SRandMemberN(key string, count int64) *StringSliceCmd

                                      Redis `SRANDMEMBER key count` command.

                                      func (*Client) SRem

                                      func (c *Client) SRem(key string, members ...string) *IntCmd

                                      func (*Client) SScan

                                      func (c *Client) SScan(key string, cursor int64, match string, count int64) *ScanCmd

                                      func (*Client) SUnion

                                      func (c *Client) SUnion(keys ...string) *StringSliceCmd

                                      func (*Client) SUnionStore

                                      func (c *Client) SUnionStore(destination string, keys ...string) *IntCmd

                                      func (*Client) Save

                                      func (c *Client) Save() *StatusCmd

                                      func (*Client) Scan

                                      func (c *Client) Scan(cursor int64, match string, count int64) *ScanCmd
                                      Example
                                      Output:
                                      
                                      found 33 keys
                                      

                                      func (*Client) ScriptExists

                                      func (c *Client) ScriptExists(scripts ...string) *BoolSliceCmd

                                      func (*Client) ScriptFlush

                                      func (c *Client) ScriptFlush() *StatusCmd

                                      func (*Client) ScriptKill

                                      func (c *Client) ScriptKill() *StatusCmd

                                      func (*Client) ScriptLoad

                                      func (c *Client) ScriptLoad(script string) *StringCmd

                                      func (*Client) Select

                                      func (c *Client) Select(index int64) *StatusCmd

                                      func (*Client) Set

                                      func (c *Client) Set(key string, value interface{}, expiration time.Duration) *StatusCmd

                                        Redis `SET key value [expiration]` command.

                                        Zero expiration means the key has no expiration time.

                                        Example
                                        Output:
                                        
                                        

                                        func (*Client) SetBit

                                        func (c *Client) SetBit(key string, offset int64, value int) *IntCmd

                                        func (*Client) SetNX

                                        func (c *Client) SetNX(key string, value interface{}, expiration time.Duration) *BoolCmd

                                          Redis `SET key value [expiration] NX` command.

                                          Zero expiration means the key has no expiration time.

                                          func (*Client) SetRange

                                          func (c *Client) SetRange(key string, offset int64, value string) *IntCmd

                                          func (*Client) SetXX

                                          func (c *Client) SetXX(key string, value interface{}, expiration time.Duration) *BoolCmd

                                            Redis `SET key value [expiration] XX` command.

                                            Zero expiration means the key has no expiration time.

                                            func (*Client) Shutdown

                                            func (c *Client) Shutdown() *StatusCmd

                                            func (*Client) ShutdownNoSave

                                            func (c *Client) ShutdownNoSave() *StatusCmd

                                            func (*Client) ShutdownSave

                                            func (c *Client) ShutdownSave() *StatusCmd

                                            func (*Client) SlaveOf

                                            func (c *Client) SlaveOf(host, port string) *StatusCmd

                                            func (*Client) SlowLog

                                            func (c *Client) SlowLog()

                                            func (*Client) Sort

                                            func (c *Client) Sort(key string, sort Sort) *StringSliceCmd

                                            func (*Client) SortInterfaces

                                            func (c *Client) SortInterfaces(key string, sort Sort) *SliceCmd

                                            func (*Client) StrLen

                                            func (c *Client) StrLen(key string) *IntCmd

                                            func (*Client) String

                                            func (c *Client) String() string

                                            func (*Client) Subscribe

                                            func (c *Client) Subscribe(channels ...string) (*PubSub, error)

                                              Subscribes the client to the specified channels.

                                              func (*Client) Sync

                                              func (c *Client) Sync()

                                              func (*Client) TTL

                                              func (c *Client) TTL(key string) *DurationCmd

                                              func (*Client) Time

                                              func (c *Client) Time() *StringSliceCmd

                                              func (*Client) Type

                                              func (c *Client) Type(key string) *StatusCmd

                                              func (*Client) Watch

                                              func (c *Client) Watch(keys ...string) (*Multi, error)

                                                Watch creates new transaction and marks the keys to be watched for conditional execution of a transaction.

                                                Example
                                                Output:
                                                
                                                100 <nil>
                                                

                                                func (*Client) ZAdd

                                                func (c *Client) ZAdd(key string, members ...Z) *IntCmd

                                                  Redis `ZADD key score member [score member ...]` command.

                                                  func (*Client) ZAddCh

                                                  func (c *Client) ZAddCh(key string, members ...Z) *IntCmd

                                                    Redis `ZADD key CH score member [score member ...]` command.

                                                    func (*Client) ZAddNX

                                                    func (c *Client) ZAddNX(key string, members ...Z) *IntCmd

                                                      Redis `ZADD key NX score member [score member ...]` command.

                                                      func (*Client) ZAddNXCh

                                                      func (c *Client) ZAddNXCh(key string, members ...Z) *IntCmd

                                                        Redis `ZADD key NX CH score member [score member ...]` command.

                                                        func (*Client) ZAddXX

                                                        func (c *Client) ZAddXX(key string, members ...Z) *IntCmd

                                                          Redis `ZADD key XX score member [score member ...]` command.

                                                          func (*Client) ZAddXXCh

                                                          func (c *Client) ZAddXXCh(key string, members ...Z) *IntCmd

                                                            Redis `ZADD key XX CH score member [score member ...]` command.

                                                            func (*Client) ZCard

                                                            func (c *Client) ZCard(key string) *IntCmd

                                                            func (*Client) ZCount

                                                            func (c *Client) ZCount(key, min, max string) *IntCmd

                                                            func (*Client) ZIncr

                                                            func (c *Client) ZIncr(key string, member Z) *FloatCmd

                                                              Redis `ZADD key INCR score member` command.

                                                              func (*Client) ZIncrBy

                                                              func (c *Client) ZIncrBy(key string, increment float64, member string) *FloatCmd

                                                              func (*Client) ZIncrNX

                                                              func (c *Client) ZIncrNX(key string, member Z) *FloatCmd

                                                                Redis `ZADD key NX INCR score member` command.

                                                                func (*Client) ZIncrXX

                                                                func (c *Client) ZIncrXX(key string, member Z) *FloatCmd

                                                                  Redis `ZADD key XX INCR score member` command.

                                                                  func (*Client) ZInterStore

                                                                  func (c *Client) ZInterStore(destination string, store ZStore, keys ...string) *IntCmd

                                                                  func (*Client) ZRange

                                                                  func (c *Client) ZRange(key string, start, stop int64) *StringSliceCmd

                                                                  func (*Client) ZRangeByLex

                                                                  func (c *Client) ZRangeByLex(key string, opt ZRangeByScore) *StringSliceCmd

                                                                  func (*Client) ZRangeByScore

                                                                  func (c *Client) ZRangeByScore(key string, opt ZRangeByScore) *StringSliceCmd

                                                                  func (*Client) ZRangeByScoreWithScores

                                                                  func (c *Client) ZRangeByScoreWithScores(key string, opt ZRangeByScore) *ZSliceCmd

                                                                  func (*Client) ZRangeWithScores

                                                                  func (c *Client) ZRangeWithScores(key string, start, stop int64) *ZSliceCmd

                                                                  func (*Client) ZRank

                                                                  func (c *Client) ZRank(key, member string) *IntCmd

                                                                  func (*Client) ZRem

                                                                  func (c *Client) ZRem(key string, members ...string) *IntCmd

                                                                  func (*Client) ZRemRangeByRank

                                                                  func (c *Client) ZRemRangeByRank(key string, start, stop int64) *IntCmd

                                                                  func (*Client) ZRemRangeByScore

                                                                  func (c *Client) ZRemRangeByScore(key, min, max string) *IntCmd

                                                                  func (*Client) ZRevRange

                                                                  func (c *Client) ZRevRange(key string, start, stop int64) *StringSliceCmd

                                                                  func (*Client) ZRevRangeByLex

                                                                  func (c *Client) ZRevRangeByLex(key string, opt ZRangeByScore) *StringSliceCmd

                                                                  func (*Client) ZRevRangeByScore

                                                                  func (c *Client) ZRevRangeByScore(key string, opt ZRangeByScore) *StringSliceCmd

                                                                  func (*Client) ZRevRangeByScoreWithScores

                                                                  func (c *Client) ZRevRangeByScoreWithScores(key string, opt ZRangeByScore) *ZSliceCmd

                                                                  func (*Client) ZRevRangeWithScores

                                                                  func (c *Client) ZRevRangeWithScores(key string, start, stop int64) *ZSliceCmd

                                                                  func (*Client) ZRevRank

                                                                  func (c *Client) ZRevRank(key, member string) *IntCmd

                                                                  func (*Client) ZScan

                                                                  func (c *Client) ZScan(key string, cursor int64, match string, count int64) *ScanCmd

                                                                  func (*Client) ZScore

                                                                  func (c *Client) ZScore(key, member string) *FloatCmd

                                                                  func (*Client) ZUnionStore

                                                                  func (c *Client) ZUnionStore(dest string, store ZStore, keys ...string) *IntCmd

                                                                  type ClusterClient

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

                                                                    ClusterClient is a Redis Cluster client representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines.

                                                                    func NewClusterClient

                                                                    func NewClusterClient(opt *ClusterOptions) *ClusterClient

                                                                      NewClusterClient returns a Redis Cluster client as described in http://redis.io/topics/cluster-spec.

                                                                      Example
                                                                      Output:
                                                                      
                                                                      

                                                                      func (*ClusterClient) Append

                                                                      func (c *ClusterClient) Append(key, value string) *IntCmd

                                                                      func (*ClusterClient) Auth

                                                                      func (c *ClusterClient) Auth(password string) *StatusCmd

                                                                      func (*ClusterClient) BLPop

                                                                      func (c *ClusterClient) BLPop(timeout time.Duration, keys ...string) *StringSliceCmd

                                                                      func (*ClusterClient) BRPop

                                                                      func (c *ClusterClient) BRPop(timeout time.Duration, keys ...string) *StringSliceCmd

                                                                      func (*ClusterClient) BRPopLPush

                                                                      func (c *ClusterClient) BRPopLPush(source, destination string, timeout time.Duration) *StringCmd

                                                                      func (*ClusterClient) BgRewriteAOF

                                                                      func (c *ClusterClient) BgRewriteAOF() *StatusCmd

                                                                      func (*ClusterClient) BgSave

                                                                      func (c *ClusterClient) BgSave() *StatusCmd

                                                                      func (*ClusterClient) BitCount

                                                                      func (c *ClusterClient) BitCount(key string, bitCount *BitCount) *IntCmd

                                                                      func (*ClusterClient) BitOpAnd

                                                                      func (c *ClusterClient) BitOpAnd(destKey string, keys ...string) *IntCmd

                                                                      func (*ClusterClient) BitOpNot

                                                                      func (c *ClusterClient) BitOpNot(destKey string, key string) *IntCmd

                                                                      func (*ClusterClient) BitOpOr

                                                                      func (c *ClusterClient) BitOpOr(destKey string, keys ...string) *IntCmd

                                                                      func (*ClusterClient) BitOpXor

                                                                      func (c *ClusterClient) BitOpXor(destKey string, keys ...string) *IntCmd

                                                                      func (*ClusterClient) BitPos

                                                                      func (c *ClusterClient) BitPos(key string, bit int64, pos ...int64) *IntCmd

                                                                      func (*ClusterClient) ClientKill

                                                                      func (c *ClusterClient) ClientKill(ipPort string) *StatusCmd

                                                                      func (*ClusterClient) ClientList

                                                                      func (c *ClusterClient) ClientList() *StringCmd

                                                                      func (*ClusterClient) ClientPause

                                                                      func (c *ClusterClient) ClientPause(dur time.Duration) *BoolCmd

                                                                      func (*ClusterClient) ClientSetName

                                                                      func (c *ClusterClient) ClientSetName(name string) *BoolCmd

                                                                        ClientSetName assigns a name to the one of many connections in the pool.

                                                                        func (*ClusterClient) Close

                                                                        func (c *ClusterClient) Close() error

                                                                          Close closes the cluster client, releasing any open resources.

                                                                          It is rare to Close a ClusterClient, as the ClusterClient is meant to be long-lived and shared between many goroutines.

                                                                          func (*ClusterClient) ClusterAddSlots

                                                                          func (c *ClusterClient) ClusterAddSlots(slots ...int) *StatusCmd

                                                                          func (*ClusterClient) ClusterAddSlotsRange

                                                                          func (c *ClusterClient) ClusterAddSlotsRange(min, max int) *StatusCmd

                                                                          func (*ClusterClient) ClusterCountFailureReports

                                                                          func (c *ClusterClient) ClusterCountFailureReports(nodeID string) *IntCmd

                                                                          func (*ClusterClient) ClusterCountKeysInSlot

                                                                          func (c *ClusterClient) ClusterCountKeysInSlot(slot int) *IntCmd

                                                                          func (*ClusterClient) ClusterDelSlots

                                                                          func (c *ClusterClient) ClusterDelSlots(slots ...int) *StatusCmd

                                                                          func (*ClusterClient) ClusterDelSlotsRange

                                                                          func (c *ClusterClient) ClusterDelSlotsRange(min, max int) *StatusCmd

                                                                          func (*ClusterClient) ClusterFailover

                                                                          func (c *ClusterClient) ClusterFailover() *StatusCmd

                                                                          func (*ClusterClient) ClusterForget

                                                                          func (c *ClusterClient) ClusterForget(nodeID string) *StatusCmd

                                                                          func (*ClusterClient) ClusterInfo

                                                                          func (c *ClusterClient) ClusterInfo() *StringCmd

                                                                          func (*ClusterClient) ClusterKeySlot

                                                                          func (c *ClusterClient) ClusterKeySlot(key string) *IntCmd

                                                                          func (*ClusterClient) ClusterMeet

                                                                          func (c *ClusterClient) ClusterMeet(host, port string) *StatusCmd

                                                                          func (*ClusterClient) ClusterNodes

                                                                          func (c *ClusterClient) ClusterNodes() *StringCmd

                                                                          func (*ClusterClient) ClusterReplicate

                                                                          func (c *ClusterClient) ClusterReplicate(nodeID string) *StatusCmd

                                                                          func (*ClusterClient) ClusterResetHard

                                                                          func (c *ClusterClient) ClusterResetHard() *StatusCmd

                                                                          func (*ClusterClient) ClusterResetSoft

                                                                          func (c *ClusterClient) ClusterResetSoft() *StatusCmd

                                                                          func (*ClusterClient) ClusterSaveConfig

                                                                          func (c *ClusterClient) ClusterSaveConfig() *StatusCmd

                                                                          func (*ClusterClient) ClusterSlaves

                                                                          func (c *ClusterClient) ClusterSlaves(nodeID string) *StringSliceCmd

                                                                          func (*ClusterClient) ClusterSlots

                                                                          func (c *ClusterClient) ClusterSlots() *ClusterSlotCmd

                                                                          func (*ClusterClient) ConfigGet

                                                                          func (c *ClusterClient) ConfigGet(parameter string) *SliceCmd

                                                                          func (*ClusterClient) ConfigResetStat

                                                                          func (c *ClusterClient) ConfigResetStat() *StatusCmd

                                                                          func (*ClusterClient) ConfigSet

                                                                          func (c *ClusterClient) ConfigSet(parameter, value string) *StatusCmd

                                                                          func (*ClusterClient) DbSize

                                                                          func (c *ClusterClient) DbSize() *IntCmd

                                                                          func (*ClusterClient) DebugObject

                                                                          func (c *ClusterClient) DebugObject(key string) *StringCmd

                                                                          func (*ClusterClient) Decr

                                                                          func (c *ClusterClient) Decr(key string) *IntCmd

                                                                          func (*ClusterClient) DecrBy

                                                                          func (c *ClusterClient) DecrBy(key string, decrement int64) *IntCmd

                                                                          func (*ClusterClient) Del

                                                                          func (c *ClusterClient) Del(keys ...string) *IntCmd

                                                                          func (*ClusterClient) Dump

                                                                          func (c *ClusterClient) Dump(key string) *StringCmd

                                                                          func (*ClusterClient) Echo

                                                                          func (c *ClusterClient) Echo(message string) *StringCmd

                                                                          func (*ClusterClient) Eval

                                                                          func (c *ClusterClient) Eval(script string, keys []string, args []string) *Cmd

                                                                          func (*ClusterClient) EvalSha

                                                                          func (c *ClusterClient) EvalSha(sha1 string, keys []string, args []string) *Cmd

                                                                          func (*ClusterClient) Exists

                                                                          func (c *ClusterClient) Exists(key string) *BoolCmd

                                                                          func (*ClusterClient) Expire

                                                                          func (c *ClusterClient) Expire(key string, expiration time.Duration) *BoolCmd

                                                                          func (*ClusterClient) ExpireAt

                                                                          func (c *ClusterClient) ExpireAt(key string, tm time.Time) *BoolCmd

                                                                          func (*ClusterClient) FlushAll

                                                                          func (c *ClusterClient) FlushAll() *StatusCmd

                                                                          func (*ClusterClient) FlushDb

                                                                          func (c *ClusterClient) FlushDb() *StatusCmd

                                                                          func (*ClusterClient) GeoAdd

                                                                          func (c *ClusterClient) GeoAdd(key string, geoLocation ...*GeoLocation) *IntCmd

                                                                          func (*ClusterClient) GeoDist

                                                                          func (c *ClusterClient) GeoDist(key string, member1, member2, unit string) *FloatCmd

                                                                          func (*ClusterClient) GeoHash

                                                                          func (c *ClusterClient) GeoHash(key string, members ...string) *StringSliceCmd

                                                                          func (*ClusterClient) GeoRadius

                                                                          func (c *ClusterClient) GeoRadius(key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd

                                                                          func (*ClusterClient) GeoRadiusByMember

                                                                          func (c *ClusterClient) GeoRadiusByMember(key, member string, query *GeoRadiusQuery) *GeoLocationCmd

                                                                          func (*ClusterClient) Get

                                                                          func (c *ClusterClient) Get(key string) *StringCmd

                                                                          func (*ClusterClient) GetBit

                                                                          func (c *ClusterClient) GetBit(key string, offset int64) *IntCmd

                                                                          func (*ClusterClient) GetRange

                                                                          func (c *ClusterClient) GetRange(key string, start, end int64) *StringCmd

                                                                          func (*ClusterClient) GetSet

                                                                          func (c *ClusterClient) GetSet(key string, value interface{}) *StringCmd

                                                                          func (*ClusterClient) HDel

                                                                          func (c *ClusterClient) HDel(key string, fields ...string) *IntCmd

                                                                          func (*ClusterClient) HExists

                                                                          func (c *ClusterClient) HExists(key, field string) *BoolCmd

                                                                          func (*ClusterClient) HGet

                                                                          func (c *ClusterClient) HGet(key, field string) *StringCmd

                                                                          func (*ClusterClient) HGetAll

                                                                          func (c *ClusterClient) HGetAll(key string) *StringSliceCmd

                                                                          func (*ClusterClient) HGetAllMap

                                                                          func (c *ClusterClient) HGetAllMap(key string) *StringStringMapCmd

                                                                          func (*ClusterClient) HIncrBy

                                                                          func (c *ClusterClient) HIncrBy(key, field string, incr int64) *IntCmd

                                                                          func (*ClusterClient) HIncrByFloat

                                                                          func (c *ClusterClient) HIncrByFloat(key, field string, incr float64) *FloatCmd

                                                                          func (*ClusterClient) HKeys

                                                                          func (c *ClusterClient) HKeys(key string) *StringSliceCmd

                                                                          func (*ClusterClient) HLen

                                                                          func (c *ClusterClient) HLen(key string) *IntCmd

                                                                          func (*ClusterClient) HMGet

                                                                          func (c *ClusterClient) HMGet(key string, fields ...string) *SliceCmd

                                                                          func (*ClusterClient) HMSet

                                                                          func (c *ClusterClient) HMSet(key, field, value string, pairs ...string) *StatusCmd

                                                                          func (*ClusterClient) HMSetMap

                                                                          func (c *ClusterClient) HMSetMap(key string, fields map[string]string) *StatusCmd

                                                                          func (*ClusterClient) HScan

                                                                          func (c *ClusterClient) HScan(key string, cursor int64, match string, count int64) *ScanCmd

                                                                          func (*ClusterClient) HSet

                                                                          func (c *ClusterClient) HSet(key, field, value string) *BoolCmd

                                                                          func (*ClusterClient) HSetNX

                                                                          func (c *ClusterClient) HSetNX(key, field, value string) *BoolCmd

                                                                          func (*ClusterClient) HVals

                                                                          func (c *ClusterClient) HVals(key string) *StringSliceCmd

                                                                          func (*ClusterClient) Incr

                                                                          func (c *ClusterClient) Incr(key string) *IntCmd

                                                                          func (*ClusterClient) IncrBy

                                                                          func (c *ClusterClient) IncrBy(key string, value int64) *IntCmd

                                                                          func (*ClusterClient) IncrByFloat

                                                                          func (c *ClusterClient) IncrByFloat(key string, value float64) *FloatCmd

                                                                          func (*ClusterClient) Info

                                                                          func (c *ClusterClient) Info(section ...string) *StringCmd

                                                                          func (*ClusterClient) Keys

                                                                          func (c *ClusterClient) Keys(pattern string) *StringSliceCmd

                                                                          func (*ClusterClient) LIndex

                                                                          func (c *ClusterClient) LIndex(key string, index int64) *StringCmd

                                                                          func (*ClusterClient) LInsert

                                                                          func (c *ClusterClient) LInsert(key, op, pivot, value string) *IntCmd

                                                                          func (*ClusterClient) LLen

                                                                          func (c *ClusterClient) LLen(key string) *IntCmd

                                                                          func (*ClusterClient) LPop

                                                                          func (c *ClusterClient) LPop(key string) *StringCmd

                                                                          func (*ClusterClient) LPush

                                                                          func (c *ClusterClient) LPush(key string, values ...string) *IntCmd

                                                                          func (*ClusterClient) LPushX

                                                                          func (c *ClusterClient) LPushX(key, value interface{}) *IntCmd

                                                                          func (*ClusterClient) LRange

                                                                          func (c *ClusterClient) LRange(key string, start, stop int64) *StringSliceCmd

                                                                          func (*ClusterClient) LRem

                                                                          func (c *ClusterClient) LRem(key string, count int64, value interface{}) *IntCmd

                                                                          func (*ClusterClient) LSet

                                                                          func (c *ClusterClient) LSet(key string, index int64, value interface{}) *StatusCmd

                                                                          func (*ClusterClient) LTrim

                                                                          func (c *ClusterClient) LTrim(key string, start, stop int64) *StatusCmd

                                                                          func (*ClusterClient) LastSave

                                                                          func (c *ClusterClient) LastSave() *IntCmd

                                                                          func (*ClusterClient) MGet

                                                                          func (c *ClusterClient) MGet(keys ...string) *SliceCmd

                                                                          func (*ClusterClient) MSet

                                                                          func (c *ClusterClient) MSet(pairs ...string) *StatusCmd

                                                                          func (*ClusterClient) MSetNX

                                                                          func (c *ClusterClient) MSetNX(pairs ...string) *BoolCmd

                                                                          func (*ClusterClient) Migrate

                                                                          func (c *ClusterClient) Migrate(host, port, key string, db int64, timeout time.Duration) *StatusCmd

                                                                          func (*ClusterClient) Move

                                                                          func (c *ClusterClient) Move(key string, db int64) *BoolCmd

                                                                          func (*ClusterClient) ObjectEncoding

                                                                          func (c *ClusterClient) ObjectEncoding(keys ...string) *StringCmd

                                                                          func (*ClusterClient) ObjectIdleTime

                                                                          func (c *ClusterClient) ObjectIdleTime(keys ...string) *DurationCmd

                                                                          func (*ClusterClient) ObjectRefCount

                                                                          func (c *ClusterClient) ObjectRefCount(keys ...string) *IntCmd

                                                                          func (*ClusterClient) PExpire

                                                                          func (c *ClusterClient) PExpire(key string, expiration time.Duration) *BoolCmd

                                                                          func (*ClusterClient) PExpireAt

                                                                          func (c *ClusterClient) PExpireAt(key string, tm time.Time) *BoolCmd

                                                                          func (*ClusterClient) PFAdd

                                                                          func (c *ClusterClient) PFAdd(key string, fields ...string) *IntCmd

                                                                          func (*ClusterClient) PFCount

                                                                          func (c *ClusterClient) PFCount(keys ...string) *IntCmd

                                                                          func (*ClusterClient) PFMerge

                                                                          func (c *ClusterClient) PFMerge(dest string, keys ...string) *StatusCmd

                                                                          func (*ClusterClient) PTTL

                                                                          func (c *ClusterClient) PTTL(key string) *DurationCmd

                                                                          func (*ClusterClient) Persist

                                                                          func (c *ClusterClient) Persist(key string) *BoolCmd

                                                                          func (*ClusterClient) Ping

                                                                          func (c *ClusterClient) Ping() *StatusCmd

                                                                          func (*ClusterClient) Pipeline

                                                                          func (c *ClusterClient) Pipeline() *ClusterPipeline

                                                                            Pipeline creates a new pipeline which is able to execute commands against multiple shards. It's NOT safe for concurrent use by multiple goroutines.

                                                                            func (*ClusterClient) Pipelined

                                                                            func (c *ClusterClient) Pipelined(fn func(*ClusterPipeline) error) ([]Cmder, error)

                                                                            func (*ClusterClient) PoolStats

                                                                            func (c *ClusterClient) PoolStats() *PoolStats

                                                                              PoolStats returns accumulated connection pool stats.

                                                                              func (*ClusterClient) Process

                                                                              func (c *ClusterClient) Process(cmd Cmder)

                                                                              func (*ClusterClient) PubSubChannels

                                                                              func (c *ClusterClient) PubSubChannels(pattern string) *StringSliceCmd

                                                                              func (*ClusterClient) PubSubNumPat

                                                                              func (c *ClusterClient) PubSubNumPat() *IntCmd

                                                                              func (*ClusterClient) PubSubNumSub

                                                                              func (c *ClusterClient) PubSubNumSub(channels ...string) *StringIntMapCmd

                                                                              func (*ClusterClient) Quit

                                                                              func (c *ClusterClient) Quit() *StatusCmd

                                                                              func (*ClusterClient) RPop

                                                                              func (c *ClusterClient) RPop(key string) *StringCmd

                                                                              func (*ClusterClient) RPopLPush

                                                                              func (c *ClusterClient) RPopLPush(source, destination string) *StringCmd

                                                                              func (*ClusterClient) RPush

                                                                              func (c *ClusterClient) RPush(key string, values ...string) *IntCmd

                                                                              func (*ClusterClient) RPushX

                                                                              func (c *ClusterClient) RPushX(key string, value interface{}) *IntCmd

                                                                              func (*ClusterClient) RandomKey

                                                                              func (c *ClusterClient) RandomKey() *StringCmd

                                                                              func (*ClusterClient) ReadWrite

                                                                              func (c *ClusterClient) ReadWrite() *StatusCmd

                                                                              func (*ClusterClient) Readonly

                                                                              func (c *ClusterClient) Readonly() *StatusCmd

                                                                              func (*ClusterClient) Rename

                                                                              func (c *ClusterClient) Rename(key, newkey string) *StatusCmd

                                                                              func (*ClusterClient) RenameNX

                                                                              func (c *ClusterClient) RenameNX(key, newkey string) *BoolCmd

                                                                              func (*ClusterClient) Restore

                                                                              func (c *ClusterClient) Restore(key string, ttl time.Duration, value string) *StatusCmd

                                                                              func (*ClusterClient) RestoreReplace

                                                                              func (c *ClusterClient) RestoreReplace(key string, ttl time.Duration, value string) *StatusCmd

                                                                              func (*ClusterClient) SAdd

                                                                              func (c *ClusterClient) SAdd(key string, members ...string) *IntCmd

                                                                              func (*ClusterClient) SCard

                                                                              func (c *ClusterClient) SCard(key string) *IntCmd

                                                                              func (*ClusterClient) SDiff

                                                                              func (c *ClusterClient) SDiff(keys ...string) *StringSliceCmd

                                                                              func (*ClusterClient) SDiffStore

                                                                              func (c *ClusterClient) SDiffStore(destination string, keys ...string) *IntCmd

                                                                              func (*ClusterClient) SInter

                                                                              func (c *ClusterClient) SInter(keys ...string) *StringSliceCmd

                                                                              func (*ClusterClient) SInterStore

                                                                              func (c *ClusterClient) SInterStore(destination string, keys ...string) *IntCmd

                                                                              func (*ClusterClient) SIsMember

                                                                              func (c *ClusterClient) SIsMember(key string, member interface{}) *BoolCmd

                                                                              func (*ClusterClient) SMembers

                                                                              func (c *ClusterClient) SMembers(key string) *StringSliceCmd

                                                                              func (*ClusterClient) SMove

                                                                              func (c *ClusterClient) SMove(source, destination string, member interface{}) *BoolCmd

                                                                              func (*ClusterClient) SPop

                                                                              func (c *ClusterClient) SPop(key string) *StringCmd

                                                                                Redis `SPOP key` command.

                                                                                func (*ClusterClient) SPopN

                                                                                func (c *ClusterClient) SPopN(key string, count int64) *StringSliceCmd

                                                                                  Redis `SPOP key count` command.

                                                                                  func (*ClusterClient) SRandMember

                                                                                  func (c *ClusterClient) SRandMember(key string) *StringCmd

                                                                                    Redis `SRANDMEMBER key` command.

                                                                                    func (*ClusterClient) SRandMemberN

                                                                                    func (c *ClusterClient) SRandMemberN(key string, count int64) *StringSliceCmd

                                                                                      Redis `SRANDMEMBER key count` command.

                                                                                      func (*ClusterClient) SRem

                                                                                      func (c *ClusterClient) SRem(key string, members ...string) *IntCmd

                                                                                      func (*ClusterClient) SScan

                                                                                      func (c *ClusterClient) SScan(key string, cursor int64, match string, count int64) *ScanCmd

                                                                                      func (*ClusterClient) SUnion

                                                                                      func (c *ClusterClient) SUnion(keys ...string) *StringSliceCmd

                                                                                      func (*ClusterClient) SUnionStore

                                                                                      func (c *ClusterClient) SUnionStore(destination string, keys ...string) *IntCmd

                                                                                      func (*ClusterClient) Save

                                                                                      func (c *ClusterClient) Save() *StatusCmd

                                                                                      func (*ClusterClient) Scan

                                                                                      func (c *ClusterClient) Scan(cursor int64, match string, count int64) *ScanCmd

                                                                                      func (*ClusterClient) ScriptExists

                                                                                      func (c *ClusterClient) ScriptExists(scripts ...string) *BoolSliceCmd

                                                                                      func (*ClusterClient) ScriptFlush

                                                                                      func (c *ClusterClient) ScriptFlush() *StatusCmd

                                                                                      func (*ClusterClient) ScriptKill

                                                                                      func (c *ClusterClient) ScriptKill() *StatusCmd

                                                                                      func (*ClusterClient) ScriptLoad

                                                                                      func (c *ClusterClient) ScriptL