Documentation ¶
Overview ¶
Package redis implements a Redis client.
Example (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)
Output: "" redis: nil
Example (CustomCommand2) ¶
v, err := rdb.Do(ctx, "get", "key_does_not_exist").Text() fmt.Printf("%q %s", v, err)
Output: "" redis: nil
Example (Instrumentation) ¶
rdb := redis.NewClient(&redis.Options{ Addr: ":6379", }) rdb.AddHook(redisHook{}) rdb.Ping(ctx)
Output: starting processing: <ping: > dialing tcp :6379 finished dialing tcp :6379 finished processing: <ping: PONG>
Index ¶
- Constants
- Variables
- func HasErrorPrefix(err error, prefix string) bool
- func NewDialer(opt *Options) func(context.Context, string, string) (net.Conn, error)
- func SetLogger(logger internal.Logging)
- func Version() string
- type ACLCmdable
- type ACLLogCmd
- func (cmd *ACLLogCmd) Args() []interface{}
- func (cmd *ACLLogCmd) Err() error
- func (cmd *ACLLogCmd) FullName() string
- func (cmd *ACLLogCmd) Name() string
- func (cmd *ACLLogCmd) Result() ([]*ACLLogEntry, error)
- func (cmd *ACLLogCmd) SetErr(e error)
- func (cmd *ACLLogCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ACLLogCmd) SetVal(val []*ACLLogEntry)
- func (cmd *ACLLogCmd) String() string
- func (cmd *ACLLogCmd) Val() []*ACLLogEntry
- type ACLLogEntry
- type AggregateCmd
- func (cmd *AggregateCmd) Args() []interface{}
- func (cmd *AggregateCmd) Err() error
- func (cmd *AggregateCmd) FullName() string
- func (cmd *AggregateCmd) Name() string
- func (cmd *AggregateCmd) RawResult() (interface{}, error)
- func (cmd *AggregateCmd) RawVal() interface{}
- func (cmd *AggregateCmd) Result() (*FTAggregateResult, error)
- func (cmd *AggregateCmd) SetErr(e error)
- func (cmd *AggregateCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *AggregateCmd) SetVal(val *FTAggregateResult)
- func (cmd *AggregateCmd) String() string
- func (cmd *AggregateCmd) Val() *FTAggregateResult
- type AggregateQuery
- type AggregateRow
- type Aggregator
- type BFInfo
- type BFInfoCmd
- func (cmd *BFInfoCmd) Args() []interface{}
- func (cmd *BFInfoCmd) Err() error
- func (cmd *BFInfoCmd) FullName() string
- func (cmd *BFInfoCmd) Name() string
- func (cmd *BFInfoCmd) Result() (BFInfo, error)
- func (cmd *BFInfoCmd) SetErr(e error)
- func (cmd *BFInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *BFInfoCmd) SetVal(val BFInfo)
- func (cmd *BFInfoCmd) String() string
- func (cmd *BFInfoCmd) Val() BFInfo
- type BFInsertOptions
- type BFReserveOptions
- type BitCount
- type BitMapCmdable
- type BoolCmd
- func (cmd *BoolCmd) Args() []interface{}
- func (cmd *BoolCmd) Err() error
- func (cmd *BoolCmd) FullName() string
- func (cmd *BoolCmd) Name() string
- func (cmd *BoolCmd) Result() (bool, error)
- func (cmd *BoolCmd) SetErr(e error)
- func (cmd *BoolCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *BoolCmd) SetVal(val bool)
- func (cmd *BoolCmd) String() string
- func (cmd *BoolCmd) Val() bool
- type BoolSliceCmd
- func (cmd *BoolSliceCmd) Args() []interface{}
- func (cmd *BoolSliceCmd) Err() error
- func (cmd *BoolSliceCmd) FullName() string
- func (cmd *BoolSliceCmd) Name() string
- func (cmd *BoolSliceCmd) Result() ([]bool, error)
- func (cmd *BoolSliceCmd) SetErr(e error)
- func (cmd *BoolSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *BoolSliceCmd) SetVal(val []bool)
- func (cmd *BoolSliceCmd) String() string
- func (cmd *BoolSliceCmd) Val() []bool
- type CFInfo
- type CFInfoCmd
- func (cmd *CFInfoCmd) Args() []interface{}
- func (cmd *CFInfoCmd) Err() error
- func (cmd *CFInfoCmd) FullName() string
- func (cmd *CFInfoCmd) Name() string
- func (cmd *CFInfoCmd) Result() (CFInfo, error)
- func (cmd *CFInfoCmd) SetErr(e error)
- func (cmd *CFInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *CFInfoCmd) SetVal(val CFInfo)
- func (cmd *CFInfoCmd) String() string
- func (cmd *CFInfoCmd) Val() CFInfo
- type CFInsertOptions
- type CFReserveOptions
- type CMSInfo
- type CMSInfoCmd
- func (cmd *CMSInfoCmd) Args() []interface{}
- func (cmd *CMSInfoCmd) Err() error
- func (cmd *CMSInfoCmd) FullName() string
- func (cmd *CMSInfoCmd) Name() string
- func (cmd *CMSInfoCmd) Result() (CMSInfo, error)
- func (cmd *CMSInfoCmd) SetErr(e error)
- func (cmd *CMSInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *CMSInfoCmd) SetVal(val CMSInfo)
- func (cmd *CMSInfoCmd) String() string
- func (cmd *CMSInfoCmd) Val() CMSInfo
- type ChannelOption
- type Client
- func (c Client) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd
- func (c Client) ACLLog(ctx context.Context, count int64) *ACLLogCmd
- func (c Client) ACLLogReset(ctx context.Context) *StatusCmd
- func (hs *Client) AddHook(hook Hook)
- func (c Client) Append(ctx context.Context, key, value string) *IntCmd
- func (c Client) BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Client) BFCard(ctx context.Context, key string) *IntCmd
- func (c Client) BFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Client) BFInfo(ctx context.Context, key string) *BFInfoCmd
- func (c Client) BFInfoArg(ctx context.Context, key, option string) *BFInfoCmd
- func (c Client) BFInfoCapacity(ctx context.Context, key string) *BFInfoCmd
- func (c Client) BFInfoExpansion(ctx context.Context, key string) *BFInfoCmd
- func (c Client) BFInfoFilters(ctx context.Context, key string) *BFInfoCmd
- func (c Client) BFInfoItems(ctx context.Context, key string) *BFInfoCmd
- func (c Client) BFInfoSize(ctx context.Context, key string) *BFInfoCmd
- func (c Client) BFInsert(ctx context.Context, key string, options *BFInsertOptions, ...) *BoolSliceCmd
- func (c Client) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Client) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Client) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Client) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Client) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
- func (c Client) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Client) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
- func (c Client) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Client) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, ...) *KeyValuesCmd
- func (c Client) BLMove(ctx context.Context, source, destination, srcpos, destpos string, ...) *StringCmd
- func (c Client) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Client) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Client) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd
- func (c Client) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, ...) *ZSliceWithKeyCmd
- func (c Client) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Client) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Client) BgRewriteAOF(ctx context.Context) *StatusCmd
- func (c Client) BgSave(ctx context.Context) *StatusCmd
- func (c Client) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd
- func (c Client) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Client) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Client) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Client) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd
- func (c Client) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Client) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Client) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd
- func (c Client) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
- func (c Client) CFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Client) CFAddNX(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Client) CFCount(ctx context.Context, key string, element interface{}) *IntCmd
- func (c Client) CFDel(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Client) CFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Client) CFInfo(ctx context.Context, key string) *CFInfoCmd
- func (c Client) CFInsert(ctx context.Context, key string, options *CFInsertOptions, ...) *BoolSliceCmd
- func (c Client) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, ...) *IntSliceCmd
- func (c Client) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Client) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Client) CFReserve(ctx context.Context, key string, capacity int64) *StatusCmd
- func (c Client) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
- func (c Client) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
- func (c Client) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
- func (c Client) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
- func (c Client) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Client) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Client) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
- func (c Client) CMSInitByDim(ctx context.Context, key string, width, depth int64) *StatusCmd
- func (c Client) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
- func (c Client) CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd
- func (c Client) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
- func (c Client) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Client) ClientGetName(ctx context.Context) *StringCmd
- func (c Client) ClientID(ctx context.Context) *IntCmd
- func (c Client) ClientInfo(ctx context.Context) *ClientInfoCmd
- func (c Client) ClientKill(ctx context.Context, ipPort string) *StatusCmd
- func (c Client) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd
- func (c Client) ClientList(ctx context.Context) *StringCmd
- func (c Client) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd
- func (c Client) ClientUnblock(ctx context.Context, id int64) *IntCmd
- func (c Client) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd
- func (c Client) ClientUnpause(ctx context.Context) *BoolCmd
- func (c Client) Close() error
- func (c Client) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Client) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Client) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd
- func (c Client) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd
- func (c Client) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Client) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Client) ClusterFailover(ctx context.Context) *StatusCmd
- func (c Client) ClusterForget(ctx context.Context, nodeID string) *StatusCmd
- func (c Client) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
- func (c Client) ClusterInfo(ctx context.Context) *StringCmd
- func (c Client) ClusterKeySlot(ctx context.Context, key string) *IntCmd
- func (c Client) ClusterLinks(ctx context.Context) *ClusterLinksCmd
- func (c Client) ClusterMeet(ctx context.Context, host, port string) *StatusCmd
- func (c Client) ClusterMyShardID(ctx context.Context) *StringCmd
- func (c Client) ClusterNodes(ctx context.Context) *StringCmd
- func (c Client) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd
- func (c Client) ClusterResetHard(ctx context.Context) *StatusCmd
- func (c Client) ClusterResetSoft(ctx context.Context) *StatusCmd
- func (c Client) ClusterSaveConfig(ctx context.Context) *StatusCmd
- func (c Client) ClusterShards(ctx context.Context) *ClusterShardsCmd
- func (c Client) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
- func (c Client) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
- func (c Client) Command(ctx context.Context) *CommandsInfoCmd
- func (c Client) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
- func (c Client) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
- func (c Client) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
- func (c Client) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
- func (c Client) ConfigResetStat(ctx context.Context) *StatusCmd
- func (c Client) ConfigRewrite(ctx context.Context) *StatusCmd
- func (c Client) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd
- func (c *Client) Conn() *Conn
- func (c Client) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd
- func (c Client) DBSize(ctx context.Context) *IntCmd
- func (c Client) DebugObject(ctx context.Context, key string) *StringCmd
- func (c Client) Decr(ctx context.Context, key string) *IntCmd
- func (c Client) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd
- func (c Client) Del(ctx context.Context, keys ...string) *IntCmd
- func (c *Client) Do(ctx context.Context, args ...interface{}) *Cmd
- func (c Client) Dump(ctx context.Context, key string) *StringCmd
- func (c Client) Echo(ctx context.Context, message interface{}) *StringCmd
- func (c Client) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Client) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Client) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Client) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Client) Exists(ctx context.Context, keys ...string) *IntCmd
- func (c Client) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Client) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Client) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Client) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Client) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Client) ExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Client) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Client) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Client) FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Client) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Client) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
- func (c Client) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
- func (c Client) FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd
- func (c Client) FTAliasDel(ctx context.Context, alias string) *StatusCmd
- func (c Client) FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd
- func (c Client) FTAlter(ctx context.Context, index string, skipInitialScan bool, ...) *StatusCmd
- func (c Client) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
- func (c Client) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd
- func (c Client) FTCreate(ctx context.Context, index string, options *FTCreateOptions, ...) *StatusCmd
- func (c Client) FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd
- func (c Client) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
- func (c Client) FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Client) FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Client) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
- func (c Client) FTDropIndex(ctx context.Context, index string) *StatusCmd
- func (c Client) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
- func (c Client) FTExplain(ctx context.Context, index string, query string) *StringCmd
- func (c Client) FTExplainCli(ctx context.Context, key, path string) error
- func (c Client) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
- func (c Client) FTInfo(ctx context.Context, index string) *FTInfoCmd
- func (c Client) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
- func (c Client) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
- func (c Client) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
- func (c Client) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
- func (c Client) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
- func (c Client) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
- func (c Client) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, ...) *StatusCmd
- func (c Client) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
- func (c Client) FT_List(ctx context.Context) *StringSliceCmd
- func (c Client) FlushAll(ctx context.Context) *StatusCmd
- func (c Client) FlushAllAsync(ctx context.Context) *StatusCmd
- func (c Client) FlushDB(ctx context.Context) *StatusCmd
- func (c Client) FlushDBAsync(ctx context.Context) *StatusCmd
- func (c Client) FunctionDelete(ctx context.Context, libName string) *StringCmd
- func (c Client) FunctionDump(ctx context.Context) *StringCmd
- func (c Client) FunctionFlush(ctx context.Context) *StringCmd
- func (c Client) FunctionFlushAsync(ctx context.Context) *StringCmd
- func (c Client) FunctionKill(ctx context.Context) *StringCmd
- func (c Client) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
- func (c Client) FunctionLoad(ctx context.Context, code string) *StringCmd
- func (c Client) FunctionLoadReplace(ctx context.Context, code string) *StringCmd
- func (c Client) FunctionRestore(ctx context.Context, libDump string) *StringCmd
- func (c Client) FunctionStats(ctx context.Context) *FunctionStatsCmd
- func (c Client) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
- func (c Client) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd
- func (c Client) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
- func (c Client) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd
- func (c Client) GeoRadius(ctx context.Context, key string, longitude, latitude float64, ...) *GeoLocationCmd
- func (c Client) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd
- func (c Client) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd
- func (c Client) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, ...) *IntCmd
- func (c Client) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
- func (c Client) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
- func (c Client) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
- func (c Client) Get(ctx context.Context, key string) *StringCmd
- func (c Client) GetBit(ctx context.Context, key string, offset int64) *IntCmd
- func (c Client) GetDel(ctx context.Context, key string) *StringCmd
- func (c Client) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd
- func (c Client) GetRange(ctx context.Context, key string, start, end int64) *StringCmd
- func (c Client) GetSet(ctx context.Context, key string, value interface{}) *StringCmd
- func (c Client) HDel(ctx context.Context, key string, fields ...string) *IntCmd
- func (c Client) HExists(ctx context.Context, key, field string) *BoolCmd
- func (c Client) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Client) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Client) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Client) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Client) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Client) HGet(ctx context.Context, key, field string) *StringCmd
- func (c Client) HGetAll(ctx context.Context, key string) *MapStringStringCmd
- func (c Client) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd
- func (c Client) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd
- func (c Client) HKeys(ctx context.Context, key string) *StringSliceCmd
- func (c Client) HLen(ctx context.Context, key string) *IntCmd
- func (c Client) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd
- func (c Client) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd
- func (c Client) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Client) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Client) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Client) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Client) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Client) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Client) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Client) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Client) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
- func (c Client) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Client) HScanNoValues(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Client) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Client) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd
- func (c Client) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Client) HVals(ctx context.Context, key string) *StringSliceCmd
- func (c Client) Incr(ctx context.Context, key string) *IntCmd
- func (c Client) IncrBy(ctx context.Context, key string, value int64) *IntCmd
- func (c Client) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd
- func (c Client) Info(ctx context.Context, sections ...string) *StringCmd
- func (c Client) InfoMap(ctx context.Context, sections ...string) *InfoCmd
- func (c Client) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
- func (c Client) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
- func (c Client) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, ...) *IntSliceCmd
- func (c Client) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
- func (c Client) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
- func (c Client) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
- func (c Client) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
- func (c Client) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
- func (c Client) JSONClear(ctx context.Context, key, path string) *IntCmd
- func (c Client) JSONDebugMemory(ctx context.Context, key, path string) *IntCmd
- func (c Client) JSONDel(ctx context.Context, key, path string) *IntCmd
- func (c Client) JSONForget(ctx context.Context, key, path string) *IntCmd
- func (c Client) JSONGet(ctx context.Context, key string, paths ...string) *JSONCmd
- func (c Client) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
- func (c Client) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
- func (c Client) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd
- func (c Client) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
- func (c Client) JSONMerge(ctx context.Context, key, path string, value string) *StatusCmd
- func (c Client) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd
- func (c Client) JSONObjKeys(ctx context.Context, key, path string) *SliceCmd
- func (c Client) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Client) JSONSet(ctx context.Context, key, path string, value interface{}) *StatusCmd
- func (c Client) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
- func (c Client) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
- func (c Client) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Client) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Client) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
- func (c Client) Keys(ctx context.Context, pattern string) *StringSliceCmd
- func (c Client) LCS(ctx context.Context, q *LCSQuery) *LCSCmd
- func (c Client) LIndex(ctx context.Context, key string, index int64) *StringCmd
- func (c Client) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd
- func (c Client) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Client) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Client) LLen(ctx context.Context, key string) *IntCmd
- func (c Client) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
- func (c Client) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd
- func (c Client) LPop(ctx context.Context, key string) *StringCmd
- func (c Client) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Client) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd
- func (c Client) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd
- func (c Client) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Client) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Client) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Client) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd
- func (c Client) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd
- func (c Client) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd
- func (c Client) LastSave(ctx context.Context) *IntCmd
- func (c Client) MGet(ctx context.Context, keys ...string) *SliceCmd
- func (c Client) MSet(ctx context.Context, values ...interface{}) *StatusCmd
- func (c Client) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd
- func (c Client) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd
- func (c Client) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd
- func (c Client) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
- func (c Client) Monitor(ctx context.Context, ch chan string) *MonitorCmd
- func (c Client) Move(ctx context.Context, key string, db int) *BoolCmd
- func (c Client) ObjectEncoding(ctx context.Context, key string) *StringCmd
- func (c Client) ObjectFreq(ctx context.Context, key string) *IntCmd
- func (c Client) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
- func (c Client) ObjectRefCount(ctx context.Context, key string) *IntCmd
- func (c *Client) Options() *Options
- func (c Client) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Client) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Client) PExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Client) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd
- func (c Client) PFCount(ctx context.Context, keys ...string) *IntCmd
- func (c Client) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd
- func (c *Client) PSubscribe(ctx context.Context, channels ...string) *PubSub
- func (c Client) PTTL(ctx context.Context, key string) *DurationCmd
- func (c Client) Persist(ctx context.Context, key string) *BoolCmd
- func (c Client) Ping(ctx context.Context) *StatusCmd
- func (c *Client) Pipeline() Pipeliner
- func (c *Client) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c *Client) PoolStats() *PoolStats
- func (c *Client) Process(ctx context.Context, cmd Cmder) error
- func (c Client) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Client) PubSubNumPat(ctx context.Context) *IntCmd
- func (c Client) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Client) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Client) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Client) Publish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Client) Quit(_ context.Context) *StatusCmd
- func (c Client) RPop(ctx context.Context, key string) *StringCmd
- func (c Client) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Client) RPopLPush(ctx context.Context, source, destination string) *StringCmd
- func (c Client) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Client) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Client) RandomKey(ctx context.Context) *StringCmd
- func (c Client) ReadOnly(ctx context.Context) *StatusCmd
- func (c Client) ReadWrite(ctx context.Context) *StatusCmd
- func (c Client) Rename(ctx context.Context, key, newkey string) *StatusCmd
- func (c Client) RenameNX(ctx context.Context, key, newkey string) *BoolCmd
- func (c Client) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Client) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Client) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Client) SCard(ctx context.Context, key string) *IntCmd
- func (c Client) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Client) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Client) SInter(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Client) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Client) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Client) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd
- func (c Client) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
- func (c Client) SMembers(ctx context.Context, key string) *StringSliceCmd
- func (c Client) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
- func (c Client) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
- func (c Client) SPop(ctx context.Context, key string) *StringCmd
- func (c Client) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Client) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Client) SRandMember(ctx context.Context, key string) *StringCmd
- func (c Client) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Client) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Client) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c *Client) SSubscribe(ctx context.Context, channels ...string) *PubSub
- func (c Client) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Client) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Client) Save(ctx context.Context) *StatusCmd
- func (c Client) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd
- func (c Client) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd
- func (c Client) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
- func (c Client) ScriptFlush(ctx context.Context) *StatusCmd
- func (c Client) ScriptKill(ctx context.Context) *StatusCmd
- func (c Client) ScriptLoad(ctx context.Context, script string) *StringCmd
- func (c Client) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Client) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
- func (c Client) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd
- func (c Client) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Client) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Client) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd
- func (c Client) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Client) Shutdown(ctx context.Context) *StatusCmd
- func (c Client) ShutdownNoSave(ctx context.Context) *StatusCmd
- func (c Client) ShutdownSave(ctx context.Context) *StatusCmd
- func (c Client) SlaveOf(ctx context.Context, host, port string) *StatusCmd
- func (c Client) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
- func (c Client) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Client) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd
- func (c Client) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Client) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
- func (c Client) StrLen(ctx context.Context, key string) *IntCmd
- func (c Client) String() string
- func (c *Client) Subscribe(ctx context.Context, channels ...string) *PubSub
- func (c Client) Sync(_ context.Context)
- func (c Client) TDigestAdd(ctx context.Context, key string, elements ...float64) *StatusCmd
- func (c Client) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Client) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Client) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Client) TDigestCreate(ctx context.Context, key string) *StatusCmd
- func (c Client) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
- func (c Client) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
- func (c Client) TDigestMax(ctx context.Context, key string) *FloatCmd
- func (c Client) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, ...) *StatusCmd
- func (c Client) TDigestMin(ctx context.Context, key string) *FloatCmd
- func (c Client) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Client) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Client) TDigestReset(ctx context.Context, key string) *StatusCmd
- func (c Client) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Client) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
- func (c Client) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Client) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Client) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Client) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Client) TFunctionDelete(ctx context.Context, libName string) *StatusCmd
- func (c Client) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
- func (c Client) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
- func (c Client) TFunctionLoad(ctx context.Context, lib string) *StatusCmd
- func (c Client) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
- func (c Client) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
- func (c Client) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, ...) *IntCmd
- func (c Client) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
- func (c Client) TSCreate(ctx context.Context, key string) *StatusCmd
- func (c Client) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Client) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Client) TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd
- func (c Client) TSDecrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Client) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Client) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
- func (c Client) TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd
- func (c Client) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
- func (c Client) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
- func (c Client) TSIncrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Client) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Client) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
- func (c Client) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
- func (c Client) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
- func (c Client) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
- func (c Client) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
- func (c Client) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Client) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Client) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Client) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Client) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
- func (c Client) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Client) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Client) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Client) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Client) TTL(ctx context.Context, key string) *DurationCmd
- func (c Client) Time(ctx context.Context) *TimeCmd
- func (c Client) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Client) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Client) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Client) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
- func (c Client) TopKList(ctx context.Context, key string) *StringSliceCmd
- func (c Client) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
- func (c Client) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Client) TopKReserve(ctx context.Context, key string, k int64) *StatusCmd
- func (c Client) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
- func (c Client) Touch(ctx context.Context, keys ...string) *IntCmd
- func (c *Client) TxPipeline() Pipeliner
- func (c *Client) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c Client) Type(ctx context.Context, key string) *StatusCmd
- func (c Client) Unlink(ctx context.Context, keys ...string) *IntCmd
- func (c Client) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd
- func (c Client) WaitAOF(ctx context.Context, numLocal, numSlaves int, timeout time.Duration) *IntCmd
- func (c *Client) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error
- func (c *Client) WithTimeout(timeout time.Duration) *Client
- func (c Client) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd
- func (c Client) XAdd(ctx context.Context, a *XAddArgs) *StringCmd
- func (c Client) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
- func (c Client) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
- func (c Client) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
- func (c Client) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
- func (c Client) XDel(ctx context.Context, stream string, ids ...string) *IntCmd
- func (c Client) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Client) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Client) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Client) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Client) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd
- func (c Client) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Client) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
- func (c Client) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
- func (c Client) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
- func (c Client) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
- func (c Client) XLen(ctx context.Context, stream string) *IntCmd
- func (c Client) XPending(ctx context.Context, stream, group string) *XPendingCmd
- func (c Client) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
- func (c Client) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Client) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Client) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
- func (c Client) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
- func (c Client) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
- func (c Client) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Client) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Client) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd
- func (c Client) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd
- func (c Client) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd
- func (c Client) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd
- func (c Client) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Client) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd
- func (c Client) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd
- func (c Client) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Client) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Client) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Client) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Client) ZCard(ctx context.Context, key string) *IntCmd
- func (c Client) ZCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Client) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Client) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Client) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd
- func (c Client) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd
- func (c Client) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
- func (c Client) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Client) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd
- func (c Client) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd
- func (c Client) ZLexCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Client) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
- func (c Client) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
- func (c Client) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Client) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Client) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Client) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd
- func (c Client) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Client) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
- func (c Client) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
- func (c Client) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Client) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Client) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Client) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
- func (c Client) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Client) ZRank(ctx context.Context, key, member string) *IntCmd
- func (c Client) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Client) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Client) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd
- func (c Client) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd
- func (c Client) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd
- func (c Client) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Client) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Client) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Client) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Client) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Client) ZRevRank(ctx context.Context, key, member string) *IntCmd
- func (c Client) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Client) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Client) ZScore(ctx context.Context, key, member string) *FloatCmd
- func (c Client) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
- func (c Client) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
- func (c Client) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
- type ClientFlags
- type ClientInfo
- type ClientInfoCmd
- func (cmd *ClientInfoCmd) Args() []interface{}
- func (cmd *ClientInfoCmd) Err() error
- func (cmd *ClientInfoCmd) FullName() string
- func (cmd *ClientInfoCmd) Name() string
- func (cmd *ClientInfoCmd) Result() (*ClientInfo, error)
- func (cmd *ClientInfoCmd) SetErr(e error)
- func (cmd *ClientInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ClientInfoCmd) SetVal(val *ClientInfo)
- func (cmd *ClientInfoCmd) String() string
- func (cmd *ClientInfoCmd) Val() *ClientInfo
- type ClusterClient
- func (c ClusterClient) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd
- func (c ClusterClient) ACLLog(ctx context.Context, count int64) *ACLLogCmd
- func (c ClusterClient) ACLLogReset(ctx context.Context) *StatusCmd
- func (hs *ClusterClient) AddHook(hook Hook)
- func (c ClusterClient) Append(ctx context.Context, key, value string) *IntCmd
- func (c ClusterClient) BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c ClusterClient) BFCard(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) BFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c ClusterClient) BFInfo(ctx context.Context, key string) *BFInfoCmd
- func (c ClusterClient) BFInfoArg(ctx context.Context, key, option string) *BFInfoCmd
- func (c ClusterClient) BFInfoCapacity(ctx context.Context, key string) *BFInfoCmd
- func (c ClusterClient) BFInfoExpansion(ctx context.Context, key string) *BFInfoCmd
- func (c ClusterClient) BFInfoFilters(ctx context.Context, key string) *BFInfoCmd
- func (c ClusterClient) BFInfoItems(ctx context.Context, key string) *BFInfoCmd
- func (c ClusterClient) BFInfoSize(ctx context.Context, key string) *BFInfoCmd
- func (c ClusterClient) BFInsert(ctx context.Context, key string, options *BFInsertOptions, ...) *BoolSliceCmd
- func (c ClusterClient) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c ClusterClient) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c ClusterClient) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c ClusterClient) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c ClusterClient) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
- func (c ClusterClient) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c ClusterClient) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
- func (c ClusterClient) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c ClusterClient) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, ...) *KeyValuesCmd
- func (c ClusterClient) BLMove(ctx context.Context, source, destination, srcpos, destpos string, ...) *StringCmd
- func (c ClusterClient) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c ClusterClient) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c ClusterClient) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd
- func (c ClusterClient) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, ...) *ZSliceWithKeyCmd
- func (c ClusterClient) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c ClusterClient) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c ClusterClient) BgRewriteAOF(ctx context.Context) *StatusCmd
- func (c ClusterClient) BgSave(ctx context.Context) *StatusCmd
- func (c ClusterClient) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd
- func (c ClusterClient) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c ClusterClient) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c ClusterClient) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c ClusterClient) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd
- func (c ClusterClient) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c ClusterClient) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c ClusterClient) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd
- func (c ClusterClient) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
- func (c ClusterClient) CFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c ClusterClient) CFAddNX(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c ClusterClient) CFCount(ctx context.Context, key string, element interface{}) *IntCmd
- func (c ClusterClient) CFDel(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c ClusterClient) CFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c ClusterClient) CFInfo(ctx context.Context, key string) *CFInfoCmd
- func (c ClusterClient) CFInsert(ctx context.Context, key string, options *CFInsertOptions, ...) *BoolSliceCmd
- func (c ClusterClient) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, ...) *IntSliceCmd
- func (c ClusterClient) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c ClusterClient) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c ClusterClient) CFReserve(ctx context.Context, key string, capacity int64) *StatusCmd
- func (c ClusterClient) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
- func (c ClusterClient) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
- func (c ClusterClient) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
- func (c ClusterClient) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
- func (c ClusterClient) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c ClusterClient) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c ClusterClient) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
- func (c ClusterClient) CMSInitByDim(ctx context.Context, key string, width, depth int64) *StatusCmd
- func (c ClusterClient) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
- func (c ClusterClient) CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd
- func (c ClusterClient) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
- func (c ClusterClient) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c ClusterClient) ClientGetName(ctx context.Context) *StringCmd
- func (c ClusterClient) ClientID(ctx context.Context) *IntCmd
- func (c ClusterClient) ClientInfo(ctx context.Context) *ClientInfoCmd
- func (c ClusterClient) ClientKill(ctx context.Context, ipPort string) *StatusCmd
- func (c ClusterClient) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd
- func (c ClusterClient) ClientList(ctx context.Context) *StringCmd
- func (c ClusterClient) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd
- func (c ClusterClient) ClientUnblock(ctx context.Context, id int64) *IntCmd
- func (c ClusterClient) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd
- func (c ClusterClient) ClientUnpause(ctx context.Context) *BoolCmd
- func (c *ClusterClient) Close() error
- func (c ClusterClient) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c ClusterClient) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c ClusterClient) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd
- func (c ClusterClient) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd
- func (c ClusterClient) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c ClusterClient) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c ClusterClient) ClusterFailover(ctx context.Context) *StatusCmd
- func (c ClusterClient) ClusterForget(ctx context.Context, nodeID string) *StatusCmd
- func (c ClusterClient) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
- func (c ClusterClient) ClusterInfo(ctx context.Context) *StringCmd
- func (c ClusterClient) ClusterKeySlot(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) ClusterLinks(ctx context.Context) *ClusterLinksCmd
- func (c ClusterClient) ClusterMeet(ctx context.Context, host, port string) *StatusCmd
- func (c ClusterClient) ClusterMyShardID(ctx context.Context) *StringCmd
- func (c ClusterClient) ClusterNodes(ctx context.Context) *StringCmd
- func (c ClusterClient) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd
- func (c ClusterClient) ClusterResetHard(ctx context.Context) *StatusCmd
- func (c ClusterClient) ClusterResetSoft(ctx context.Context) *StatusCmd
- func (c ClusterClient) ClusterSaveConfig(ctx context.Context) *StatusCmd
- func (c ClusterClient) ClusterShards(ctx context.Context) *ClusterShardsCmd
- func (c ClusterClient) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
- func (c ClusterClient) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
- func (c ClusterClient) Command(ctx context.Context) *CommandsInfoCmd
- func (c ClusterClient) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
- func (c ClusterClient) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
- func (c ClusterClient) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
- func (c ClusterClient) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
- func (c ClusterClient) ConfigResetStat(ctx context.Context) *StatusCmd
- func (c ClusterClient) ConfigRewrite(ctx context.Context) *StatusCmd
- func (c ClusterClient) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd
- func (c ClusterClient) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd
- func (c *ClusterClient) DBSize(ctx context.Context) *IntCmd
- func (c ClusterClient) DebugObject(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) Decr(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd
- func (c ClusterClient) Del(ctx context.Context, keys ...string) *IntCmd
- func (c *ClusterClient) Do(ctx context.Context, args ...interface{}) *Cmd
- func (c ClusterClient) Dump(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) Echo(ctx context.Context, message interface{}) *StringCmd
- func (c ClusterClient) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c ClusterClient) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c ClusterClient) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c ClusterClient) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c ClusterClient) Exists(ctx context.Context, keys ...string) *IntCmd
- func (c ClusterClient) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c ClusterClient) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c ClusterClient) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c ClusterClient) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c ClusterClient) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c ClusterClient) ExpireTime(ctx context.Context, key string) *DurationCmd
- func (c ClusterClient) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c ClusterClient) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c ClusterClient) FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c ClusterClient) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c ClusterClient) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
- func (c ClusterClient) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
- func (c ClusterClient) FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd
- func (c ClusterClient) FTAliasDel(ctx context.Context, alias string) *StatusCmd
- func (c ClusterClient) FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd
- func (c ClusterClient) FTAlter(ctx context.Context, index string, skipInitialScan bool, ...) *StatusCmd
- func (c ClusterClient) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
- func (c ClusterClient) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd
- func (c ClusterClient) FTCreate(ctx context.Context, index string, options *FTCreateOptions, ...) *StatusCmd
- func (c ClusterClient) FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd
- func (c ClusterClient) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
- func (c ClusterClient) FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c ClusterClient) FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c ClusterClient) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
- func (c ClusterClient) FTDropIndex(ctx context.Context, index string) *StatusCmd
- func (c ClusterClient) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
- func (c ClusterClient) FTExplain(ctx context.Context, index string, query string) *StringCmd
- func (c ClusterClient) FTExplainCli(ctx context.Context, key, path string) error
- func (c ClusterClient) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
- func (c ClusterClient) FTInfo(ctx context.Context, index string) *FTInfoCmd
- func (c ClusterClient) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
- func (c ClusterClient) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
- func (c ClusterClient) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
- func (c ClusterClient) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
- func (c ClusterClient) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
- func (c ClusterClient) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
- func (c ClusterClient) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, ...) *StatusCmd
- func (c ClusterClient) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
- func (c ClusterClient) FT_List(ctx context.Context) *StringSliceCmd
- func (c ClusterClient) FlushAll(ctx context.Context) *StatusCmd
- func (c ClusterClient) FlushAllAsync(ctx context.Context) *StatusCmd
- func (c ClusterClient) FlushDB(ctx context.Context) *StatusCmd
- func (c ClusterClient) FlushDBAsync(ctx context.Context) *StatusCmd
- func (c *ClusterClient) ForEachMaster(ctx context.Context, fn func(ctx context.Context, client *Client) error) error
- func (c *ClusterClient) ForEachShard(ctx context.Context, fn func(ctx context.Context, client *Client) error) error
- func (c *ClusterClient) ForEachSlave(ctx context.Context, fn func(ctx context.Context, client *Client) error) error
- func (c ClusterClient) FunctionDelete(ctx context.Context, libName string) *StringCmd
- func (c ClusterClient) FunctionDump(ctx context.Context) *StringCmd
- func (c ClusterClient) FunctionFlush(ctx context.Context) *StringCmd
- func (c ClusterClient) FunctionFlushAsync(ctx context.Context) *StringCmd
- func (c ClusterClient) FunctionKill(ctx context.Context) *StringCmd
- func (c ClusterClient) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
- func (c ClusterClient) FunctionLoad(ctx context.Context, code string) *StringCmd
- func (c ClusterClient) FunctionLoadReplace(ctx context.Context, code string) *StringCmd
- func (c ClusterClient) FunctionRestore(ctx context.Context, libDump string) *StringCmd
- func (c ClusterClient) FunctionStats(ctx context.Context) *FunctionStatsCmd
- func (c ClusterClient) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
- func (c ClusterClient) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd
- func (c ClusterClient) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
- func (c ClusterClient) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd
- func (c ClusterClient) GeoRadius(ctx context.Context, key string, longitude, latitude float64, ...) *GeoLocationCmd
- func (c ClusterClient) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd
- func (c ClusterClient) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd
- func (c ClusterClient) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, ...) *IntCmd
- func (c ClusterClient) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
- func (c ClusterClient) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
- func (c ClusterClient) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
- func (c ClusterClient) Get(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) GetBit(ctx context.Context, key string, offset int64) *IntCmd
- func (c ClusterClient) GetDel(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd
- func (c ClusterClient) GetRange(ctx context.Context, key string, start, end int64) *StringCmd
- func (c ClusterClient) GetSet(ctx context.Context, key string, value interface{}) *StringCmd
- func (c ClusterClient) HDel(ctx context.Context, key string, fields ...string) *IntCmd
- func (c ClusterClient) HExists(ctx context.Context, key, field string) *BoolCmd
- func (c ClusterClient) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c ClusterClient) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c ClusterClient) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c ClusterClient) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c ClusterClient) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c ClusterClient) HGet(ctx context.Context, key, field string) *StringCmd
- func (c ClusterClient) HGetAll(ctx context.Context, key string) *MapStringStringCmd
- func (c ClusterClient) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd
- func (c ClusterClient) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd
- func (c ClusterClient) HKeys(ctx context.Context, key string) *StringSliceCmd
- func (c ClusterClient) HLen(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd
- func (c ClusterClient) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd
- func (c ClusterClient) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c ClusterClient) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c ClusterClient) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c ClusterClient) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c ClusterClient) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c ClusterClient) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c ClusterClient) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c ClusterClient) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
- func (c ClusterClient) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
- func (c ClusterClient) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c ClusterClient) HScanNoValues(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c ClusterClient) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c ClusterClient) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd
- func (c ClusterClient) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c ClusterClient) HVals(ctx context.Context, key string) *StringSliceCmd
- func (c ClusterClient) Incr(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) IncrBy(ctx context.Context, key string, value int64) *IntCmd
- func (c ClusterClient) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd
- func (c ClusterClient) Info(ctx context.Context, sections ...string) *StringCmd
- func (c ClusterClient) InfoMap(ctx context.Context, sections ...string) *InfoCmd
- func (c ClusterClient) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
- func (c ClusterClient) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
- func (c ClusterClient) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, ...) *IntSliceCmd
- func (c ClusterClient) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
- func (c ClusterClient) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
- func (c ClusterClient) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
- func (c ClusterClient) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
- func (c ClusterClient) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
- func (c ClusterClient) JSONClear(ctx context.Context, key, path string) *IntCmd
- func (c ClusterClient) JSONDebugMemory(ctx context.Context, key, path string) *IntCmd
- func (c ClusterClient) JSONDel(ctx context.Context, key, path string) *IntCmd
- func (c ClusterClient) JSONForget(ctx context.Context, key, path string) *IntCmd
- func (c ClusterClient) JSONGet(ctx context.Context, key string, paths ...string) *JSONCmd
- func (c ClusterClient) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
- func (c ClusterClient) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
- func (c ClusterClient) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd
- func (c ClusterClient) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
- func (c ClusterClient) JSONMerge(ctx context.Context, key, path string, value string) *StatusCmd
- func (c ClusterClient) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd
- func (c ClusterClient) JSONObjKeys(ctx context.Context, key, path string) *SliceCmd
- func (c ClusterClient) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c ClusterClient) JSONSet(ctx context.Context, key, path string, value interface{}) *StatusCmd
- func (c ClusterClient) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
- func (c ClusterClient) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
- func (c ClusterClient) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c ClusterClient) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c ClusterClient) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
- func (c ClusterClient) Keys(ctx context.Context, pattern string) *StringSliceCmd
- func (c ClusterClient) LCS(ctx context.Context, q *LCSQuery) *LCSCmd
- func (c ClusterClient) LIndex(ctx context.Context, key string, index int64) *StringCmd
- func (c ClusterClient) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd
- func (c ClusterClient) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c ClusterClient) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c ClusterClient) LLen(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
- func (c ClusterClient) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd
- func (c ClusterClient) LPop(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c ClusterClient) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd
- func (c ClusterClient) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd
- func (c ClusterClient) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c ClusterClient) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c ClusterClient) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c ClusterClient) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd
- func (c ClusterClient) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd
- func (c ClusterClient) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd
- func (c ClusterClient) LastSave(ctx context.Context) *IntCmd
- func (c ClusterClient) MGet(ctx context.Context, keys ...string) *SliceCmd
- func (c ClusterClient) MSet(ctx context.Context, values ...interface{}) *StatusCmd
- func (c ClusterClient) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd
- func (c *ClusterClient) MasterForKey(ctx context.Context, key string) (*Client, error)
- func (c ClusterClient) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd
- func (c ClusterClient) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd
- func (c ClusterClient) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
- func (c ClusterClient) Monitor(ctx context.Context, ch chan string) *MonitorCmd
- func (c ClusterClient) Move(ctx context.Context, key string, db int) *BoolCmd
- func (c ClusterClient) ObjectEncoding(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) ObjectFreq(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
- func (c ClusterClient) ObjectRefCount(ctx context.Context, key string) *IntCmd
- func (c *ClusterClient) OnNewNode(fn func(rdb *Client))
- func (c *ClusterClient) Options() *ClusterOptions
- func (c ClusterClient) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c ClusterClient) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c ClusterClient) PExpireTime(ctx context.Context, key string) *DurationCmd
- func (c ClusterClient) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd
- func (c ClusterClient) PFCount(ctx context.Context, keys ...string) *IntCmd
- func (c ClusterClient) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd
- func (c *ClusterClient) PSubscribe(ctx context.Context, channels ...string) *PubSub
- func (c ClusterClient) PTTL(ctx context.Context, key string) *DurationCmd
- func (c ClusterClient) Persist(ctx context.Context, key string) *BoolCmd
- func (c ClusterClient) Ping(ctx context.Context) *StatusCmd
- func (c *ClusterClient) Pipeline() Pipeliner
- func (c *ClusterClient) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c *ClusterClient) PoolStats() *PoolStats
- func (c *ClusterClient) Process(ctx context.Context, cmd Cmder) error
- func (c ClusterClient) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c ClusterClient) PubSubNumPat(ctx context.Context) *IntCmd
- func (c ClusterClient) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c ClusterClient) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c ClusterClient) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c ClusterClient) Publish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c ClusterClient) Quit(_ context.Context) *StatusCmd
- func (c ClusterClient) RPop(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c ClusterClient) RPopLPush(ctx context.Context, source, destination string) *StringCmd
- func (c ClusterClient) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c ClusterClient) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c ClusterClient) RandomKey(ctx context.Context) *StringCmd
- func (c ClusterClient) ReadOnly(ctx context.Context) *StatusCmd
- func (c ClusterClient) ReadWrite(ctx context.Context) *StatusCmd
- func (c *ClusterClient) ReloadState(ctx context.Context)
- func (c ClusterClient) Rename(ctx context.Context, key, newkey string) *StatusCmd
- func (c ClusterClient) RenameNX(ctx context.Context, key, newkey string) *BoolCmd
- func (c ClusterClient) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c ClusterClient) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c ClusterClient) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c ClusterClient) SCard(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c ClusterClient) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c ClusterClient) SInter(ctx context.Context, keys ...string) *StringSliceCmd
- func (c ClusterClient) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c ClusterClient) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c ClusterClient) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd
- func (c ClusterClient) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
- func (c ClusterClient) SMembers(ctx context.Context, key string) *StringSliceCmd
- func (c ClusterClient) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
- func (c ClusterClient) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
- func (c ClusterClient) SPop(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c ClusterClient) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c ClusterClient) SRandMember(ctx context.Context, key string) *StringCmd
- func (c ClusterClient) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c ClusterClient) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c ClusterClient) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c *ClusterClient) SSubscribe(ctx context.Context, channels ...string) *PubSub
- func (c ClusterClient) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
- func (c ClusterClient) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c ClusterClient) Save(ctx context.Context) *StatusCmd
- func (c ClusterClient) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd
- func (c ClusterClient) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd
- func (c *ClusterClient) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
- func (c *ClusterClient) ScriptFlush(ctx context.Context) *StatusCmd
- func (c ClusterClient) ScriptKill(ctx context.Context) *StatusCmd
- func (c *ClusterClient) ScriptLoad(ctx context.Context, script string) *StringCmd
- func (c ClusterClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c ClusterClient) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
- func (c ClusterClient) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd
- func (c ClusterClient) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c ClusterClient) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c ClusterClient) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd
- func (c ClusterClient) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c ClusterClient) Shutdown(ctx context.Context) *StatusCmd
- func (c ClusterClient) ShutdownNoSave(ctx context.Context) *StatusCmd
- func (c ClusterClient) ShutdownSave(ctx context.Context) *StatusCmd
- func (c *ClusterClient) SlaveForKey(ctx context.Context, key string) (*Client, error)
- func (c ClusterClient) SlaveOf(ctx context.Context, host, port string) *StatusCmd
- func (c ClusterClient) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
- func (c ClusterClient) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c ClusterClient) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd
- func (c ClusterClient) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c ClusterClient) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
- func (c ClusterClient) StrLen(ctx context.Context, key string) *IntCmd
- func (c *ClusterClient) Subscribe(ctx context.Context, channels ...string) *PubSub
- func (c ClusterClient) Sync(_ context.Context)
- func (c ClusterClient) TDigestAdd(ctx context.Context, key string, elements ...float64) *StatusCmd
- func (c ClusterClient) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c ClusterClient) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c ClusterClient) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c ClusterClient) TDigestCreate(ctx context.Context, key string) *StatusCmd
- func (c ClusterClient) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
- func (c ClusterClient) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
- func (c ClusterClient) TDigestMax(ctx context.Context, key string) *FloatCmd
- func (c ClusterClient) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, ...) *StatusCmd
- func (c ClusterClient) TDigestMin(ctx context.Context, key string) *FloatCmd
- func (c ClusterClient) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c ClusterClient) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c ClusterClient) TDigestReset(ctx context.Context, key string) *StatusCmd
- func (c ClusterClient) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c ClusterClient) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
- func (c ClusterClient) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c ClusterClient) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c ClusterClient) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c ClusterClient) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c ClusterClient) TFunctionDelete(ctx context.Context, libName string) *StatusCmd
- func (c ClusterClient) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
- func (c ClusterClient) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
- func (c ClusterClient) TFunctionLoad(ctx context.Context, lib string) *StatusCmd
- func (c ClusterClient) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
- func (c ClusterClient) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
- func (c ClusterClient) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, ...) *IntCmd
- func (c ClusterClient) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
- func (c ClusterClient) TSCreate(ctx context.Context, key string) *StatusCmd
- func (c ClusterClient) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c ClusterClient) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c ClusterClient) TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd
- func (c ClusterClient) TSDecrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c ClusterClient) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c ClusterClient) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
- func (c ClusterClient) TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd
- func (c ClusterClient) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
- func (c ClusterClient) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
- func (c ClusterClient) TSIncrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c ClusterClient) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c ClusterClient) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
- func (c ClusterClient) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
- func (c ClusterClient) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
- func (c ClusterClient) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
- func (c ClusterClient) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
- func (c ClusterClient) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c ClusterClient) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c ClusterClient) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c ClusterClient) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c ClusterClient) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
- func (c ClusterClient) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c ClusterClient) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c ClusterClient) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c ClusterClient) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c ClusterClient) TTL(ctx context.Context, key string) *DurationCmd
- func (c ClusterClient) Time(ctx context.Context) *TimeCmd
- func (c ClusterClient) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c ClusterClient) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c ClusterClient) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c ClusterClient) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
- func (c ClusterClient) TopKList(ctx context.Context, key string) *StringSliceCmd
- func (c ClusterClient) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
- func (c ClusterClient) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c ClusterClient) TopKReserve(ctx context.Context, key string, k int64) *StatusCmd
- func (c ClusterClient) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
- func (c ClusterClient) Touch(ctx context.Context, keys ...string) *IntCmd
- func (c *ClusterClient) TxPipeline() Pipeliner
- func (c *ClusterClient) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c ClusterClient) Type(ctx context.Context, key string) *StatusCmd
- func (c ClusterClient) Unlink(ctx context.Context, keys ...string) *IntCmd
- func (c ClusterClient) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd
- func (c ClusterClient) WaitAOF(ctx context.Context, numLocal, numSlaves int, timeout time.Duration) *IntCmd
- func (c *ClusterClient) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error
- func (c ClusterClient) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd
- func (c ClusterClient) XAdd(ctx context.Context, a *XAddArgs) *StringCmd
- func (c ClusterClient) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
- func (c ClusterClient) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
- func (c ClusterClient) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
- func (c ClusterClient) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
- func (c ClusterClient) XDel(ctx context.Context, stream string, ids ...string) *IntCmd
- func (c ClusterClient) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd
- func (c ClusterClient) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c ClusterClient) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd
- func (c ClusterClient) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c ClusterClient) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd
- func (c ClusterClient) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd
- func (c ClusterClient) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
- func (c ClusterClient) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
- func (c ClusterClient) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
- func (c ClusterClient) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
- func (c ClusterClient) XLen(ctx context.Context, stream string) *IntCmd
- func (c ClusterClient) XPending(ctx context.Context, stream, group string) *XPendingCmd
- func (c ClusterClient) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
- func (c ClusterClient) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c ClusterClient) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c ClusterClient) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
- func (c ClusterClient) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
- func (c ClusterClient) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
- func (c ClusterClient) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c ClusterClient) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c ClusterClient) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd
- func (c ClusterClient) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd
- func (c ClusterClient) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd
- func (c ClusterClient) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd
- func (c ClusterClient) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd
- func (c ClusterClient) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd
- func (c ClusterClient) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd
- func (c ClusterClient) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c ClusterClient) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c ClusterClient) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c ClusterClient) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c ClusterClient) ZCard(ctx context.Context, key string) *IntCmd
- func (c ClusterClient) ZCount(ctx context.Context, key, min, max string) *IntCmd
- func (c ClusterClient) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c ClusterClient) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c ClusterClient) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd
- func (c ClusterClient) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd
- func (c ClusterClient) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
- func (c ClusterClient) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c ClusterClient) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd
- func (c ClusterClient) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd
- func (c ClusterClient) ZLexCount(ctx context.Context, key, min, max string) *IntCmd
- func (c ClusterClient) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
- func (c ClusterClient) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
- func (c ClusterClient) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c ClusterClient) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c ClusterClient) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
- func (c ClusterClient) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd
- func (c ClusterClient) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c ClusterClient) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
- func (c ClusterClient) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
- func (c ClusterClient) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c ClusterClient) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c ClusterClient) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c ClusterClient) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
- func (c ClusterClient) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c ClusterClient) ZRank(ctx context.Context, key, member string) *IntCmd
- func (c ClusterClient) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c ClusterClient) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c ClusterClient) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd
- func (c ClusterClient) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd
- func (c ClusterClient) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd
- func (c ClusterClient) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c ClusterClient) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c ClusterClient) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c ClusterClient) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c ClusterClient) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c ClusterClient) ZRevRank(ctx context.Context, key, member string) *IntCmd
- func (c ClusterClient) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c ClusterClient) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c ClusterClient) ZScore(ctx context.Context, key, member string) *FloatCmd
- func (c ClusterClient) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
- func (c ClusterClient) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
- func (c ClusterClient) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
- type ClusterCmdable
- type ClusterLink
- type ClusterLinksCmd
- func (cmd *ClusterLinksCmd) Args() []interface{}
- func (cmd *ClusterLinksCmd) Err() error
- func (cmd *ClusterLinksCmd) FullName() string
- func (cmd *ClusterLinksCmd) Name() string
- func (cmd *ClusterLinksCmd) Result() ([]ClusterLink, error)
- func (cmd *ClusterLinksCmd) SetErr(e error)
- func (cmd *ClusterLinksCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ClusterLinksCmd) SetVal(val []ClusterLink)
- func (cmd *ClusterLinksCmd) String() string
- func (cmd *ClusterLinksCmd) Val() []ClusterLink
- type ClusterNode
- type ClusterOptions
- type ClusterShard
- type ClusterShardsCmd
- func (cmd *ClusterShardsCmd) Args() []interface{}
- func (cmd *ClusterShardsCmd) Err() error
- func (cmd *ClusterShardsCmd) FullName() string
- func (cmd *ClusterShardsCmd) Name() string
- func (cmd *ClusterShardsCmd) Result() ([]ClusterShard, error)
- func (cmd *ClusterShardsCmd) SetErr(e error)
- func (cmd *ClusterShardsCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ClusterShardsCmd) SetVal(val []ClusterShard)
- func (cmd *ClusterShardsCmd) String() string
- func (cmd *ClusterShardsCmd) Val() []ClusterShard
- type ClusterSlot
- type ClusterSlotsCmd
- func (cmd *ClusterSlotsCmd) Args() []interface{}
- func (cmd *ClusterSlotsCmd) Err() error
- func (cmd *ClusterSlotsCmd) FullName() string
- func (cmd *ClusterSlotsCmd) Name() string
- func (cmd *ClusterSlotsCmd) Result() ([]ClusterSlot, error)
- func (cmd *ClusterSlotsCmd) SetErr(e error)
- func (cmd *ClusterSlotsCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ClusterSlotsCmd) SetVal(val []ClusterSlot)
- func (cmd *ClusterSlotsCmd) String() string
- func (cmd *ClusterSlotsCmd) Val() []ClusterSlot
- type Cmd
- func (cmd *Cmd) Args() []interface{}
- func (cmd *Cmd) Bool() (bool, error)
- func (cmd *Cmd) BoolSlice() ([]bool, error)
- func (cmd *Cmd) Err() error
- func (cmd *Cmd) Float32() (float32, error)
- func (cmd *Cmd) Float32Slice() ([]float32, error)
- func (cmd *Cmd) Float64() (float64, error)
- func (cmd *Cmd) Float64Slice() ([]float64, error)
- func (cmd *Cmd) FullName() string
- func (cmd *Cmd) Int() (int, error)
- func (cmd *Cmd) Int64() (int64, error)
- func (cmd *Cmd) Int64Slice() ([]int64, error)
- func (cmd *Cmd) Name() string
- func (cmd *Cmd) Result() (interface{}, error)
- func (cmd *Cmd) SetErr(e error)
- func (cmd *Cmd) SetFirstKeyPos(keyPos int8)
- func (cmd *Cmd) SetVal(val interface{})
- func (cmd *Cmd) Slice() ([]interface{}, error)
- func (cmd *Cmd) String() string
- func (cmd *Cmd) StringSlice() ([]string, error)
- func (cmd *Cmd) Text() (string, error)
- func (cmd *Cmd) Uint64() (uint64, error)
- func (cmd *Cmd) Uint64Slice() ([]uint64, error)
- func (cmd *Cmd) Val() interface{}
- type Cmdable
- type Cmder
- type CommandInfo
- type CommandsInfoCmd
- func (cmd *CommandsInfoCmd) Args() []interface{}
- func (cmd *CommandsInfoCmd) Err() error
- func (cmd *CommandsInfoCmd) FullName() string
- func (cmd *CommandsInfoCmd) Name() string
- func (cmd *CommandsInfoCmd) Result() (map[string]*CommandInfo, error)
- func (cmd *CommandsInfoCmd) SetErr(e error)
- func (cmd *CommandsInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *CommandsInfoCmd) SetVal(val map[string]*CommandInfo)
- func (cmd *CommandsInfoCmd) String() string
- func (cmd *CommandsInfoCmd) Val() map[string]*CommandInfo
- type Conn
- func (c Conn) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd
- func (c Conn) ACLLog(ctx context.Context, count int64) *ACLLogCmd
- func (c Conn) ACLLogReset(ctx context.Context) *StatusCmd
- func (hs *Conn) AddHook(hook Hook)
- func (c Conn) Append(ctx context.Context, key, value string) *IntCmd
- func (c Conn) Auth(ctx context.Context, password string) *StatusCmd
- func (c Conn) AuthACL(ctx context.Context, username, password string) *StatusCmd
- func (c Conn) BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Conn) BFCard(ctx context.Context, key string) *IntCmd
- func (c Conn) BFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Conn) BFInfo(ctx context.Context, key string) *BFInfoCmd
- func (c Conn) BFInfoArg(ctx context.Context, key, option string) *BFInfoCmd
- func (c Conn) BFInfoCapacity(ctx context.Context, key string) *BFInfoCmd
- func (c Conn) BFInfoExpansion(ctx context.Context, key string) *BFInfoCmd
- func (c Conn) BFInfoFilters(ctx context.Context, key string) *BFInfoCmd
- func (c Conn) BFInfoItems(ctx context.Context, key string) *BFInfoCmd
- func (c Conn) BFInfoSize(ctx context.Context, key string) *BFInfoCmd
- func (c Conn) BFInsert(ctx context.Context, key string, options *BFInsertOptions, ...) *BoolSliceCmd
- func (c Conn) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Conn) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Conn) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Conn) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Conn) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
- func (c Conn) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Conn) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
- func (c Conn) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Conn) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, ...) *KeyValuesCmd
- func (c Conn) BLMove(ctx context.Context, source, destination, srcpos, destpos string, ...) *StringCmd
- func (c Conn) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Conn) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Conn) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd
- func (c Conn) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, ...) *ZSliceWithKeyCmd
- func (c Conn) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Conn) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Conn) BgRewriteAOF(ctx context.Context) *StatusCmd
- func (c Conn) BgSave(ctx context.Context) *StatusCmd
- func (c Conn) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd
- func (c Conn) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Conn) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Conn) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Conn) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd
- func (c Conn) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Conn) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Conn) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd
- func (c Conn) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
- func (c Conn) CFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Conn) CFAddNX(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Conn) CFCount(ctx context.Context, key string, element interface{}) *IntCmd
- func (c Conn) CFDel(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Conn) CFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Conn) CFInfo(ctx context.Context, key string) *CFInfoCmd
- func (c Conn) CFInsert(ctx context.Context, key string, options *CFInsertOptions, ...) *BoolSliceCmd
- func (c Conn) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, ...) *IntSliceCmd
- func (c Conn) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Conn) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Conn) CFReserve(ctx context.Context, key string, capacity int64) *StatusCmd
- func (c Conn) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
- func (c Conn) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
- func (c Conn) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
- func (c Conn) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
- func (c Conn) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Conn) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Conn) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
- func (c Conn) CMSInitByDim(ctx context.Context, key string, width, depth int64) *StatusCmd
- func (c Conn) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
- func (c Conn) CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd
- func (c Conn) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
- func (c Conn) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Conn) ClientGetName(ctx context.Context) *StringCmd
- func (c Conn) ClientID(ctx context.Context) *IntCmd
- func (c Conn) ClientInfo(ctx context.Context) *ClientInfoCmd
- func (c Conn) ClientKill(ctx context.Context, ipPort string) *StatusCmd
- func (c Conn) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd
- func (c Conn) ClientList(ctx context.Context) *StringCmd
- func (c Conn) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd
- func (c Conn) ClientSetInfo(ctx context.Context, info LibraryInfo) *StatusCmd
- func (c Conn) ClientSetName(ctx context.Context, name string) *BoolCmd
- func (c Conn) ClientUnblock(ctx context.Context, id int64) *IntCmd
- func (c Conn) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd
- func (c Conn) ClientUnpause(ctx context.Context) *BoolCmd
- func (c *Conn) Close() error
- func (c Conn) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Conn) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Conn) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd
- func (c Conn) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd
- func (c Conn) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Conn) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Conn) ClusterFailover(ctx context.Context) *StatusCmd
- func (c Conn) ClusterForget(ctx context.Context, nodeID string) *StatusCmd
- func (c Conn) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
- func (c Conn) ClusterInfo(ctx context.Context) *StringCmd
- func (c Conn) ClusterKeySlot(ctx context.Context, key string) *IntCmd
- func (c Conn) ClusterLinks(ctx context.Context) *ClusterLinksCmd
- func (c Conn) ClusterMeet(ctx context.Context, host, port string) *StatusCmd
- func (c Conn) ClusterMyShardID(ctx context.Context) *StringCmd
- func (c Conn) ClusterNodes(ctx context.Context) *StringCmd
- func (c Conn) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd
- func (c Conn) ClusterResetHard(ctx context.Context) *StatusCmd
- func (c Conn) ClusterResetSoft(ctx context.Context) *StatusCmd
- func (c Conn) ClusterSaveConfig(ctx context.Context) *StatusCmd
- func (c Conn) ClusterShards(ctx context.Context) *ClusterShardsCmd
- func (c Conn) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
- func (c Conn) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
- func (c Conn) Command(ctx context.Context) *CommandsInfoCmd
- func (c Conn) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
- func (c Conn) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
- func (c Conn) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
- func (c Conn) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
- func (c Conn) ConfigResetStat(ctx context.Context) *StatusCmd
- func (c Conn) ConfigRewrite(ctx context.Context) *StatusCmd
- func (c Conn) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd
- func (c Conn) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd
- func (c Conn) DBSize(ctx context.Context) *IntCmd
- func (c Conn) DebugObject(ctx context.Context, key string) *StringCmd
- func (c Conn) Decr(ctx context.Context, key string) *IntCmd
- func (c Conn) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd
- func (c Conn) Del(ctx context.Context, keys ...string) *IntCmd
- func (c Conn) Dump(ctx context.Context, key string) *StringCmd
- func (c Conn) Echo(ctx context.Context, message interface{}) *StringCmd
- func (c Conn) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Conn) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Conn) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Conn) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Conn) Exists(ctx context.Context, keys ...string) *IntCmd
- func (c Conn) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Conn) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Conn) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Conn) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Conn) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Conn) ExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Conn) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Conn) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Conn) FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Conn) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Conn) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
- func (c Conn) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
- func (c Conn) FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd
- func (c Conn) FTAliasDel(ctx context.Context, alias string) *StatusCmd
- func (c Conn) FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd
- func (c Conn) FTAlter(ctx context.Context, index string, skipInitialScan bool, ...) *StatusCmd
- func (c Conn) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
- func (c Conn) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd
- func (c Conn) FTCreate(ctx context.Context, index string, options *FTCreateOptions, ...) *StatusCmd
- func (c Conn) FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd
- func (c Conn) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
- func (c Conn) FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Conn) FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Conn) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
- func (c Conn) FTDropIndex(ctx context.Context, index string) *StatusCmd
- func (c Conn) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
- func (c Conn) FTExplain(ctx context.Context, index string, query string) *StringCmd
- func (c Conn) FTExplainCli(ctx context.Context, key, path string) error
- func (c Conn) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
- func (c Conn) FTInfo(ctx context.Context, index string) *FTInfoCmd
- func (c Conn) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
- func (c Conn) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
- func (c Conn) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
- func (c Conn) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
- func (c Conn) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
- func (c Conn) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
- func (c Conn) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, ...) *StatusCmd
- func (c Conn) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
- func (c Conn) FT_List(ctx context.Context) *StringSliceCmd
- func (c Conn) FlushAll(ctx context.Context) *StatusCmd
- func (c Conn) FlushAllAsync(ctx context.Context) *StatusCmd
- func (c Conn) FlushDB(ctx context.Context) *StatusCmd
- func (c Conn) FlushDBAsync(ctx context.Context) *StatusCmd
- func (c Conn) FunctionDelete(ctx context.Context, libName string) *StringCmd
- func (c Conn) FunctionDump(ctx context.Context) *StringCmd
- func (c Conn) FunctionFlush(ctx context.Context) *StringCmd
- func (c Conn) FunctionFlushAsync(ctx context.Context) *StringCmd
- func (c Conn) FunctionKill(ctx context.Context) *StringCmd
- func (c Conn) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
- func (c Conn) FunctionLoad(ctx context.Context, code string) *StringCmd
- func (c Conn) FunctionLoadReplace(ctx context.Context, code string) *StringCmd
- func (c Conn) FunctionRestore(ctx context.Context, libDump string) *StringCmd
- func (c Conn) FunctionStats(ctx context.Context) *FunctionStatsCmd
- func (c Conn) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
- func (c Conn) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd
- func (c Conn) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
- func (c Conn) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd
- func (c Conn) GeoRadius(ctx context.Context, key string, longitude, latitude float64, ...) *GeoLocationCmd
- func (c Conn) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd
- func (c Conn) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd
- func (c Conn) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, ...) *IntCmd
- func (c Conn) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
- func (c Conn) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
- func (c Conn) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
- func (c Conn) Get(ctx context.Context, key string) *StringCmd
- func (c Conn) GetBit(ctx context.Context, key string, offset int64) *IntCmd
- func (c Conn) GetDel(ctx context.Context, key string) *StringCmd
- func (c Conn) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd
- func (c Conn) GetRange(ctx context.Context, key string, start, end int64) *StringCmd
- func (c Conn) GetSet(ctx context.Context, key string, value interface{}) *StringCmd
- func (c Conn) HDel(ctx context.Context, key string, fields ...string) *IntCmd
- func (c Conn) HExists(ctx context.Context, key, field string) *BoolCmd
- func (c Conn) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Conn) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Conn) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Conn) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Conn) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Conn) HGet(ctx context.Context, key, field string) *StringCmd
- func (c Conn) HGetAll(ctx context.Context, key string) *MapStringStringCmd
- func (c Conn) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd
- func (c Conn) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd
- func (c Conn) HKeys(ctx context.Context, key string) *StringSliceCmd
- func (c Conn) HLen(ctx context.Context, key string) *IntCmd
- func (c Conn) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd
- func (c Conn) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd
- func (c Conn) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Conn) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Conn) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Conn) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Conn) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Conn) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Conn) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Conn) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Conn) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
- func (c Conn) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Conn) HScanNoValues(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Conn) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Conn) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd
- func (c Conn) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Conn) HVals(ctx context.Context, key string) *StringSliceCmd
- func (c Conn) Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd
- func (c Conn) Incr(ctx context.Context, key string) *IntCmd
- func (c Conn) IncrBy(ctx context.Context, key string, value int64) *IntCmd
- func (c Conn) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd
- func (c Conn) Info(ctx context.Context, sections ...string) *StringCmd
- func (c Conn) InfoMap(ctx context.Context, sections ...string) *InfoCmd
- func (c Conn) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
- func (c Conn) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
- func (c Conn) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, ...) *IntSliceCmd
- func (c Conn) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
- func (c Conn) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
- func (c Conn) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
- func (c Conn) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
- func (c Conn) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
- func (c Conn) JSONClear(ctx context.Context, key, path string) *IntCmd
- func (c Conn) JSONDebugMemory(ctx context.Context, key, path string) *IntCmd
- func (c Conn) JSONDel(ctx context.Context, key, path string) *IntCmd
- func (c Conn) JSONForget(ctx context.Context, key, path string) *IntCmd
- func (c Conn) JSONGet(ctx context.Context, key string, paths ...string) *JSONCmd
- func (c Conn) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
- func (c Conn) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
- func (c Conn) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd
- func (c Conn) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
- func (c Conn) JSONMerge(ctx context.Context, key, path string, value string) *StatusCmd
- func (c Conn) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd
- func (c Conn) JSONObjKeys(ctx context.Context, key, path string) *SliceCmd
- func (c Conn) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Conn) JSONSet(ctx context.Context, key, path string, value interface{}) *StatusCmd
- func (c Conn) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
- func (c Conn) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
- func (c Conn) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Conn) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Conn) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
- func (c Conn) Keys(ctx context.Context, pattern string) *StringSliceCmd
- func (c Conn) LCS(ctx context.Context, q *LCSQuery) *LCSCmd
- func (c Conn) LIndex(ctx context.Context, key string, index int64) *StringCmd
- func (c Conn) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd
- func (c Conn) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Conn) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Conn) LLen(ctx context.Context, key string) *IntCmd
- func (c Conn) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
- func (c Conn) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd
- func (c Conn) LPop(ctx context.Context, key string) *StringCmd
- func (c Conn) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Conn) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd
- func (c Conn) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd
- func (c Conn) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Conn) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Conn) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Conn) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd
- func (c Conn) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd
- func (c Conn) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd
- func (c Conn) LastSave(ctx context.Context) *IntCmd
- func (c Conn) MGet(ctx context.Context, keys ...string) *SliceCmd
- func (c Conn) MSet(ctx context.Context, values ...interface{}) *StatusCmd
- func (c Conn) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd
- func (c Conn) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd
- func (c Conn) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd
- func (c Conn) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
- func (c Conn) Monitor(ctx context.Context, ch chan string) *MonitorCmd
- func (c Conn) Move(ctx context.Context, key string, db int) *BoolCmd
- func (c Conn) ObjectEncoding(ctx context.Context, key string) *StringCmd
- func (c Conn) ObjectFreq(ctx context.Context, key string) *IntCmd
- func (c Conn) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
- func (c Conn) ObjectRefCount(ctx context.Context, key string) *IntCmd
- func (c Conn) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Conn) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Conn) PExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Conn) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd
- func (c Conn) PFCount(ctx context.Context, keys ...string) *IntCmd
- func (c Conn) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd
- func (c Conn) PTTL(ctx context.Context, key string) *DurationCmd
- func (c Conn) Persist(ctx context.Context, key string) *BoolCmd
- func (c Conn) Ping(ctx context.Context) *StatusCmd
- func (c *Conn) Pipeline() Pipeliner
- func (c *Conn) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c *Conn) Process(ctx context.Context, cmd Cmder) error
- func (c Conn) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Conn) PubSubNumPat(ctx context.Context) *IntCmd
- func (c Conn) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Conn) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Conn) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Conn) Publish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Conn) Quit(_ context.Context) *StatusCmd
- func (c Conn) RPop(ctx context.Context, key string) *StringCmd
- func (c Conn) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Conn) RPopLPush(ctx context.Context, source, destination string) *StringCmd
- func (c Conn) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Conn) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Conn) RandomKey(ctx context.Context) *StringCmd
- func (c Conn) ReadOnly(ctx context.Context) *StatusCmd
- func (c Conn) ReadWrite(ctx context.Context) *StatusCmd
- func (c Conn) Rename(ctx context.Context, key, newkey string) *StatusCmd
- func (c Conn) RenameNX(ctx context.Context, key, newkey string) *BoolCmd
- func (c Conn) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Conn) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Conn) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Conn) SCard(ctx context.Context, key string) *IntCmd
- func (c Conn) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Conn) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Conn) SInter(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Conn) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Conn) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Conn) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd
- func (c Conn) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
- func (c Conn) SMembers(ctx context.Context, key string) *StringSliceCmd
- func (c Conn) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
- func (c Conn) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
- func (c Conn) SPop(ctx context.Context, key string) *StringCmd
- func (c Conn) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Conn) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Conn) SRandMember(ctx context.Context, key string) *StringCmd
- func (c Conn) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Conn) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Conn) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Conn) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Conn) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Conn) Save(ctx context.Context) *StatusCmd
- func (c Conn) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd
- func (c Conn) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd
- func (c Conn) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
- func (c Conn) ScriptFlush(ctx context.Context) *StatusCmd
- func (c Conn) ScriptKill(ctx context.Context) *StatusCmd
- func (c Conn) ScriptLoad(ctx context.Context, script string) *StringCmd
- func (c Conn) Select(ctx context.Context, index int) *StatusCmd
- func (c Conn) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Conn) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
- func (c Conn) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd
- func (c Conn) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Conn) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Conn) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd
- func (c Conn) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Conn) Shutdown(ctx context.Context) *StatusCmd
- func (c Conn) ShutdownNoSave(ctx context.Context) *StatusCmd
- func (c Conn) ShutdownSave(ctx context.Context) *StatusCmd
- func (c Conn) SlaveOf(ctx context.Context, host, port string) *StatusCmd
- func (c Conn) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
- func (c Conn) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Conn) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd
- func (c Conn) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Conn) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
- func (c Conn) StrLen(ctx context.Context, key string) *IntCmd
- func (c *Conn) String() string
- func (c Conn) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd
- func (c Conn) Sync(_ context.Context)
- func (c Conn) TDigestAdd(ctx context.Context, key string, elements ...float64) *StatusCmd
- func (c Conn) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Conn) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Conn) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Conn) TDigestCreate(ctx context.Context, key string) *StatusCmd
- func (c Conn) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
- func (c Conn) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
- func (c Conn) TDigestMax(ctx context.Context, key string) *FloatCmd
- func (c Conn) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, ...) *StatusCmd
- func (c Conn) TDigestMin(ctx context.Context, key string) *FloatCmd
- func (c Conn) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Conn) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Conn) TDigestReset(ctx context.Context, key string) *StatusCmd
- func (c Conn) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Conn) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
- func (c Conn) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Conn) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Conn) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Conn) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Conn) TFunctionDelete(ctx context.Context, libName string) *StatusCmd
- func (c Conn) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
- func (c Conn) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
- func (c Conn) TFunctionLoad(ctx context.Context, lib string) *StatusCmd
- func (c Conn) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
- func (c Conn) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
- func (c Conn) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, ...) *IntCmd
- func (c Conn) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
- func (c Conn) TSCreate(ctx context.Context, key string) *StatusCmd
- func (c Conn) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Conn) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Conn) TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd
- func (c Conn) TSDecrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Conn) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Conn) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
- func (c Conn) TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd
- func (c Conn) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
- func (c Conn) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
- func (c Conn) TSIncrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Conn) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Conn) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
- func (c Conn) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
- func (c Conn) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
- func (c Conn) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
- func (c Conn) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
- func (c Conn) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Conn) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Conn) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Conn) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Conn) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
- func (c Conn) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Conn) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Conn) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Conn) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Conn) TTL(ctx context.Context, key string) *DurationCmd
- func (c Conn) Time(ctx context.Context) *TimeCmd
- func (c Conn) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Conn) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Conn) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Conn) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
- func (c Conn) TopKList(ctx context.Context, key string) *StringSliceCmd
- func (c Conn) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
- func (c Conn) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Conn) TopKReserve(ctx context.Context, key string, k int64) *StatusCmd
- func (c Conn) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
- func (c Conn) Touch(ctx context.Context, keys ...string) *IntCmd
- func (c *Conn) TxPipeline() Pipeliner
- func (c *Conn) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c Conn) Type(ctx context.Context, key string) *StatusCmd
- func (c Conn) Unlink(ctx context.Context, keys ...string) *IntCmd
- func (c Conn) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd
- func (c Conn) WaitAOF(ctx context.Context, numLocal, numSlaves int, timeout time.Duration) *IntCmd
- func (c Conn) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd
- func (c Conn) XAdd(ctx context.Context, a *XAddArgs) *StringCmd
- func (c Conn) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
- func (c Conn) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
- func (c Conn) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
- func (c Conn) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
- func (c Conn) XDel(ctx context.Context, stream string, ids ...string) *IntCmd
- func (c Conn) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Conn) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Conn) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Conn) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Conn) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd
- func (c Conn) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Conn) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
- func (c Conn) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
- func (c Conn) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
- func (c Conn) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
- func (c Conn) XLen(ctx context.Context, stream string) *IntCmd
- func (c Conn) XPending(ctx context.Context, stream, group string) *XPendingCmd
- func (c Conn) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
- func (c Conn) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Conn) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Conn) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
- func (c Conn) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
- func (c Conn) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
- func (c Conn) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Conn) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Conn) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd
- func (c Conn) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd
- func (c Conn) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd
- func (c Conn) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd
- func (c Conn) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Conn) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd
- func (c Conn) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd
- func (c Conn) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Conn) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Conn) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Conn) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Conn) ZCard(ctx context.Context, key string) *IntCmd
- func (c Conn) ZCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Conn) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Conn) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Conn) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd
- func (c Conn) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd
- func (c Conn) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
- func (c Conn) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Conn) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd
- func (c Conn) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd
- func (c Conn) ZLexCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Conn) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
- func (c Conn) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
- func (c Conn) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Conn) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Conn) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Conn) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd
- func (c Conn) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Conn) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
- func (c Conn) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
- func (c Conn) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Conn) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Conn) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Conn) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
- func (c Conn) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Conn) ZRank(ctx context.Context, key, member string) *IntCmd
- func (c Conn) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Conn) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Conn) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd
- func (c Conn) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd
- func (c Conn) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd
- func (c Conn) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Conn) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Conn) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Conn) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Conn) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Conn) ZRevRank(ctx context.Context, key, member string) *IntCmd
- func (c Conn) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Conn) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Conn) ZScore(ctx context.Context, key, member string) *FloatCmd
- func (c Conn) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
- func (c Conn) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
- func (c Conn) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
- type ConsistentHash
- type CursorStats
- type DialHook
- type Document
- type DurationCmd
- func (cmd *DurationCmd) Args() []interface{}
- func (cmd *DurationCmd) Err() error
- func (cmd *DurationCmd) FullName() string
- func (cmd *DurationCmd) Name() string
- func (cmd *DurationCmd) Result() (time.Duration, error)
- func (cmd *DurationCmd) SetErr(e error)
- func (cmd *DurationCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *DurationCmd) SetVal(val time.Duration)
- func (cmd *DurationCmd) String() string
- func (cmd *DurationCmd) Val() time.Duration
- type Engine
- type Error
- type FTAggregateApply
- type FTAggregateGroupBy
- type FTAggregateLoad
- type FTAggregateOptions
- type FTAggregateReducer
- type FTAggregateResult
- type FTAggregateSortBy
- type FTAggregateWithCursor
- type FTAttribute
- type FTCreateOptions
- type FTDropIndexOptions
- type FTExplainOptions
- type FTFlatOptions
- type FTHNSWOptions
- type FTInfoCmd
- func (cmd *FTInfoCmd) Args() []interface{}
- func (cmd *FTInfoCmd) Err() error
- func (cmd *FTInfoCmd) FullName() string
- func (cmd *FTInfoCmd) Name() string
- func (cmd *FTInfoCmd) RawResult() (interface{}, error)
- func (cmd *FTInfoCmd) RawVal() interface{}
- func (cmd *FTInfoCmd) Result() (FTInfoResult, error)
- func (cmd *FTInfoCmd) SetErr(e error)
- func (cmd *FTInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FTInfoCmd) SetVal(val FTInfoResult)
- func (cmd *FTInfoCmd) String() string
- func (cmd *FTInfoCmd) Val() FTInfoResult
- type FTInfoResult
- type FTSearchCmd
- func (cmd *FTSearchCmd) Args() []interface{}
- func (cmd *FTSearchCmd) Err() error
- func (cmd *FTSearchCmd) FullName() string
- func (cmd *FTSearchCmd) Name() string
- func (cmd *FTSearchCmd) RawResult() (interface{}, error)
- func (cmd *FTSearchCmd) RawVal() interface{}
- func (cmd *FTSearchCmd) Result() (FTSearchResult, error)
- func (cmd *FTSearchCmd) SetErr(e error)
- func (cmd *FTSearchCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FTSearchCmd) SetVal(val FTSearchResult)
- func (cmd *FTSearchCmd) String() string
- func (cmd *FTSearchCmd) Val() FTSearchResult
- type FTSearchFilter
- type FTSearchGeoFilter
- type FTSearchOptions
- type FTSearchResult
- type FTSearchReturn
- type FTSearchSortBy
- type FTSpellCheckCmd
- func (cmd *FTSpellCheckCmd) Args() []interface{}
- func (cmd *FTSpellCheckCmd) Err() error
- func (cmd *FTSpellCheckCmd) FullName() string
- func (cmd *FTSpellCheckCmd) Name() string
- func (cmd *FTSpellCheckCmd) RawResult() (interface{}, error)
- func (cmd *FTSpellCheckCmd) RawVal() interface{}
- func (cmd *FTSpellCheckCmd) Result() ([]SpellCheckResult, error)
- func (cmd *FTSpellCheckCmd) SetErr(e error)
- func (cmd *FTSpellCheckCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FTSpellCheckCmd) SetVal(val []SpellCheckResult)
- func (cmd *FTSpellCheckCmd) String() string
- func (cmd *FTSpellCheckCmd) Val() []SpellCheckResult
- type FTSpellCheckOptions
- type FTSpellCheckTerms
- type FTSynDumpCmd
- func (cmd *FTSynDumpCmd) Args() []interface{}
- func (cmd *FTSynDumpCmd) Err() error
- func (cmd *FTSynDumpCmd) FullName() string
- func (cmd *FTSynDumpCmd) Name() string
- func (cmd *FTSynDumpCmd) RawResult() (interface{}, error)
- func (cmd *FTSynDumpCmd) RawVal() interface{}
- func (cmd *FTSynDumpCmd) Result() ([]FTSynDumpResult, error)
- func (cmd *FTSynDumpCmd) SetErr(e error)
- func (cmd *FTSynDumpCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FTSynDumpCmd) SetVal(val []FTSynDumpResult)
- func (cmd *FTSynDumpCmd) String() string
- func (cmd *FTSynDumpCmd) Val() []FTSynDumpResult
- type FTSynDumpResult
- type FTSynUpdateOptions
- type FTVectorArgs
- type FailoverOptions
- type FieldSchema
- type FieldStatistic
- type FilterBy
- type FloatCmd
- func (cmd *FloatCmd) Args() []interface{}
- func (cmd *FloatCmd) Err() error
- func (cmd *FloatCmd) FullName() string
- func (cmd *FloatCmd) Name() string
- func (cmd *FloatCmd) Result() (float64, error)
- func (cmd *FloatCmd) SetErr(e error)
- func (cmd *FloatCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FloatCmd) SetVal(val float64)
- func (cmd *FloatCmd) String() string
- func (cmd *FloatCmd) Val() float64
- type FloatSliceCmd
- func (cmd *FloatSliceCmd) Args() []interface{}
- func (cmd *FloatSliceCmd) Err() error
- func (cmd *FloatSliceCmd) FullName() string
- func (cmd *FloatSliceCmd) Name() string
- func (cmd *FloatSliceCmd) Result() ([]float64, error)
- func (cmd *FloatSliceCmd) SetErr(e error)
- func (cmd *FloatSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FloatSliceCmd) SetVal(val []float64)
- func (cmd *FloatSliceCmd) String() string
- func (cmd *FloatSliceCmd) Val() []float64
- type Function
- type FunctionListCmd
- func (cmd *FunctionListCmd) Args() []interface{}
- func (cmd *FunctionListCmd) Err() error
- func (cmd *FunctionListCmd) First() (*Library, error)
- func (cmd *FunctionListCmd) FullName() string
- func (cmd *FunctionListCmd) Name() string
- func (cmd *FunctionListCmd) Result() ([]Library, error)
- func (cmd *FunctionListCmd) SetErr(e error)
- func (cmd *FunctionListCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FunctionListCmd) SetVal(val []Library)
- func (cmd *FunctionListCmd) String() string
- func (cmd *FunctionListCmd) Val() []Library
- type FunctionListQuery
- type FunctionStats
- type FunctionStatsCmd
- func (cmd *FunctionStatsCmd) Args() []interface{}
- func (cmd *FunctionStatsCmd) Err() error
- func (cmd *FunctionStatsCmd) FullName() string
- func (cmd *FunctionStatsCmd) Name() string
- func (cmd *FunctionStatsCmd) Result() (FunctionStats, error)
- func (cmd *FunctionStatsCmd) SetErr(e error)
- func (cmd *FunctionStatsCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *FunctionStatsCmd) SetVal(val FunctionStats)
- func (cmd *FunctionStatsCmd) String() string
- func (cmd *FunctionStatsCmd) Val() FunctionStats
- type GCStats
- type GearsCmdable
- type GenericCmdable
- type GeoCmdable
- type GeoLocation
- type GeoLocationCmd
- func (cmd *GeoLocationCmd) Args() []interface{}
- func (cmd *GeoLocationCmd) Err() error
- func (cmd *GeoLocationCmd) FullName() string
- func (cmd *GeoLocationCmd) Name() string
- func (cmd *GeoLocationCmd) Result() ([]GeoLocation, error)
- func (cmd *GeoLocationCmd) SetErr(e error)
- func (cmd *GeoLocationCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *GeoLocationCmd) SetVal(locations []GeoLocation)
- func (cmd *GeoLocationCmd) String() string
- func (cmd *GeoLocationCmd) Val() []GeoLocation
- type GeoPos
- type GeoPosCmd
- func (cmd *GeoPosCmd) Args() []interface{}
- func (cmd *GeoPosCmd) Err() error
- func (cmd *GeoPosCmd) FullName() string
- func (cmd *GeoPosCmd) Name() string
- func (cmd *GeoPosCmd) Result() ([]*GeoPos, error)
- func (cmd *GeoPosCmd) SetErr(e error)
- func (cmd *GeoPosCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *GeoPosCmd) SetVal(val []*GeoPos)
- func (cmd *GeoPosCmd) String() string
- func (cmd *GeoPosCmd) Val() []*GeoPos
- type GeoRadiusQuery
- type GeoSearchLocationCmd
- func (cmd *GeoSearchLocationCmd) Args() []interface{}
- func (cmd *GeoSearchLocationCmd) Err() error
- func (cmd *GeoSearchLocationCmd) FullName() string
- func (cmd *GeoSearchLocationCmd) Name() string
- func (cmd *GeoSearchLocationCmd) Result() ([]GeoLocation, error)
- func (cmd *GeoSearchLocationCmd) SetErr(e error)
- func (cmd *GeoSearchLocationCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *GeoSearchLocationCmd) SetVal(val []GeoLocation)
- func (cmd *GeoSearchLocationCmd) String() string
- func (cmd *GeoSearchLocationCmd) Val() []GeoLocation
- type GeoSearchLocationQuery
- type GeoSearchQuery
- type GeoSearchStoreQuery
- type HExpireArgs
- type HashCmdable
- type Hook
- type HyperLogLogCmdable
- type IndexDefinition
- type IndexErrors
- type InfoCmd
- func (cmd *InfoCmd) Args() []interface{}
- func (cmd *InfoCmd) Err() error
- func (cmd *InfoCmd) FullName() string
- func (cmd *InfoCmd) Item(section, key string) string
- func (cmd *InfoCmd) Name() string
- func (cmd *InfoCmd) Result() (map[string]map[string]string, error)
- func (cmd *InfoCmd) SetErr(e error)
- func (cmd *InfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *InfoCmd) SetVal(val map[string]map[string]string)
- func (cmd *InfoCmd) String() string
- func (cmd *InfoCmd) Val() map[string]map[string]string
- type IntCmd
- func (cmd *IntCmd) Args() []interface{}
- func (cmd *IntCmd) Err() error
- func (cmd *IntCmd) FullName() string
- func (cmd *IntCmd) Name() string
- func (cmd *IntCmd) Result() (int64, error)
- func (cmd *IntCmd) SetErr(e error)
- func (cmd *IntCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *IntCmd) SetVal(val int64)
- func (cmd *IntCmd) String() string
- func (cmd *IntCmd) Uint64() (uint64, error)
- func (cmd *IntCmd) Val() int64
- type IntPointerSliceCmd
- func (cmd *IntPointerSliceCmd) Args() []interface{}
- func (cmd *IntPointerSliceCmd) Err() error
- func (cmd *IntPointerSliceCmd) FullName() string
- func (cmd *IntPointerSliceCmd) Name() string
- func (cmd *IntPointerSliceCmd) Result() ([]*int64, error)
- func (cmd *IntPointerSliceCmd) SetErr(e error)
- func (cmd *IntPointerSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *IntPointerSliceCmd) SetVal(val []*int64)
- func (cmd *IntPointerSliceCmd) String() string
- func (cmd *IntPointerSliceCmd) Val() []*int64
- type IntSliceCmd
- func (cmd *IntSliceCmd) Args() []interface{}
- func (cmd *IntSliceCmd) Err() error
- func (cmd *IntSliceCmd) FullName() string
- func (cmd *IntSliceCmd) Name() string
- func (cmd *IntSliceCmd) Result() ([]int64, error)
- func (cmd *IntSliceCmd) SetErr(e error)
- func (cmd *IntSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *IntSliceCmd) SetVal(val []int64)
- func (cmd *IntSliceCmd) String() string
- func (cmd *IntSliceCmd) Val() []int64
- type JSONArrIndexArgs
- type JSONArrTrimArgs
- type JSONCmd
- func (cmd *JSONCmd) Args() []interface{}
- func (cmd *JSONCmd) Err() error
- func (cmd *JSONCmd) Expanded() (interface{}, error)
- func (cmd *JSONCmd) FullName() string
- func (cmd *JSONCmd) Name() string
- func (cmd *JSONCmd) Result() (string, error)
- func (cmd *JSONCmd) SetErr(e error)
- func (cmd *JSONCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *JSONCmd) SetVal(val string)
- func (cmd *JSONCmd) String() string
- func (cmd *JSONCmd) Val() string
- type JSONCmdable
- type JSONGetArgs
- type JSONSetArgs
- type JSONSliceCmd
- func (cmd *JSONSliceCmd) Args() []interface{}
- func (cmd *JSONSliceCmd) Err() error
- func (cmd *JSONSliceCmd) FullName() string
- func (cmd *JSONSliceCmd) Name() string
- func (cmd *JSONSliceCmd) Result() ([]interface{}, error)
- func (cmd *JSONSliceCmd) SetErr(e error)
- func (cmd *JSONSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *JSONSliceCmd) SetVal(val []interface{})
- func (cmd *JSONSliceCmd) String() string
- func (cmd *JSONSliceCmd) Val() []interface{}
- type KeyFlags
- type KeyFlagsCmd
- func (cmd *KeyFlagsCmd) Args() []interface{}
- func (cmd *KeyFlagsCmd) Err() error
- func (cmd *KeyFlagsCmd) FullName() string
- func (cmd *KeyFlagsCmd) Name() string
- func (cmd *KeyFlagsCmd) Result() ([]KeyFlags, error)
- func (cmd *KeyFlagsCmd) SetErr(e error)
- func (cmd *KeyFlagsCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *KeyFlagsCmd) SetVal(val []KeyFlags)
- func (cmd *KeyFlagsCmd) String() string
- func (cmd *KeyFlagsCmd) Val() []KeyFlags
- type KeyValue
- type KeyValueSliceCmd
- func (cmd *KeyValueSliceCmd) Args() []interface{}
- func (cmd *KeyValueSliceCmd) Err() error
- func (cmd *KeyValueSliceCmd) FullName() string
- func (cmd *KeyValueSliceCmd) Name() string
- func (cmd *KeyValueSliceCmd) Result() ([]KeyValue, error)
- func (cmd *KeyValueSliceCmd) SetErr(e error)
- func (cmd *KeyValueSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *KeyValueSliceCmd) SetVal(val []KeyValue)
- func (cmd *KeyValueSliceCmd) String() string
- func (cmd *KeyValueSliceCmd) Val() []KeyValue
- type KeyValuesCmd
- func (cmd *KeyValuesCmd) Args() []interface{}
- func (cmd *KeyValuesCmd) Err() error
- func (cmd *KeyValuesCmd) FullName() string
- func (cmd *KeyValuesCmd) Name() string
- func (cmd *KeyValuesCmd) Result() (string, []string, error)
- func (cmd *KeyValuesCmd) SetErr(e error)
- func (cmd *KeyValuesCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *KeyValuesCmd) SetVal(key string, val []string)
- func (cmd *KeyValuesCmd) String() string
- func (cmd *KeyValuesCmd) Val() (string, []string)
- type LCSCmd
- func (cmd *LCSCmd) Args() []interface{}
- func (cmd *LCSCmd) Err() error
- func (cmd *LCSCmd) FullName() string
- func (cmd *LCSCmd) Name() string
- func (cmd *LCSCmd) Result() (*LCSMatch, error)
- func (cmd *LCSCmd) SetErr(e error)
- func (cmd *LCSCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *LCSCmd) SetVal(val *LCSMatch)
- func (cmd *LCSCmd) String() string
- func (cmd *LCSCmd) Val() *LCSMatch
- type LCSMatch
- type LCSMatchedPosition
- type LCSPosition
- type LCSQuery
- type LPosArgs
- type Library
- type LibraryInfo
- type Limiter
- type ListCmdable
- type MapMapStringInterfaceCmd
- func (cmd *MapMapStringInterfaceCmd) Args() []interface{}
- func (cmd *MapMapStringInterfaceCmd) Err() error
- func (cmd *MapMapStringInterfaceCmd) FullName() string
- func (cmd *MapMapStringInterfaceCmd) Name() string
- func (cmd *MapMapStringInterfaceCmd) Result() (map[string]interface{}, error)
- func (cmd *MapMapStringInterfaceCmd) SetErr(e error)
- func (cmd *MapMapStringInterfaceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MapMapStringInterfaceCmd) SetVal(val map[string]interface{})
- func (cmd *MapMapStringInterfaceCmd) String() string
- func (cmd *MapMapStringInterfaceCmd) Val() map[string]interface{}
- type MapStringIntCmd
- func (cmd *MapStringIntCmd) Args() []interface{}
- func (cmd *MapStringIntCmd) Err() error
- func (cmd *MapStringIntCmd) FullName() string
- func (cmd *MapStringIntCmd) Name() string
- func (cmd *MapStringIntCmd) Result() (map[string]int64, error)
- func (cmd *MapStringIntCmd) SetErr(e error)
- func (cmd *MapStringIntCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MapStringIntCmd) SetVal(val map[string]int64)
- func (cmd *MapStringIntCmd) String() string
- func (cmd *MapStringIntCmd) Val() map[string]int64
- type MapStringInterfaceCmd
- func (cmd *MapStringInterfaceCmd) Args() []interface{}
- func (cmd *MapStringInterfaceCmd) Err() error
- func (cmd *MapStringInterfaceCmd) FullName() string
- func (cmd *MapStringInterfaceCmd) Name() string
- func (cmd *MapStringInterfaceCmd) Result() (map[string]interface{}, error)
- func (cmd *MapStringInterfaceCmd) SetErr(e error)
- func (cmd *MapStringInterfaceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MapStringInterfaceCmd) SetVal(val map[string]interface{})
- func (cmd *MapStringInterfaceCmd) String() string
- func (cmd *MapStringInterfaceCmd) Val() map[string]interface{}
- type MapStringInterfaceSliceCmd
- func (cmd *MapStringInterfaceSliceCmd) Args() []interface{}
- func (cmd *MapStringInterfaceSliceCmd) Err() error
- func (cmd *MapStringInterfaceSliceCmd) FullName() string
- func (cmd *MapStringInterfaceSliceCmd) Name() string
- func (cmd *MapStringInterfaceSliceCmd) Result() ([]map[string]interface{}, error)
- func (cmd *MapStringInterfaceSliceCmd) SetErr(e error)
- func (cmd *MapStringInterfaceSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MapStringInterfaceSliceCmd) SetVal(val []map[string]interface{})
- func (cmd *MapStringInterfaceSliceCmd) String() string
- func (cmd *MapStringInterfaceSliceCmd) Val() []map[string]interface{}
- type MapStringSliceInterfaceCmd
- func (cmd *MapStringSliceInterfaceCmd) Args() []interface{}
- func (cmd *MapStringSliceInterfaceCmd) Err() error
- func (cmd *MapStringSliceInterfaceCmd) FullName() string
- func (cmd *MapStringSliceInterfaceCmd) Name() string
- func (cmd *MapStringSliceInterfaceCmd) Result() (map[string][]interface{}, error)
- func (cmd *MapStringSliceInterfaceCmd) SetErr(e error)
- func (cmd *MapStringSliceInterfaceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MapStringSliceInterfaceCmd) SetVal(val map[string][]interface{})
- func (cmd *MapStringSliceInterfaceCmd) String() string
- func (cmd *MapStringSliceInterfaceCmd) Val() map[string][]interface{}
- type MapStringStringCmd
- func (cmd *MapStringStringCmd) Args() []interface{}
- func (cmd *MapStringStringCmd) Err() error
- func (cmd *MapStringStringCmd) FullName() string
- func (cmd *MapStringStringCmd) Name() string
- func (cmd *MapStringStringCmd) Result() (map[string]string, error)
- func (cmd *MapStringStringCmd) Scan(dest interface{}) error
- func (cmd *MapStringStringCmd) SetErr(e error)
- func (cmd *MapStringStringCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MapStringStringCmd) SetVal(val map[string]string)
- func (cmd *MapStringStringCmd) String() string
- func (cmd *MapStringStringCmd) Val() map[string]string
- type MapStringStringSliceCmd
- func (cmd *MapStringStringSliceCmd) Args() []interface{}
- func (cmd *MapStringStringSliceCmd) Err() error
- func (cmd *MapStringStringSliceCmd) FullName() string
- func (cmd *MapStringStringSliceCmd) Name() string
- func (cmd *MapStringStringSliceCmd) Result() ([]map[string]string, error)
- func (cmd *MapStringStringSliceCmd) SetErr(e error)
- func (cmd *MapStringStringSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MapStringStringSliceCmd) SetVal(val []map[string]string)
- func (cmd *MapStringStringSliceCmd) String() string
- func (cmd *MapStringStringSliceCmd) Val() []map[string]string
- type Message
- type ModuleLoadexConfig
- type MonitorCmd
- func (cmd *MonitorCmd) Args() []interface{}
- func (cmd *MonitorCmd) Err() error
- func (cmd *MonitorCmd) FullName() string
- func (cmd *MonitorCmd) Name() string
- func (cmd *MonitorCmd) SetErr(e error)
- func (cmd *MonitorCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *MonitorCmd) Start()
- func (cmd *MonitorCmd) Stop()
- func (cmd *MonitorCmd) String() string
- type MonitorStatus
- type Node
- type Options
- type Pipeline
- func (c Pipeline) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd
- func (c Pipeline) ACLLog(ctx context.Context, count int64) *ACLLogCmd
- func (c Pipeline) ACLLogReset(ctx context.Context) *StatusCmd
- func (c Pipeline) Append(ctx context.Context, key, value string) *IntCmd
- func (c Pipeline) Auth(ctx context.Context, password string) *StatusCmd
- func (c Pipeline) AuthACL(ctx context.Context, username, password string) *StatusCmd
- func (c Pipeline) BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Pipeline) BFCard(ctx context.Context, key string) *IntCmd
- func (c Pipeline) BFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Pipeline) BFInfo(ctx context.Context, key string) *BFInfoCmd
- func (c Pipeline) BFInfoArg(ctx context.Context, key, option string) *BFInfoCmd
- func (c Pipeline) BFInfoCapacity(ctx context.Context, key string) *BFInfoCmd
- func (c Pipeline) BFInfoExpansion(ctx context.Context, key string) *BFInfoCmd
- func (c Pipeline) BFInfoFilters(ctx context.Context, key string) *BFInfoCmd
- func (c Pipeline) BFInfoItems(ctx context.Context, key string) *BFInfoCmd
- func (c Pipeline) BFInfoSize(ctx context.Context, key string) *BFInfoCmd
- func (c Pipeline) BFInsert(ctx context.Context, key string, options *BFInsertOptions, ...) *BoolSliceCmd
- func (c Pipeline) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Pipeline) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Pipeline) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Pipeline) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Pipeline) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
- func (c Pipeline) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Pipeline) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
- func (c Pipeline) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Pipeline) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, ...) *KeyValuesCmd
- func (c Pipeline) BLMove(ctx context.Context, source, destination, srcpos, destpos string, ...) *StringCmd
- func (c Pipeline) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Pipeline) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Pipeline) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd
- func (c Pipeline) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, ...) *ZSliceWithKeyCmd
- func (c Pipeline) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Pipeline) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Pipeline) BgRewriteAOF(ctx context.Context) *StatusCmd
- func (c Pipeline) BgSave(ctx context.Context) *StatusCmd
- func (c Pipeline) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd
- func (c Pipeline) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Pipeline) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Pipeline) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Pipeline) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd
- func (c Pipeline) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Pipeline) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Pipeline) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd
- func (c Pipeline) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
- func (c Pipeline) CFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Pipeline) CFAddNX(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Pipeline) CFCount(ctx context.Context, key string, element interface{}) *IntCmd
- func (c Pipeline) CFDel(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Pipeline) CFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Pipeline) CFInfo(ctx context.Context, key string) *CFInfoCmd
- func (c Pipeline) CFInsert(ctx context.Context, key string, options *CFInsertOptions, ...) *BoolSliceCmd
- func (c Pipeline) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, ...) *IntSliceCmd
- func (c Pipeline) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Pipeline) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Pipeline) CFReserve(ctx context.Context, key string, capacity int64) *StatusCmd
- func (c Pipeline) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
- func (c Pipeline) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
- func (c Pipeline) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
- func (c Pipeline) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
- func (c Pipeline) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Pipeline) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Pipeline) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
- func (c Pipeline) CMSInitByDim(ctx context.Context, key string, width, depth int64) *StatusCmd
- func (c Pipeline) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
- func (c Pipeline) CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd
- func (c Pipeline) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
- func (c Pipeline) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Pipeline) ClientGetName(ctx context.Context) *StringCmd
- func (c Pipeline) ClientID(ctx context.Context) *IntCmd
- func (c Pipeline) ClientInfo(ctx context.Context) *ClientInfoCmd
- func (c Pipeline) ClientKill(ctx context.Context, ipPort string) *StatusCmd
- func (c Pipeline) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd
- func (c Pipeline) ClientList(ctx context.Context) *StringCmd
- func (c Pipeline) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd
- func (c Pipeline) ClientSetInfo(ctx context.Context, info LibraryInfo) *StatusCmd
- func (c Pipeline) ClientSetName(ctx context.Context, name string) *BoolCmd
- func (c Pipeline) ClientUnblock(ctx context.Context, id int64) *IntCmd
- func (c Pipeline) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd
- func (c Pipeline) ClientUnpause(ctx context.Context) *BoolCmd
- func (c Pipeline) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Pipeline) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Pipeline) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd
- func (c Pipeline) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd
- func (c Pipeline) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Pipeline) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Pipeline) ClusterFailover(ctx context.Context) *StatusCmd
- func (c Pipeline) ClusterForget(ctx context.Context, nodeID string) *StatusCmd
- func (c Pipeline) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
- func (c Pipeline) ClusterInfo(ctx context.Context) *StringCmd
- func (c Pipeline) ClusterKeySlot(ctx context.Context, key string) *IntCmd
- func (c Pipeline) ClusterLinks(ctx context.Context) *ClusterLinksCmd
- func (c Pipeline) ClusterMeet(ctx context.Context, host, port string) *StatusCmd
- func (c Pipeline) ClusterMyShardID(ctx context.Context) *StringCmd
- func (c Pipeline) ClusterNodes(ctx context.Context) *StringCmd
- func (c Pipeline) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd
- func (c Pipeline) ClusterResetHard(ctx context.Context) *StatusCmd
- func (c Pipeline) ClusterResetSoft(ctx context.Context) *StatusCmd
- func (c Pipeline) ClusterSaveConfig(ctx context.Context) *StatusCmd
- func (c Pipeline) ClusterShards(ctx context.Context) *ClusterShardsCmd
- func (c Pipeline) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
- func (c Pipeline) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
- func (c Pipeline) Command(ctx context.Context) *CommandsInfoCmd
- func (c Pipeline) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
- func (c Pipeline) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
- func (c Pipeline) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
- func (c Pipeline) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
- func (c Pipeline) ConfigResetStat(ctx context.Context) *StatusCmd
- func (c Pipeline) ConfigRewrite(ctx context.Context) *StatusCmd
- func (c Pipeline) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd
- func (c Pipeline) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd
- func (c Pipeline) DBSize(ctx context.Context) *IntCmd
- func (c Pipeline) DebugObject(ctx context.Context, key string) *StringCmd
- func (c Pipeline) Decr(ctx context.Context, key string) *IntCmd
- func (c Pipeline) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd
- func (c Pipeline) Del(ctx context.Context, keys ...string) *IntCmd
- func (c *Pipeline) Discard()
- func (c *Pipeline) Do(ctx context.Context, args ...interface{}) *Cmd
- func (c Pipeline) Dump(ctx context.Context, key string) *StringCmd
- func (c Pipeline) Echo(ctx context.Context, message interface{}) *StringCmd
- func (c Pipeline) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Pipeline) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Pipeline) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Pipeline) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c *Pipeline) Exec(ctx context.Context) ([]Cmder, error)
- func (c Pipeline) Exists(ctx context.Context, keys ...string) *IntCmd
- func (c Pipeline) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Pipeline) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Pipeline) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Pipeline) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Pipeline) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Pipeline) ExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Pipeline) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Pipeline) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Pipeline) FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Pipeline) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Pipeline) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
- func (c Pipeline) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
- func (c Pipeline) FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd
- func (c Pipeline) FTAliasDel(ctx context.Context, alias string) *StatusCmd
- func (c Pipeline) FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd
- func (c Pipeline) FTAlter(ctx context.Context, index string, skipInitialScan bool, ...) *StatusCmd
- func (c Pipeline) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
- func (c Pipeline) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd
- func (c Pipeline) FTCreate(ctx context.Context, index string, options *FTCreateOptions, ...) *StatusCmd
- func (c Pipeline) FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd
- func (c Pipeline) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
- func (c Pipeline) FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Pipeline) FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Pipeline) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
- func (c Pipeline) FTDropIndex(ctx context.Context, index string) *StatusCmd
- func (c Pipeline) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
- func (c Pipeline) FTExplain(ctx context.Context, index string, query string) *StringCmd
- func (c Pipeline) FTExplainCli(ctx context.Context, key, path string) error
- func (c Pipeline) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
- func (c Pipeline) FTInfo(ctx context.Context, index string) *FTInfoCmd
- func (c Pipeline) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
- func (c Pipeline) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
- func (c Pipeline) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
- func (c Pipeline) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
- func (c Pipeline) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
- func (c Pipeline) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
- func (c Pipeline) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, ...) *StatusCmd
- func (c Pipeline) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
- func (c Pipeline) FT_List(ctx context.Context) *StringSliceCmd
- func (c Pipeline) FlushAll(ctx context.Context) *StatusCmd
- func (c Pipeline) FlushAllAsync(ctx context.Context) *StatusCmd
- func (c Pipeline) FlushDB(ctx context.Context) *StatusCmd
- func (c Pipeline) FlushDBAsync(ctx context.Context) *StatusCmd
- func (c Pipeline) FunctionDelete(ctx context.Context, libName string) *StringCmd
- func (c Pipeline) FunctionDump(ctx context.Context) *StringCmd
- func (c Pipeline) FunctionFlush(ctx context.Context) *StringCmd
- func (c Pipeline) FunctionFlushAsync(ctx context.Context) *StringCmd
- func (c Pipeline) FunctionKill(ctx context.Context) *StringCmd
- func (c Pipeline) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
- func (c Pipeline) FunctionLoad(ctx context.Context, code string) *StringCmd
- func (c Pipeline) FunctionLoadReplace(ctx context.Context, code string) *StringCmd
- func (c Pipeline) FunctionRestore(ctx context.Context, libDump string) *StringCmd
- func (c Pipeline) FunctionStats(ctx context.Context) *FunctionStatsCmd
- func (c Pipeline) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
- func (c Pipeline) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd
- func (c Pipeline) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
- func (c Pipeline) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd
- func (c Pipeline) GeoRadius(ctx context.Context, key string, longitude, latitude float64, ...) *GeoLocationCmd
- func (c Pipeline) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd
- func (c Pipeline) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd
- func (c Pipeline) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, ...) *IntCmd
- func (c Pipeline) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
- func (c Pipeline) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
- func (c Pipeline) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
- func (c Pipeline) Get(ctx context.Context, key string) *StringCmd
- func (c Pipeline) GetBit(ctx context.Context, key string, offset int64) *IntCmd
- func (c Pipeline) GetDel(ctx context.Context, key string) *StringCmd
- func (c Pipeline) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd
- func (c Pipeline) GetRange(ctx context.Context, key string, start, end int64) *StringCmd
- func (c Pipeline) GetSet(ctx context.Context, key string, value interface{}) *StringCmd
- func (c Pipeline) HDel(ctx context.Context, key string, fields ...string) *IntCmd
- func (c Pipeline) HExists(ctx context.Context, key, field string) *BoolCmd
- func (c Pipeline) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Pipeline) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Pipeline) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Pipeline) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Pipeline) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Pipeline) HGet(ctx context.Context, key, field string) *StringCmd
- func (c Pipeline) HGetAll(ctx context.Context, key string) *MapStringStringCmd
- func (c Pipeline) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd
- func (c Pipeline) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd
- func (c Pipeline) HKeys(ctx context.Context, key string) *StringSliceCmd
- func (c Pipeline) HLen(ctx context.Context, key string) *IntCmd
- func (c Pipeline) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd
- func (c Pipeline) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd
- func (c Pipeline) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Pipeline) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Pipeline) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Pipeline) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Pipeline) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Pipeline) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Pipeline) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Pipeline) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Pipeline) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
- func (c Pipeline) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Pipeline) HScanNoValues(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Pipeline) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Pipeline) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd
- func (c Pipeline) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Pipeline) HVals(ctx context.Context, key string) *StringSliceCmd
- func (c Pipeline) Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd
- func (c Pipeline) Incr(ctx context.Context, key string) *IntCmd
- func (c Pipeline) IncrBy(ctx context.Context, key string, value int64) *IntCmd
- func (c Pipeline) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd
- func (c Pipeline) Info(ctx context.Context, sections ...string) *StringCmd
- func (c Pipeline) InfoMap(ctx context.Context, sections ...string) *InfoCmd
- func (c Pipeline) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
- func (c Pipeline) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
- func (c Pipeline) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, ...) *IntSliceCmd
- func (c Pipeline) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
- func (c Pipeline) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
- func (c Pipeline) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
- func (c Pipeline) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
- func (c Pipeline) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
- func (c Pipeline) JSONClear(ctx context.Context, key, path string) *IntCmd
- func (c Pipeline) JSONDebugMemory(ctx context.Context, key, path string) *IntCmd
- func (c Pipeline) JSONDel(ctx context.Context, key, path string) *IntCmd
- func (c Pipeline) JSONForget(ctx context.Context, key, path string) *IntCmd
- func (c Pipeline) JSONGet(ctx context.Context, key string, paths ...string) *JSONCmd
- func (c Pipeline) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
- func (c Pipeline) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
- func (c Pipeline) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd
- func (c Pipeline) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
- func (c Pipeline) JSONMerge(ctx context.Context, key, path string, value string) *StatusCmd
- func (c Pipeline) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd
- func (c Pipeline) JSONObjKeys(ctx context.Context, key, path string) *SliceCmd
- func (c Pipeline) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Pipeline) JSONSet(ctx context.Context, key, path string, value interface{}) *StatusCmd
- func (c Pipeline) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
- func (c Pipeline) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
- func (c Pipeline) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Pipeline) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Pipeline) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
- func (c Pipeline) Keys(ctx context.Context, pattern string) *StringSliceCmd
- func (c Pipeline) LCS(ctx context.Context, q *LCSQuery) *LCSCmd
- func (c Pipeline) LIndex(ctx context.Context, key string, index int64) *StringCmd
- func (c Pipeline) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd
- func (c Pipeline) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Pipeline) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Pipeline) LLen(ctx context.Context, key string) *IntCmd
- func (c Pipeline) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
- func (c Pipeline) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd
- func (c Pipeline) LPop(ctx context.Context, key string) *StringCmd
- func (c Pipeline) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Pipeline) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd
- func (c Pipeline) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd
- func (c Pipeline) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Pipeline) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Pipeline) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Pipeline) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd
- func (c Pipeline) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd
- func (c Pipeline) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd
- func (c Pipeline) LastSave(ctx context.Context) *IntCmd
- func (c *Pipeline) Len() int
- func (c Pipeline) MGet(ctx context.Context, keys ...string) *SliceCmd
- func (c Pipeline) MSet(ctx context.Context, values ...interface{}) *StatusCmd
- func (c Pipeline) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd
- func (c Pipeline) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd
- func (c Pipeline) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd
- func (c Pipeline) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
- func (c Pipeline) Monitor(ctx context.Context, ch chan string) *MonitorCmd
- func (c Pipeline) Move(ctx context.Context, key string, db int) *BoolCmd
- func (c Pipeline) ObjectEncoding(ctx context.Context, key string) *StringCmd
- func (c Pipeline) ObjectFreq(ctx context.Context, key string) *IntCmd
- func (c Pipeline) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
- func (c Pipeline) ObjectRefCount(ctx context.Context, key string) *IntCmd
- func (c Pipeline) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Pipeline) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Pipeline) PExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Pipeline) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd
- func (c Pipeline) PFCount(ctx context.Context, keys ...string) *IntCmd
- func (c Pipeline) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd
- func (c Pipeline) PTTL(ctx context.Context, key string) *DurationCmd
- func (c Pipeline) Persist(ctx context.Context, key string) *BoolCmd
- func (c Pipeline) Ping(ctx context.Context) *StatusCmd
- func (c *Pipeline) Pipeline() Pipeliner
- func (c *Pipeline) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c *Pipeline) Process(ctx context.Context, cmd Cmder) error
- func (c Pipeline) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Pipeline) PubSubNumPat(ctx context.Context) *IntCmd
- func (c Pipeline) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Pipeline) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Pipeline) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Pipeline) Publish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Pipeline) Quit(_ context.Context) *StatusCmd
- func (c Pipeline) RPop(ctx context.Context, key string) *StringCmd
- func (c Pipeline) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Pipeline) RPopLPush(ctx context.Context, source, destination string) *StringCmd
- func (c Pipeline) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Pipeline) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Pipeline) RandomKey(ctx context.Context) *StringCmd
- func (c Pipeline) ReadOnly(ctx context.Context) *StatusCmd
- func (c Pipeline) ReadWrite(ctx context.Context) *StatusCmd
- func (c Pipeline) Rename(ctx context.Context, key, newkey string) *StatusCmd
- func (c Pipeline) RenameNX(ctx context.Context, key, newkey string) *BoolCmd
- func (c Pipeline) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Pipeline) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Pipeline) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Pipeline) SCard(ctx context.Context, key string) *IntCmd
- func (c Pipeline) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Pipeline) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Pipeline) SInter(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Pipeline) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Pipeline) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Pipeline) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd
- func (c Pipeline) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
- func (c Pipeline) SMembers(ctx context.Context, key string) *StringSliceCmd
- func (c Pipeline) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
- func (c Pipeline) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
- func (c Pipeline) SPop(ctx context.Context, key string) *StringCmd
- func (c Pipeline) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Pipeline) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Pipeline) SRandMember(ctx context.Context, key string) *StringCmd
- func (c Pipeline) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Pipeline) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Pipeline) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Pipeline) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Pipeline) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Pipeline) Save(ctx context.Context) *StatusCmd
- func (c Pipeline) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd
- func (c Pipeline) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd
- func (c Pipeline) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
- func (c Pipeline) ScriptFlush(ctx context.Context) *StatusCmd
- func (c Pipeline) ScriptKill(ctx context.Context) *StatusCmd
- func (c Pipeline) ScriptLoad(ctx context.Context, script string) *StringCmd
- func (c Pipeline) Select(ctx context.Context, index int) *StatusCmd
- func (c Pipeline) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Pipeline) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
- func (c Pipeline) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd
- func (c Pipeline) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Pipeline) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Pipeline) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd
- func (c Pipeline) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Pipeline) Shutdown(ctx context.Context) *StatusCmd
- func (c Pipeline) ShutdownNoSave(ctx context.Context) *StatusCmd
- func (c Pipeline) ShutdownSave(ctx context.Context) *StatusCmd
- func (c Pipeline) SlaveOf(ctx context.Context, host, port string) *StatusCmd
- func (c Pipeline) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
- func (c Pipeline) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Pipeline) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd
- func (c Pipeline) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Pipeline) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
- func (c Pipeline) StrLen(ctx context.Context, key string) *IntCmd
- func (c Pipeline) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd
- func (c Pipeline) Sync(_ context.Context)
- func (c Pipeline) TDigestAdd(ctx context.Context, key string, elements ...float64) *StatusCmd
- func (c Pipeline) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Pipeline) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Pipeline) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Pipeline) TDigestCreate(ctx context.Context, key string) *StatusCmd
- func (c Pipeline) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
- func (c Pipeline) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
- func (c Pipeline) TDigestMax(ctx context.Context, key string) *FloatCmd
- func (c Pipeline) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, ...) *StatusCmd
- func (c Pipeline) TDigestMin(ctx context.Context, key string) *FloatCmd
- func (c Pipeline) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Pipeline) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Pipeline) TDigestReset(ctx context.Context, key string) *StatusCmd
- func (c Pipeline) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Pipeline) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
- func (c Pipeline) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Pipeline) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Pipeline) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Pipeline) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Pipeline) TFunctionDelete(ctx context.Context, libName string) *StatusCmd
- func (c Pipeline) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
- func (c Pipeline) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
- func (c Pipeline) TFunctionLoad(ctx context.Context, lib string) *StatusCmd
- func (c Pipeline) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
- func (c Pipeline) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
- func (c Pipeline) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, ...) *IntCmd
- func (c Pipeline) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
- func (c Pipeline) TSCreate(ctx context.Context, key string) *StatusCmd
- func (c Pipeline) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Pipeline) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Pipeline) TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd
- func (c Pipeline) TSDecrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Pipeline) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Pipeline) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
- func (c Pipeline) TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd
- func (c Pipeline) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
- func (c Pipeline) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
- func (c Pipeline) TSIncrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Pipeline) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Pipeline) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
- func (c Pipeline) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
- func (c Pipeline) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
- func (c Pipeline) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
- func (c Pipeline) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
- func (c Pipeline) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Pipeline) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Pipeline) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Pipeline) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Pipeline) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
- func (c Pipeline) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Pipeline) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Pipeline) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Pipeline) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Pipeline) TTL(ctx context.Context, key string) *DurationCmd
- func (c Pipeline) Time(ctx context.Context) *TimeCmd
- func (c Pipeline) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Pipeline) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Pipeline) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Pipeline) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
- func (c Pipeline) TopKList(ctx context.Context, key string) *StringSliceCmd
- func (c Pipeline) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
- func (c Pipeline) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Pipeline) TopKReserve(ctx context.Context, key string, k int64) *StatusCmd
- func (c Pipeline) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
- func (c Pipeline) Touch(ctx context.Context, keys ...string) *IntCmd
- func (c *Pipeline) TxPipeline() Pipeliner
- func (c *Pipeline) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c Pipeline) Type(ctx context.Context, key string) *StatusCmd
- func (c Pipeline) Unlink(ctx context.Context, keys ...string) *IntCmd
- func (c Pipeline) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd
- func (c Pipeline) WaitAOF(ctx context.Context, numLocal, numSlaves int, timeout time.Duration) *IntCmd
- func (c Pipeline) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd
- func (c Pipeline) XAdd(ctx context.Context, a *XAddArgs) *StringCmd
- func (c Pipeline) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
- func (c Pipeline) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
- func (c Pipeline) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
- func (c Pipeline) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
- func (c Pipeline) XDel(ctx context.Context, stream string, ids ...string) *IntCmd
- func (c Pipeline) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Pipeline) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Pipeline) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Pipeline) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Pipeline) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd
- func (c Pipeline) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Pipeline) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
- func (c Pipeline) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
- func (c Pipeline) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
- func (c Pipeline) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
- func (c Pipeline) XLen(ctx context.Context, stream string) *IntCmd
- func (c Pipeline) XPending(ctx context.Context, stream, group string) *XPendingCmd
- func (c Pipeline) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
- func (c Pipeline) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Pipeline) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Pipeline) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
- func (c Pipeline) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
- func (c Pipeline) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
- func (c Pipeline) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Pipeline) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Pipeline) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd
- func (c Pipeline) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd
- func (c Pipeline) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd
- func (c Pipeline) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd
- func (c Pipeline) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Pipeline) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd
- func (c Pipeline) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd
- func (c Pipeline) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Pipeline) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Pipeline) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Pipeline) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Pipeline) ZCard(ctx context.Context, key string) *IntCmd
- func (c Pipeline) ZCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Pipeline) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Pipeline) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Pipeline) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd
- func (c Pipeline) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd
- func (c Pipeline) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
- func (c Pipeline) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Pipeline) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd
- func (c Pipeline) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd
- func (c Pipeline) ZLexCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Pipeline) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
- func (c Pipeline) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
- func (c Pipeline) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Pipeline) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Pipeline) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Pipeline) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd
- func (c Pipeline) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Pipeline) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
- func (c Pipeline) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
- func (c Pipeline) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Pipeline) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Pipeline) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Pipeline) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
- func (c Pipeline) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Pipeline) ZRank(ctx context.Context, key, member string) *IntCmd
- func (c Pipeline) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Pipeline) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Pipeline) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd
- func (c Pipeline) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd
- func (c Pipeline) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd
- func (c Pipeline) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Pipeline) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Pipeline) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Pipeline) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Pipeline) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Pipeline) ZRevRank(ctx context.Context, key, member string) *IntCmd
- func (c Pipeline) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Pipeline) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Pipeline) ZScore(ctx context.Context, key, member string) *FloatCmd
- func (c Pipeline) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
- func (c Pipeline) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
- func (c Pipeline) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
- type Pipeliner
- type Pong
- type PoolStats
- type ProbabilisticCmdable
- type ProcessHook
- type ProcessPipelineHook
- type PubSub
- func (c *PubSub) Channel(opts ...ChannelOption) <-chan *Message
- func (c *PubSub) ChannelSize(size int) <-chan *Messagedeprecated
- func (c *PubSub) ChannelWithSubscriptions(opts ...ChannelOption) <-chan interface{}
- func (c *PubSub) Close() error
- func (c *PubSub) PSubscribe(ctx context.Context, patterns ...string) error
- func (c *PubSub) PUnsubscribe(ctx context.Context, patterns ...string) error
- func (c *PubSub) Ping(ctx context.Context, payload ...string) error
- func (c *PubSub) Receive(ctx context.Context) (interface{}, error)
- func (c *PubSub) ReceiveMessage(ctx context.Context) (*Message, error)
- func (c *PubSub) ReceiveTimeout(ctx context.Context, timeout time.Duration) (interface{}, error)
- func (c *PubSub) SSubscribe(ctx context.Context, channels ...string) error
- func (c *PubSub) SUnsubscribe(ctx context.Context, channels ...string) error
- func (c *PubSub) String() string
- func (c *PubSub) Subscribe(ctx context.Context, channels ...string) error
- func (c *PubSub) Unsubscribe(ctx context.Context, channels ...string) error
- type PubSubCmdable
- type RankScore
- type RankWithScoreCmd
- func (cmd *RankWithScoreCmd) Args() []interface{}
- func (cmd *RankWithScoreCmd) Err() error
- func (cmd *RankWithScoreCmd) FullName() string
- func (cmd *RankWithScoreCmd) Name() string
- func (cmd *RankWithScoreCmd) Result() (RankScore, error)
- func (cmd *RankWithScoreCmd) SetErr(e error)
- func (cmd *RankWithScoreCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *RankWithScoreCmd) SetVal(val RankScore)
- func (cmd *RankWithScoreCmd) String() string
- func (cmd *RankWithScoreCmd) Val() RankScore
- type Ring
- func (c Ring) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd
- func (c Ring) ACLLog(ctx context.Context, count int64) *ACLLogCmd
- func (c Ring) ACLLogReset(ctx context.Context) *StatusCmd
- func (hs *Ring) AddHook(hook Hook)
- func (c Ring) Append(ctx context.Context, key, value string) *IntCmd
- func (c Ring) BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Ring) BFCard(ctx context.Context, key string) *IntCmd
- func (c Ring) BFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Ring) BFInfo(ctx context.Context, key string) *BFInfoCmd
- func (c Ring) BFInfoArg(ctx context.Context, key, option string) *BFInfoCmd
- func (c Ring) BFInfoCapacity(ctx context.Context, key string) *BFInfoCmd
- func (c Ring) BFInfoExpansion(ctx context.Context, key string) *BFInfoCmd
- func (c Ring) BFInfoFilters(ctx context.Context, key string) *BFInfoCmd
- func (c Ring) BFInfoItems(ctx context.Context, key string) *BFInfoCmd
- func (c Ring) BFInfoSize(ctx context.Context, key string) *BFInfoCmd
- func (c Ring) BFInsert(ctx context.Context, key string, options *BFInsertOptions, ...) *BoolSliceCmd
- func (c Ring) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Ring) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Ring) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Ring) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Ring) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
- func (c Ring) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Ring) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
- func (c Ring) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Ring) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, ...) *KeyValuesCmd
- func (c Ring) BLMove(ctx context.Context, source, destination, srcpos, destpos string, ...) *StringCmd
- func (c Ring) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Ring) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Ring) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd
- func (c Ring) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, ...) *ZSliceWithKeyCmd
- func (c Ring) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Ring) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Ring) BgRewriteAOF(ctx context.Context) *StatusCmd
- func (c Ring) BgSave(ctx context.Context) *StatusCmd
- func (c Ring) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd
- func (c Ring) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Ring) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Ring) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Ring) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd
- func (c Ring) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Ring) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Ring) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd
- func (c Ring) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
- func (c Ring) CFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Ring) CFAddNX(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Ring) CFCount(ctx context.Context, key string, element interface{}) *IntCmd
- func (c Ring) CFDel(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Ring) CFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Ring) CFInfo(ctx context.Context, key string) *CFInfoCmd
- func (c Ring) CFInsert(ctx context.Context, key string, options *CFInsertOptions, ...) *BoolSliceCmd
- func (c Ring) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, ...) *IntSliceCmd
- func (c Ring) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Ring) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Ring) CFReserve(ctx context.Context, key string, capacity int64) *StatusCmd
- func (c Ring) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
- func (c Ring) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
- func (c Ring) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
- func (c Ring) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
- func (c Ring) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Ring) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Ring) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
- func (c Ring) CMSInitByDim(ctx context.Context, key string, width, depth int64) *StatusCmd
- func (c Ring) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
- func (c Ring) CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd
- func (c Ring) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
- func (c Ring) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Ring) ClientGetName(ctx context.Context) *StringCmd
- func (c Ring) ClientID(ctx context.Context) *IntCmd
- func (c Ring) ClientInfo(ctx context.Context) *ClientInfoCmd
- func (c Ring) ClientKill(ctx context.Context, ipPort string) *StatusCmd
- func (c Ring) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd
- func (c Ring) ClientList(ctx context.Context) *StringCmd
- func (c Ring) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd
- func (c Ring) ClientUnblock(ctx context.Context, id int64) *IntCmd
- func (c Ring) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd
- func (c Ring) ClientUnpause(ctx context.Context) *BoolCmd
- func (c *Ring) Close() error
- func (c Ring) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Ring) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Ring) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd
- func (c Ring) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd
- func (c Ring) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Ring) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Ring) ClusterFailover(ctx context.Context) *StatusCmd
- func (c Ring) ClusterForget(ctx context.Context, nodeID string) *StatusCmd
- func (c Ring) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
- func (c Ring) ClusterInfo(ctx context.Context) *StringCmd
- func (c Ring) ClusterKeySlot(ctx context.Context, key string) *IntCmd
- func (c Ring) ClusterLinks(ctx context.Context) *ClusterLinksCmd
- func (c Ring) ClusterMeet(ctx context.Context, host, port string) *StatusCmd
- func (c Ring) ClusterMyShardID(ctx context.Context) *StringCmd
- func (c Ring) ClusterNodes(ctx context.Context) *StringCmd
- func (c Ring) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd
- func (c Ring) ClusterResetHard(ctx context.Context) *StatusCmd
- func (c Ring) ClusterResetSoft(ctx context.Context) *StatusCmd
- func (c Ring) ClusterSaveConfig(ctx context.Context) *StatusCmd
- func (c Ring) ClusterShards(ctx context.Context) *ClusterShardsCmd
- func (c Ring) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
- func (c Ring) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
- func (c Ring) Command(ctx context.Context) *CommandsInfoCmd
- func (c Ring) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
- func (c Ring) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
- func (c Ring) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
- func (c Ring) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
- func (c Ring) ConfigResetStat(ctx context.Context) *StatusCmd
- func (c Ring) ConfigRewrite(ctx context.Context) *StatusCmd
- func (c Ring) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd
- func (c Ring) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd
- func (c Ring) DBSize(ctx context.Context) *IntCmd
- func (c Ring) DebugObject(ctx context.Context, key string) *StringCmd
- func (c Ring) Decr(ctx context.Context, key string) *IntCmd
- func (c Ring) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd
- func (c Ring) Del(ctx context.Context, keys ...string) *IntCmd
- func (c *Ring) Do(ctx context.Context, args ...interface{}) *Cmd
- func (c Ring) Dump(ctx context.Context, key string) *StringCmd
- func (c Ring) Echo(ctx context.Context, message interface{}) *StringCmd
- func (c Ring) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Ring) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Ring) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Ring) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Ring) Exists(ctx context.Context, keys ...string) *IntCmd
- func (c Ring) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Ring) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Ring) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Ring) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Ring) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Ring) ExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Ring) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Ring) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Ring) FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Ring) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Ring) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
- func (c Ring) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
- func (c Ring) FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd
- func (c Ring) FTAliasDel(ctx context.Context, alias string) *StatusCmd
- func (c Ring) FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd
- func (c Ring) FTAlter(ctx context.Context, index string, skipInitialScan bool, ...) *StatusCmd
- func (c Ring) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
- func (c Ring) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd
- func (c Ring) FTCreate(ctx context.Context, index string, options *FTCreateOptions, ...) *StatusCmd
- func (c Ring) FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd
- func (c Ring) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
- func (c Ring) FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Ring) FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Ring) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
- func (c Ring) FTDropIndex(ctx context.Context, index string) *StatusCmd
- func (c Ring) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
- func (c Ring) FTExplain(ctx context.Context, index string, query string) *StringCmd
- func (c Ring) FTExplainCli(ctx context.Context, key, path string) error
- func (c Ring) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
- func (c Ring) FTInfo(ctx context.Context, index string) *FTInfoCmd
- func (c Ring) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
- func (c Ring) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
- func (c Ring) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
- func (c Ring) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
- func (c Ring) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
- func (c Ring) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
- func (c Ring) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, ...) *StatusCmd
- func (c Ring) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
- func (c Ring) FT_List(ctx context.Context) *StringSliceCmd
- func (c Ring) FlushAll(ctx context.Context) *StatusCmd
- func (c Ring) FlushAllAsync(ctx context.Context) *StatusCmd
- func (c Ring) FlushDB(ctx context.Context) *StatusCmd
- func (c Ring) FlushDBAsync(ctx context.Context) *StatusCmd
- func (c *Ring) ForEachShard(ctx context.Context, fn func(ctx context.Context, client *Client) error) error
- func (c Ring) FunctionDelete(ctx context.Context, libName string) *StringCmd
- func (c Ring) FunctionDump(ctx context.Context) *StringCmd
- func (c Ring) FunctionFlush(ctx context.Context) *StringCmd
- func (c Ring) FunctionFlushAsync(ctx context.Context) *StringCmd
- func (c Ring) FunctionKill(ctx context.Context) *StringCmd
- func (c Ring) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
- func (c Ring) FunctionLoad(ctx context.Context, code string) *StringCmd
- func (c Ring) FunctionLoadReplace(ctx context.Context, code string) *StringCmd
- func (c Ring) FunctionRestore(ctx context.Context, libDump string) *StringCmd
- func (c Ring) FunctionStats(ctx context.Context) *FunctionStatsCmd
- func (c Ring) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
- func (c Ring) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd
- func (c Ring) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
- func (c Ring) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd
- func (c Ring) GeoRadius(ctx context.Context, key string, longitude, latitude float64, ...) *GeoLocationCmd
- func (c Ring) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd
- func (c Ring) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd
- func (c Ring) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, ...) *IntCmd
- func (c Ring) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
- func (c Ring) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
- func (c Ring) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
- func (c Ring) Get(ctx context.Context, key string) *StringCmd
- func (c Ring) GetBit(ctx context.Context, key string, offset int64) *IntCmd
- func (c Ring) GetDel(ctx context.Context, key string) *StringCmd
- func (c Ring) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd
- func (c Ring) GetRange(ctx context.Context, key string, start, end int64) *StringCmd
- func (c Ring) GetSet(ctx context.Context, key string, value interface{}) *StringCmd
- func (c Ring) HDel(ctx context.Context, key string, fields ...string) *IntCmd
- func (c Ring) HExists(ctx context.Context, key, field string) *BoolCmd
- func (c Ring) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Ring) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Ring) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Ring) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Ring) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Ring) HGet(ctx context.Context, key, field string) *StringCmd
- func (c Ring) HGetAll(ctx context.Context, key string) *MapStringStringCmd
- func (c Ring) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd
- func (c Ring) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd
- func (c Ring) HKeys(ctx context.Context, key string) *StringSliceCmd
- func (c Ring) HLen(ctx context.Context, key string) *IntCmd
- func (c Ring) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd
- func (c Ring) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd
- func (c Ring) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Ring) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Ring) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Ring) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Ring) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Ring) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Ring) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Ring) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Ring) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
- func (c Ring) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Ring) HScanNoValues(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Ring) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Ring) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd
- func (c Ring) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Ring) HVals(ctx context.Context, key string) *StringSliceCmd
- func (c Ring) Incr(ctx context.Context, key string) *IntCmd
- func (c Ring) IncrBy(ctx context.Context, key string, value int64) *IntCmd
- func (c Ring) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd
- func (c Ring) Info(ctx context.Context, sections ...string) *StringCmd
- func (c Ring) InfoMap(ctx context.Context, sections ...string) *InfoCmd
- func (c Ring) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
- func (c Ring) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
- func (c Ring) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, ...) *IntSliceCmd
- func (c Ring) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
- func (c Ring) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
- func (c Ring) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
- func (c Ring) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
- func (c Ring) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
- func (c Ring) JSONClear(ctx context.Context, key, path string) *IntCmd
- func (c Ring) JSONDebugMemory(ctx context.Context, key, path string) *IntCmd
- func (c Ring) JSONDel(ctx context.Context, key, path string) *IntCmd
- func (c Ring) JSONForget(ctx context.Context, key, path string) *IntCmd
- func (c Ring) JSONGet(ctx context.Context, key string, paths ...string) *JSONCmd
- func (c Ring) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
- func (c Ring) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
- func (c Ring) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd
- func (c Ring) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
- func (c Ring) JSONMerge(ctx context.Context, key, path string, value string) *StatusCmd
- func (c Ring) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd
- func (c Ring) JSONObjKeys(ctx context.Context, key, path string) *SliceCmd
- func (c Ring) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Ring) JSONSet(ctx context.Context, key, path string, value interface{}) *StatusCmd
- func (c Ring) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
- func (c Ring) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
- func (c Ring) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Ring) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Ring) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
- func (c Ring) Keys(ctx context.Context, pattern string) *StringSliceCmd
- func (c Ring) LCS(ctx context.Context, q *LCSQuery) *LCSCmd
- func (c Ring) LIndex(ctx context.Context, key string, index int64) *StringCmd
- func (c Ring) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd
- func (c Ring) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Ring) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Ring) LLen(ctx context.Context, key string) *IntCmd
- func (c Ring) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
- func (c Ring) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd
- func (c Ring) LPop(ctx context.Context, key string) *StringCmd
- func (c Ring) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Ring) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd
- func (c Ring) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd
- func (c Ring) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Ring) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Ring) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Ring) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd
- func (c Ring) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd
- func (c Ring) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd
- func (c Ring) LastSave(ctx context.Context) *IntCmd
- func (c *Ring) Len() int
- func (c Ring) MGet(ctx context.Context, keys ...string) *SliceCmd
- func (c Ring) MSet(ctx context.Context, values ...interface{}) *StatusCmd
- func (c Ring) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd
- func (c Ring) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd
- func (c Ring) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd
- func (c Ring) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
- func (c Ring) Monitor(ctx context.Context, ch chan string) *MonitorCmd
- func (c Ring) Move(ctx context.Context, key string, db int) *BoolCmd
- func (c Ring) ObjectEncoding(ctx context.Context, key string) *StringCmd
- func (c Ring) ObjectFreq(ctx context.Context, key string) *IntCmd
- func (c Ring) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
- func (c Ring) ObjectRefCount(ctx context.Context, key string) *IntCmd
- func (c *Ring) OnNewNode(fn func(rdb *Client))
- func (c *Ring) Options() *RingOptions
- func (c Ring) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Ring) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Ring) PExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Ring) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd
- func (c Ring) PFCount(ctx context.Context, keys ...string) *IntCmd
- func (c Ring) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd
- func (c *Ring) PSubscribe(ctx context.Context, channels ...string) *PubSub
- func (c Ring) PTTL(ctx context.Context, key string) *DurationCmd
- func (c Ring) Persist(ctx context.Context, key string) *BoolCmd
- func (c Ring) Ping(ctx context.Context) *StatusCmd
- func (c *Ring) Pipeline() Pipeliner
- func (c *Ring) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c *Ring) PoolStats() *PoolStats
- func (c *Ring) Process(ctx context.Context, cmd Cmder) error
- func (c Ring) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Ring) PubSubNumPat(ctx context.Context) *IntCmd
- func (c Ring) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Ring) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Ring) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Ring) Publish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Ring) Quit(_ context.Context) *StatusCmd
- func (c Ring) RPop(ctx context.Context, key string) *StringCmd
- func (c Ring) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Ring) RPopLPush(ctx context.Context, source, destination string) *StringCmd
- func (c Ring) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Ring) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Ring) RandomKey(ctx context.Context) *StringCmd
- func (c Ring) ReadOnly(ctx context.Context) *StatusCmd
- func (c Ring) ReadWrite(ctx context.Context) *StatusCmd
- func (c Ring) Rename(ctx context.Context, key, newkey string) *StatusCmd
- func (c Ring) RenameNX(ctx context.Context, key, newkey string) *BoolCmd
- func (c Ring) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Ring) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Ring) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Ring) SCard(ctx context.Context, key string) *IntCmd
- func (c Ring) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Ring) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Ring) SInter(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Ring) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Ring) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Ring) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd
- func (c Ring) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
- func (c Ring) SMembers(ctx context.Context, key string) *StringSliceCmd
- func (c Ring) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
- func (c Ring) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
- func (c Ring) SPop(ctx context.Context, key string) *StringCmd
- func (c Ring) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Ring) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Ring) SRandMember(ctx context.Context, key string) *StringCmd
- func (c Ring) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Ring) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Ring) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c *Ring) SSubscribe(ctx context.Context, channels ...string) *PubSub
- func (c Ring) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Ring) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Ring) Save(ctx context.Context) *StatusCmd
- func (c Ring) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd
- func (c Ring) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd
- func (c Ring) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
- func (c Ring) ScriptFlush(ctx context.Context) *StatusCmd
- func (c Ring) ScriptKill(ctx context.Context) *StatusCmd
- func (c Ring) ScriptLoad(ctx context.Context, script string) *StringCmd
- func (c Ring) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c *Ring) SetAddrs(addrs map[string]string)
- func (c Ring) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
- func (c Ring) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd
- func (c Ring) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Ring) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Ring) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd
- func (c Ring) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Ring) Shutdown(ctx context.Context) *StatusCmd
- func (c Ring) ShutdownNoSave(ctx context.Context) *StatusCmd
- func (c Ring) ShutdownSave(ctx context.Context) *StatusCmd
- func (c Ring) SlaveOf(ctx context.Context, host, port string) *StatusCmd
- func (c Ring) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
- func (c Ring) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Ring) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd
- func (c Ring) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Ring) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
- func (c Ring) StrLen(ctx context.Context, key string) *IntCmd
- func (c *Ring) Subscribe(ctx context.Context, channels ...string) *PubSub
- func (c Ring) Sync(_ context.Context)
- func (c Ring) TDigestAdd(ctx context.Context, key string, elements ...float64) *StatusCmd
- func (c Ring) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Ring) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Ring) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Ring) TDigestCreate(ctx context.Context, key string) *StatusCmd
- func (c Ring) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
- func (c Ring) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
- func (c Ring) TDigestMax(ctx context.Context, key string) *FloatCmd
- func (c Ring) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, ...) *StatusCmd
- func (c Ring) TDigestMin(ctx context.Context, key string) *FloatCmd
- func (c Ring) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Ring) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Ring) TDigestReset(ctx context.Context, key string) *StatusCmd
- func (c Ring) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Ring) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
- func (c Ring) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Ring) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Ring) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Ring) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Ring) TFunctionDelete(ctx context.Context, libName string) *StatusCmd
- func (c Ring) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
- func (c Ring) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
- func (c Ring) TFunctionLoad(ctx context.Context, lib string) *StatusCmd
- func (c Ring) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
- func (c Ring) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
- func (c Ring) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, ...) *IntCmd
- func (c Ring) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
- func (c Ring) TSCreate(ctx context.Context, key string) *StatusCmd
- func (c Ring) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Ring) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Ring) TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd
- func (c Ring) TSDecrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Ring) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Ring) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
- func (c Ring) TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd
- func (c Ring) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
- func (c Ring) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
- func (c Ring) TSIncrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Ring) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Ring) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
- func (c Ring) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
- func (c Ring) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
- func (c Ring) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
- func (c Ring) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
- func (c Ring) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Ring) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Ring) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Ring) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Ring) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
- func (c Ring) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Ring) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Ring) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Ring) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Ring) TTL(ctx context.Context, key string) *DurationCmd
- func (c Ring) Time(ctx context.Context) *TimeCmd
- func (c Ring) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Ring) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Ring) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Ring) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
- func (c Ring) TopKList(ctx context.Context, key string) *StringSliceCmd
- func (c Ring) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
- func (c Ring) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Ring) TopKReserve(ctx context.Context, key string, k int64) *StatusCmd
- func (c Ring) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
- func (c Ring) Touch(ctx context.Context, keys ...string) *IntCmd
- func (c *Ring) TxPipeline() Pipeliner
- func (c *Ring) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c Ring) Type(ctx context.Context, key string) *StatusCmd
- func (c Ring) Unlink(ctx context.Context, keys ...string) *IntCmd
- func (c Ring) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd
- func (c Ring) WaitAOF(ctx context.Context, numLocal, numSlaves int, timeout time.Duration) *IntCmd
- func (c *Ring) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error
- func (c Ring) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd
- func (c Ring) XAdd(ctx context.Context, a *XAddArgs) *StringCmd
- func (c Ring) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
- func (c Ring) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
- func (c Ring) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
- func (c Ring) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
- func (c Ring) XDel(ctx context.Context, stream string, ids ...string) *IntCmd
- func (c Ring) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Ring) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Ring) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Ring) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Ring) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd
- func (c Ring) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Ring) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
- func (c Ring) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
- func (c Ring) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
- func (c Ring) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
- func (c Ring) XLen(ctx context.Context, stream string) *IntCmd
- func (c Ring) XPending(ctx context.Context, stream, group string) *XPendingCmd
- func (c Ring) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
- func (c Ring) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Ring) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Ring) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
- func (c Ring) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
- func (c Ring) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
- func (c Ring) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Ring) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Ring) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd
- func (c Ring) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd
- func (c Ring) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd
- func (c Ring) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd
- func (c Ring) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Ring) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd
- func (c Ring) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd
- func (c Ring) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Ring) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Ring) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Ring) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Ring) ZCard(ctx context.Context, key string) *IntCmd
- func (c Ring) ZCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Ring) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Ring) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Ring) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd
- func (c Ring) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd
- func (c Ring) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
- func (c Ring) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Ring) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd
- func (c Ring) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd
- func (c Ring) ZLexCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Ring) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
- func (c Ring) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
- func (c Ring) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Ring) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Ring) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Ring) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd
- func (c Ring) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Ring) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
- func (c Ring) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
- func (c Ring) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Ring) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Ring) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Ring) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
- func (c Ring) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Ring) ZRank(ctx context.Context, key, member string) *IntCmd
- func (c Ring) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Ring) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Ring) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd
- func (c Ring) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd
- func (c Ring) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd
- func (c Ring) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Ring) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Ring) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Ring) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Ring) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Ring) ZRevRank(ctx context.Context, key, member string) *IntCmd
- func (c Ring) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Ring) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Ring) ZScore(ctx context.Context, key, member string) *FloatCmd
- func (c Ring) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
- func (c Ring) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
- func (c Ring) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
- type RingOptions
- type RunningScript
- type ScanCmd
- func (cmd *ScanCmd) Args() []interface{}
- func (cmd *ScanCmd) Err() error
- func (cmd *ScanCmd) FullName() string
- func (cmd *ScanCmd) Iterator() *ScanIterator
- func (cmd *ScanCmd) Name() string
- func (cmd *ScanCmd) Result() (keys []string, cursor uint64, err error)
- func (cmd *ScanCmd) SetErr(e error)
- func (cmd *ScanCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ScanCmd) SetVal(page []string, cursor uint64)
- func (cmd *ScanCmd) String() string
- func (cmd *ScanCmd) Val() (keys []string, cursor uint64)
- type ScanDump
- type ScanDumpCmd
- func (cmd *ScanDumpCmd) Args() []interface{}
- func (cmd *ScanDumpCmd) Err() error
- func (cmd *ScanDumpCmd) FullName() string
- func (cmd *ScanDumpCmd) Name() string
- func (cmd *ScanDumpCmd) Result() (ScanDump, error)
- func (cmd *ScanDumpCmd) SetErr(e error)
- func (cmd *ScanDumpCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ScanDumpCmd) SetVal(val ScanDump)
- func (cmd *ScanDumpCmd) String() string
- func (cmd *ScanDumpCmd) Val() ScanDump
- type ScanIterator
- type Scanner
- type Script
- func (s *Script) Eval(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd
- func (s *Script) EvalRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd
- func (s *Script) EvalSha(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd
- func (s *Script) EvalShaRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd
- func (s *Script) Exists(ctx context.Context, c Scripter) *BoolSliceCmd
- func (s *Script) Hash() string
- func (s *Script) Load(ctx context.Context, c Scripter) *StringCmd
- func (s *Script) Run(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd
- func (s *Script) RunRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd
- type Scripter
- type ScriptingFunctionsCmdable
- type SearchAggregator
- type SearchCmdable
- type SearchFieldType
- type SearchQuery
- type SentinelClient
- func (hs *SentinelClient) AddHook(hook Hook)
- func (c *SentinelClient) CkQuorum(ctx context.Context, name string) *StringCmd
- func (c SentinelClient) Close() error
- func (c *SentinelClient) Failover(ctx context.Context, name string) *StatusCmd
- func (c *SentinelClient) FlushConfig(ctx context.Context) *StatusCmd
- func (c *SentinelClient) GetMasterAddrByName(ctx context.Context, name string) *StringSliceCmd
- func (c *SentinelClient) Master(ctx context.Context, name string) *MapStringStringCmd
- func (c *SentinelClient) Masters(ctx context.Context) *SliceCmd
- func (c *SentinelClient) Monitor(ctx context.Context, name, ip, port, quorum string) *StringCmd
- func (c *SentinelClient) PSubscribe(ctx context.Context, channels ...string) *PubSub
- func (c *SentinelClient) Ping(ctx context.Context) *StringCmd
- func (c *SentinelClient) Process(ctx context.Context, cmd Cmder) error
- func (c *SentinelClient) Remove(ctx context.Context, name string) *StringCmd
- func (c *SentinelClient) Replicas(ctx context.Context, name string) *MapStringStringSliceCmd
- func (c *SentinelClient) Reset(ctx context.Context, pattern string) *IntCmd
- func (c *SentinelClient) Sentinels(ctx context.Context, name string) *MapStringStringSliceCmd
- func (c *SentinelClient) Set(ctx context.Context, name, option, value string) *StringCmd
- func (c SentinelClient) String() string
- func (c *SentinelClient) Subscribe(ctx context.Context, channels ...string) *PubSub
- type SetArgs
- type SetCmdable
- type SliceCmd
- func (cmd *SliceCmd) Args() []interface{}
- func (cmd *SliceCmd) Err() error
- func (cmd *SliceCmd) FullName() string
- func (cmd *SliceCmd) Name() string
- func (cmd *SliceCmd) Result() ([]interface{}, error)
- func (cmd *SliceCmd) Scan(dst interface{}) error
- func (cmd *SliceCmd) SetErr(e error)
- func (cmd *SliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *SliceCmd) SetVal(val []interface{})
- func (cmd *SliceCmd) String() string
- func (cmd *SliceCmd) Val() []interface{}
- type SlotRange
- type SlowLog
- type SlowLogCmd
- func (cmd *SlowLogCmd) Args() []interface{}
- func (cmd *SlowLogCmd) Err() error
- func (cmd *SlowLogCmd) FullName() string
- func (cmd *SlowLogCmd) Name() string
- func (cmd *SlowLogCmd) Result() ([]SlowLog, error)
- func (cmd *SlowLogCmd) SetErr(e error)
- func (cmd *SlowLogCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *SlowLogCmd) SetVal(val []SlowLog)
- func (cmd *SlowLogCmd) String() string
- func (cmd *SlowLogCmd) Val() []SlowLog
- type Sort
- type SortedSetCmdable
- type SpellCheckResult
- type SpellCheckSuggestion
- type SpellCheckTerms
- type StatefulCmdable
- type StatusCmd
- func (cmd *StatusCmd) Args() []interface{}
- func (cmd *StatusCmd) Bytes() ([]byte, error)
- func (cmd *StatusCmd) Err() error
- func (cmd *StatusCmd) FullName() string
- func (cmd *StatusCmd) Name() string
- func (cmd *StatusCmd) Result() (string, error)
- func (cmd *StatusCmd) SetErr(e error)
- func (cmd *StatusCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *StatusCmd) SetVal(val string)
- func (cmd *StatusCmd) String() string
- func (cmd *StatusCmd) Val() string
- type StreamCmdable
- type StringCmd
- func (cmd *StringCmd) Args() []interface{}
- func (cmd *StringCmd) Bool() (bool, error)
- func (cmd *StringCmd) Bytes() ([]byte, error)
- func (cmd *StringCmd) Err() error
- func (cmd *StringCmd) Float32() (float32, error)
- func (cmd *StringCmd) Float64() (float64, error)
- func (cmd *StringCmd) FullName() string
- func (cmd *StringCmd) Int() (int, error)
- func (cmd *StringCmd) Int64() (int64, error)
- func (cmd *StringCmd) Name() string
- func (cmd *StringCmd) Result() (string, error)
- func (cmd *StringCmd) Scan(val interface{}) error
- func (cmd *StringCmd) SetErr(e error)
- func (cmd *StringCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *StringCmd) SetVal(val string)
- func (cmd *StringCmd) String() string
- func (cmd *StringCmd) Time() (time.Time, error)
- func (cmd *StringCmd) Uint64() (uint64, error)
- func (cmd *StringCmd) Val() string
- type StringCmdable
- type StringSliceCmd
- func (cmd *StringSliceCmd) Args() []interface{}
- func (cmd *StringSliceCmd) Err() error
- func (cmd *StringSliceCmd) FullName() string
- func (cmd *StringSliceCmd) Name() string
- func (cmd *StringSliceCmd) Result() ([]string, error)
- func (cmd *StringSliceCmd) ScanSlice(container interface{}) error
- func (cmd *StringSliceCmd) SetErr(e error)
- func (cmd *StringSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *StringSliceCmd) SetVal(val []string)
- func (cmd *StringSliceCmd) String() string
- func (cmd *StringSliceCmd) Val() []string
- type StringStructMapCmd
- func (cmd *StringStructMapCmd) Args() []interface{}
- func (cmd *StringStructMapCmd) Err() error
- func (cmd *StringStructMapCmd) FullName() string
- func (cmd *StringStructMapCmd) Name() string
- func (cmd *StringStructMapCmd) Result() (map[string]struct{}, error)
- func (cmd *StringStructMapCmd) SetErr(e error)
- func (cmd *StringStructMapCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *StringStructMapCmd) SetVal(val map[string]struct{})
- func (cmd *StringStructMapCmd) String() string
- func (cmd *StringStructMapCmd) Val() map[string]struct{}
- type Subscription
- type TDigestInfo
- type TDigestInfoCmd
- func (cmd *TDigestInfoCmd) Args() []interface{}
- func (cmd *TDigestInfoCmd) Err() error
- func (cmd *TDigestInfoCmd) FullName() string
- func (cmd *TDigestInfoCmd) Name() string
- func (cmd *TDigestInfoCmd) Result() (TDigestInfo, error)
- func (cmd *TDigestInfoCmd) SetErr(e error)
- func (cmd *TDigestInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *TDigestInfoCmd) SetVal(val TDigestInfo)
- func (cmd *TDigestInfoCmd) String() string
- func (cmd *TDigestInfoCmd) Val() TDigestInfo
- type TDigestMergeOptions
- type TFCallOptions
- type TFunctionListOptions
- type TFunctionLoadOptions
- type TSAlterOptions
- type TSCreateRuleOptions
- type TSGetOptions
- type TSIncrDecrOptions
- type TSInfoOptions
- type TSMGetOptions
- type TSMRangeOptions
- type TSMRevRangeOptions
- type TSOptions
- type TSRangeOptions
- type TSRevRangeOptions
- type TSTimestampValue
- type TSTimestampValueCmd
- func (cmd *TSTimestampValueCmd) Args() []interface{}
- func (cmd *TSTimestampValueCmd) Err() error
- func (cmd *TSTimestampValueCmd) FullName() string
- func (cmd *TSTimestampValueCmd) Name() string
- func (cmd *TSTimestampValueCmd) Result() (TSTimestampValue, error)
- func (cmd *TSTimestampValueCmd) SetErr(e error)
- func (cmd *TSTimestampValueCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *TSTimestampValueCmd) SetVal(val TSTimestampValue)
- func (cmd *TSTimestampValueCmd) String() string
- func (cmd *TSTimestampValueCmd) Val() TSTimestampValue
- type TSTimestampValueSliceCmd
- func (cmd *TSTimestampValueSliceCmd) Args() []interface{}
- func (cmd *TSTimestampValueSliceCmd) Err() error
- func (cmd *TSTimestampValueSliceCmd) FullName() string
- func (cmd *TSTimestampValueSliceCmd) Name() string
- func (cmd *TSTimestampValueSliceCmd) Result() ([]TSTimestampValue, error)
- func (cmd *TSTimestampValueSliceCmd) SetErr(e error)
- func (cmd *TSTimestampValueSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *TSTimestampValueSliceCmd) SetVal(val []TSTimestampValue)
- func (cmd *TSTimestampValueSliceCmd) String() string
- func (cmd *TSTimestampValueSliceCmd) Val() []TSTimestampValue
- type TimeCmd
- func (cmd *TimeCmd) Args() []interface{}
- func (cmd *TimeCmd) Err() error
- func (cmd *TimeCmd) FullName() string
- func (cmd *TimeCmd) Name() string
- func (cmd *TimeCmd) Result() (time.Time, error)
- func (cmd *TimeCmd) SetErr(e error)
- func (cmd *TimeCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *TimeCmd) SetVal(val time.Time)
- func (cmd *TimeCmd) String() string
- func (cmd *TimeCmd) Val() time.Time
- type TimeseriesCmdable
- type TopKInfo
- type TopKInfoCmd
- func (cmd *TopKInfoCmd) Args() []interface{}
- func (cmd *TopKInfoCmd) Err() error
- func (cmd *TopKInfoCmd) FullName() string
- func (cmd *TopKInfoCmd) Name() string
- func (cmd *TopKInfoCmd) Result() (TopKInfo, error)
- func (cmd *TopKInfoCmd) SetErr(e error)
- func (cmd *TopKInfoCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *TopKInfoCmd) SetVal(val TopKInfo)
- func (cmd *TopKInfoCmd) String() string
- func (cmd *TopKInfoCmd) Val() TopKInfo
- type Tx
- func (c Tx) ACLDryRun(ctx context.Context, username string, command ...interface{}) *StringCmd
- func (c Tx) ACLLog(ctx context.Context, count int64) *ACLLogCmd
- func (c Tx) ACLLogReset(ctx context.Context) *StatusCmd
- func (hs *Tx) AddHook(hook Hook)
- func (c Tx) Append(ctx context.Context, key, value string) *IntCmd
- func (c Tx) Auth(ctx context.Context, password string) *StatusCmd
- func (c Tx) AuthACL(ctx context.Context, username, password string) *StatusCmd
- func (c Tx) BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Tx) BFCard(ctx context.Context, key string) *IntCmd
- func (c Tx) BFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Tx) BFInfo(ctx context.Context, key string) *BFInfoCmd
- func (c Tx) BFInfoArg(ctx context.Context, key, option string) *BFInfoCmd
- func (c Tx) BFInfoCapacity(ctx context.Context, key string) *BFInfoCmd
- func (c Tx) BFInfoExpansion(ctx context.Context, key string) *BFInfoCmd
- func (c Tx) BFInfoFilters(ctx context.Context, key string) *BFInfoCmd
- func (c Tx) BFInfoItems(ctx context.Context, key string) *BFInfoCmd
- func (c Tx) BFInfoSize(ctx context.Context, key string) *BFInfoCmd
- func (c Tx) BFInsert(ctx context.Context, key string, options *BFInsertOptions, ...) *BoolSliceCmd
- func (c Tx) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Tx) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Tx) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Tx) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Tx) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
- func (c Tx) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
- func (c Tx) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
- func (c Tx) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Tx) BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, ...) *KeyValuesCmd
- func (c Tx) BLMove(ctx context.Context, source, destination, srcpos, destpos string, ...) *StringCmd
- func (c Tx) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Tx) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
- func (c Tx) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd
- func (c Tx) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, ...) *ZSliceWithKeyCmd
- func (c Tx) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Tx) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
- func (c Tx) BgRewriteAOF(ctx context.Context) *StatusCmd
- func (c Tx) BgSave(ctx context.Context) *StatusCmd
- func (c Tx) BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd
- func (c Tx) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Tx) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
- func (c Tx) BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Tx) BitOpNot(ctx context.Context, destKey string, key string) *IntCmd
- func (c Tx) BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Tx) BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd
- func (c Tx) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd
- func (c Tx) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
- func (c Tx) CFAdd(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Tx) CFAddNX(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Tx) CFCount(ctx context.Context, key string, element interface{}) *IntCmd
- func (c Tx) CFDel(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Tx) CFExists(ctx context.Context, key string, element interface{}) *BoolCmd
- func (c Tx) CFInfo(ctx context.Context, key string) *CFInfoCmd
- func (c Tx) CFInsert(ctx context.Context, key string, options *CFInsertOptions, ...) *BoolSliceCmd
- func (c Tx) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, ...) *IntSliceCmd
- func (c Tx) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
- func (c Tx) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Tx) CFReserve(ctx context.Context, key string, capacity int64) *StatusCmd
- func (c Tx) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
- func (c Tx) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
- func (c Tx) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
- func (c Tx) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
- func (c Tx) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
- func (c Tx) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Tx) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
- func (c Tx) CMSInitByDim(ctx context.Context, key string, width, depth int64) *StatusCmd
- func (c Tx) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
- func (c Tx) CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd
- func (c Tx) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
- func (c Tx) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Tx) ClientGetName(ctx context.Context) *StringCmd
- func (c Tx) ClientID(ctx context.Context) *IntCmd
- func (c Tx) ClientInfo(ctx context.Context) *ClientInfoCmd
- func (c Tx) ClientKill(ctx context.Context, ipPort string) *StatusCmd
- func (c Tx) ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd
- func (c Tx) ClientList(ctx context.Context) *StringCmd
- func (c Tx) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd
- func (c Tx) ClientSetInfo(ctx context.Context, info LibraryInfo) *StatusCmd
- func (c Tx) ClientSetName(ctx context.Context, name string) *BoolCmd
- func (c Tx) ClientUnblock(ctx context.Context, id int64) *IntCmd
- func (c Tx) ClientUnblockWithError(ctx context.Context, id int64) *IntCmd
- func (c Tx) ClientUnpause(ctx context.Context) *BoolCmd
- func (c *Tx) Close(ctx context.Context) error
- func (c Tx) ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Tx) ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Tx) ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd
- func (c Tx) ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd
- func (c Tx) ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd
- func (c Tx) ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd
- func (c Tx) ClusterFailover(ctx context.Context) *StatusCmd
- func (c Tx) ClusterForget(ctx context.Context, nodeID string) *StatusCmd
- func (c Tx) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
- func (c Tx) ClusterInfo(ctx context.Context) *StringCmd
- func (c Tx) ClusterKeySlot(ctx context.Context, key string) *IntCmd
- func (c Tx) ClusterLinks(ctx context.Context) *ClusterLinksCmd
- func (c Tx) ClusterMeet(ctx context.Context, host, port string) *StatusCmd
- func (c Tx) ClusterMyShardID(ctx context.Context) *StringCmd
- func (c Tx) ClusterNodes(ctx context.Context) *StringCmd
- func (c Tx) ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd
- func (c Tx) ClusterResetHard(ctx context.Context) *StatusCmd
- func (c Tx) ClusterResetSoft(ctx context.Context) *StatusCmd
- func (c Tx) ClusterSaveConfig(ctx context.Context) *StatusCmd
- func (c Tx) ClusterShards(ctx context.Context) *ClusterShardsCmd
- func (c Tx) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
- func (c Tx) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
- func (c Tx) Command(ctx context.Context) *CommandsInfoCmd
- func (c Tx) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
- func (c Tx) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
- func (c Tx) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
- func (c Tx) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
- func (c Tx) ConfigResetStat(ctx context.Context) *StatusCmd
- func (c Tx) ConfigRewrite(ctx context.Context) *StatusCmd
- func (c Tx) ConfigSet(ctx context.Context, parameter, value string) *StatusCmd
- func (c Tx) Copy(ctx context.Context, sourceKey, destKey string, db int, replace bool) *IntCmd
- func (c Tx) DBSize(ctx context.Context) *IntCmd
- func (c Tx) DebugObject(ctx context.Context, key string) *StringCmd
- func (c Tx) Decr(ctx context.Context, key string) *IntCmd
- func (c Tx) DecrBy(ctx context.Context, key string, decrement int64) *IntCmd
- func (c Tx) Del(ctx context.Context, keys ...string) *IntCmd
- func (c Tx) Dump(ctx context.Context, key string) *StringCmd
- func (c Tx) Echo(ctx context.Context, message interface{}) *StringCmd
- func (c Tx) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Tx) EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd
- func (c Tx) EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Tx) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd
- func (c Tx) Exists(ctx context.Context, keys ...string) *IntCmd
- func (c Tx) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Tx) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Tx) ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Tx) ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Tx) ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Tx) ExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Tx) ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Tx) FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Tx) FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Tx) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
- func (c Tx) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
- func (c Tx) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
- func (c Tx) FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd
- func (c Tx) FTAliasDel(ctx context.Context, alias string) *StatusCmd
- func (c Tx) FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd
- func (c Tx) FTAlter(ctx context.Context, index string, skipInitialScan bool, ...) *StatusCmd
- func (c Tx) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
- func (c Tx) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd
- func (c Tx) FTCreate(ctx context.Context, index string, options *FTCreateOptions, ...) *StatusCmd
- func (c Tx) FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd
- func (c Tx) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
- func (c Tx) FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Tx) FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd
- func (c Tx) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
- func (c Tx) FTDropIndex(ctx context.Context, index string) *StatusCmd
- func (c Tx) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
- func (c Tx) FTExplain(ctx context.Context, index string, query string) *StringCmd
- func (c Tx) FTExplainCli(ctx context.Context, key, path string) error
- func (c Tx) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
- func (c Tx) FTInfo(ctx context.Context, index string) *FTInfoCmd
- func (c Tx) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
- func (c Tx) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
- func (c Tx) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
- func (c Tx) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
- func (c Tx) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
- func (c Tx) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
- func (c Tx) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, ...) *StatusCmd
- func (c Tx) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
- func (c Tx) FT_List(ctx context.Context) *StringSliceCmd
- func (c Tx) FlushAll(ctx context.Context) *StatusCmd
- func (c Tx) FlushAllAsync(ctx context.Context) *StatusCmd
- func (c Tx) FlushDB(ctx context.Context) *StatusCmd
- func (c Tx) FlushDBAsync(ctx context.Context) *StatusCmd
- func (c Tx) FunctionDelete(ctx context.Context, libName string) *StringCmd
- func (c Tx) FunctionDump(ctx context.Context) *StringCmd
- func (c Tx) FunctionFlush(ctx context.Context) *StringCmd
- func (c Tx) FunctionFlushAsync(ctx context.Context) *StringCmd
- func (c Tx) FunctionKill(ctx context.Context) *StringCmd
- func (c Tx) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
- func (c Tx) FunctionLoad(ctx context.Context, code string) *StringCmd
- func (c Tx) FunctionLoadReplace(ctx context.Context, code string) *StringCmd
- func (c Tx) FunctionRestore(ctx context.Context, libDump string) *StringCmd
- func (c Tx) FunctionStats(ctx context.Context) *FunctionStatsCmd
- func (c Tx) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
- func (c Tx) GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd
- func (c Tx) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
- func (c Tx) GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd
- func (c Tx) GeoRadius(ctx context.Context, key string, longitude, latitude float64, ...) *GeoLocationCmd
- func (c Tx) GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd
- func (c Tx) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd
- func (c Tx) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, ...) *IntCmd
- func (c Tx) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
- func (c Tx) GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd
- func (c Tx) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
- func (c Tx) Get(ctx context.Context, key string) *StringCmd
- func (c Tx) GetBit(ctx context.Context, key string, offset int64) *IntCmd
- func (c Tx) GetDel(ctx context.Context, key string) *StringCmd
- func (c Tx) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd
- func (c Tx) GetRange(ctx context.Context, key string, start, end int64) *StringCmd
- func (c Tx) GetSet(ctx context.Context, key string, value interface{}) *StringCmd
- func (c Tx) HDel(ctx context.Context, key string, fields ...string) *IntCmd
- func (c Tx) HExists(ctx context.Context, key, field string) *BoolCmd
- func (c Tx) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Tx) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Tx) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Tx) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Tx) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Tx) HGet(ctx context.Context, key, field string) *StringCmd
- func (c Tx) HGetAll(ctx context.Context, key string) *MapStringStringCmd
- func (c Tx) HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd
- func (c Tx) HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd
- func (c Tx) HKeys(ctx context.Context, key string) *StringSliceCmd
- func (c Tx) HLen(ctx context.Context, key string) *IntCmd
- func (c Tx) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd
- func (c Tx) HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd
- func (c Tx) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
- func (c Tx) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
- func (c Tx) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, ...) *IntSliceCmd
- func (c Tx) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Tx) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, ...) *IntSliceCmd
- func (c Tx) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Tx) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Tx) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Tx) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
- func (c Tx) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Tx) HScanNoValues(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Tx) HSet(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Tx) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd
- func (c Tx) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
- func (c Tx) HVals(ctx context.Context, key string) *StringSliceCmd
- func (c Tx) Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd
- func (c Tx) Incr(ctx context.Context, key string) *IntCmd
- func (c Tx) IncrBy(ctx context.Context, key string, value int64) *IntCmd
- func (c Tx) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd
- func (c Tx) Info(ctx context.Context, sections ...string) *StringCmd
- func (c Tx) InfoMap(ctx context.Context, sections ...string) *InfoCmd
- func (c Tx) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
- func (c Tx) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
- func (c Tx) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, ...) *IntSliceCmd
- func (c Tx) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
- func (c Tx) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
- func (c Tx) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
- func (c Tx) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
- func (c Tx) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
- func (c Tx) JSONClear(ctx context.Context, key, path string) *IntCmd
- func (c Tx) JSONDebugMemory(ctx context.Context, key, path string) *IntCmd
- func (c Tx) JSONDel(ctx context.Context, key, path string) *IntCmd
- func (c Tx) JSONForget(ctx context.Context, key, path string) *IntCmd
- func (c Tx) JSONGet(ctx context.Context, key string, paths ...string) *JSONCmd
- func (c Tx) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
- func (c Tx) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
- func (c Tx) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd
- func (c Tx) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
- func (c Tx) JSONMerge(ctx context.Context, key, path string, value string) *StatusCmd
- func (c Tx) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd
- func (c Tx) JSONObjKeys(ctx context.Context, key, path string) *SliceCmd
- func (c Tx) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Tx) JSONSet(ctx context.Context, key, path string, value interface{}) *StatusCmd
- func (c Tx) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
- func (c Tx) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
- func (c Tx) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Tx) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
- func (c Tx) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
- func (c Tx) Keys(ctx context.Context, pattern string) *StringSliceCmd
- func (c Tx) LCS(ctx context.Context, q *LCSQuery) *LCSCmd
- func (c Tx) LIndex(ctx context.Context, key string, index int64) *StringCmd
- func (c Tx) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd
- func (c Tx) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Tx) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd
- func (c Tx) LLen(ctx context.Context, key string) *IntCmd
- func (c Tx) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
- func (c Tx) LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd
- func (c Tx) LPop(ctx context.Context, key string) *StringCmd
- func (c Tx) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Tx) LPos(ctx context.Context, key string, value string, a LPosArgs) *IntCmd
- func (c Tx) LPosCount(ctx context.Context, key string, value string, count int64, a LPosArgs) *IntSliceCmd
- func (c Tx) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Tx) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Tx) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Tx) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd
- func (c Tx) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd
- func (c Tx) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd
- func (c Tx) LastSave(ctx context.Context) *IntCmd
- func (c Tx) MGet(ctx context.Context, keys ...string) *SliceCmd
- func (c Tx) MSet(ctx context.Context, values ...interface{}) *StatusCmd
- func (c Tx) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd
- func (c Tx) MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd
- func (c Tx) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd
- func (c Tx) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
- func (c Tx) Monitor(ctx context.Context, ch chan string) *MonitorCmd
- func (c Tx) Move(ctx context.Context, key string, db int) *BoolCmd
- func (c Tx) ObjectEncoding(ctx context.Context, key string) *StringCmd
- func (c Tx) ObjectFreq(ctx context.Context, key string) *IntCmd
- func (c Tx) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
- func (c Tx) ObjectRefCount(ctx context.Context, key string) *IntCmd
- func (c Tx) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
- func (c Tx) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
- func (c Tx) PExpireTime(ctx context.Context, key string) *DurationCmd
- func (c Tx) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd
- func (c Tx) PFCount(ctx context.Context, keys ...string) *IntCmd
- func (c Tx) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd
- func (c Tx) PTTL(ctx context.Context, key string) *DurationCmd
- func (c Tx) Persist(ctx context.Context, key string) *BoolCmd
- func (c Tx) Ping(ctx context.Context) *StatusCmd
- func (c *Tx) Pipeline() Pipeliner
- func (c *Tx) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c *Tx) Process(ctx context.Context, cmd Cmder) error
- func (c Tx) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Tx) PubSubNumPat(ctx context.Context) *IntCmd
- func (c Tx) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Tx) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
- func (c Tx) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
- func (c Tx) Publish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Tx) Quit(_ context.Context) *StatusCmd
- func (c Tx) RPop(ctx context.Context, key string) *StringCmd
- func (c Tx) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Tx) RPopLPush(ctx context.Context, source, destination string) *StringCmd
- func (c Tx) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Tx) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
- func (c Tx) RandomKey(ctx context.Context) *StringCmd
- func (c Tx) ReadOnly(ctx context.Context) *StatusCmd
- func (c Tx) ReadWrite(ctx context.Context) *StatusCmd
- func (c Tx) Rename(ctx context.Context, key, newkey string) *StatusCmd
- func (c Tx) RenameNX(ctx context.Context, key, newkey string) *BoolCmd
- func (c Tx) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Tx) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
- func (c Tx) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Tx) SCard(ctx context.Context, key string) *IntCmd
- func (c Tx) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Tx) SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Tx) SInter(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Tx) SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Tx) SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Tx) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd
- func (c Tx) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
- func (c Tx) SMembers(ctx context.Context, key string) *StringSliceCmd
- func (c Tx) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
- func (c Tx) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
- func (c Tx) SPop(ctx context.Context, key string) *StringCmd
- func (c Tx) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Tx) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd
- func (c Tx) SRandMember(ctx context.Context, key string) *StringCmd
- func (c Tx) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
- func (c Tx) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Tx) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Tx) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Tx) SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Tx) Save(ctx context.Context) *StatusCmd
- func (c Tx) Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd
- func (c Tx) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd
- func (c Tx) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
- func (c Tx) ScriptFlush(ctx context.Context) *StatusCmd
- func (c Tx) ScriptKill(ctx context.Context) *StatusCmd
- func (c Tx) ScriptLoad(ctx context.Context, script string) *StringCmd
- func (c Tx) Select(ctx context.Context, index int) *StatusCmd
- func (c Tx) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Tx) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
- func (c Tx) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd
- func (c Tx) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
- func (c Tx) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Tx) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd
- func (c Tx) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
- func (c Tx) Shutdown(ctx context.Context) *StatusCmd
- func (c Tx) ShutdownNoSave(ctx context.Context) *StatusCmd
- func (c Tx) ShutdownSave(ctx context.Context) *StatusCmd
- func (c Tx) SlaveOf(ctx context.Context, host, port string) *StatusCmd
- func (c Tx) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
- func (c Tx) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Tx) SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd
- func (c Tx) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
- func (c Tx) SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd
- func (c Tx) StrLen(ctx context.Context, key string) *IntCmd
- func (c *Tx) String() string
- func (c Tx) SwapDB(ctx context.Context, index1, index2 int) *StatusCmd
- func (c Tx) Sync(_ context.Context)
- func (c Tx) TDigestAdd(ctx context.Context, key string, elements ...float64) *StatusCmd
- func (c Tx) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Tx) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
- func (c Tx) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Tx) TDigestCreate(ctx context.Context, key string) *StatusCmd
- func (c Tx) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
- func (c Tx) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
- func (c Tx) TDigestMax(ctx context.Context, key string) *FloatCmd
- func (c Tx) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, ...) *StatusCmd
- func (c Tx) TDigestMin(ctx context.Context, key string) *FloatCmd
- func (c Tx) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
- func (c Tx) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Tx) TDigestReset(ctx context.Context, key string) *StatusCmd
- func (c Tx) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
- func (c Tx) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
- func (c Tx) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Tx) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
- func (c Tx) TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Tx) TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, ...) *Cmd
- func (c Tx) TFunctionDelete(ctx context.Context, libName string) *StatusCmd
- func (c Tx) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
- func (c Tx) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
- func (c Tx) TFunctionLoad(ctx context.Context, lib string) *StatusCmd
- func (c Tx) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
- func (c Tx) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
- func (c Tx) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, ...) *IntCmd
- func (c Tx) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
- func (c Tx) TSCreate(ctx context.Context, key string) *StatusCmd
- func (c Tx) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Tx) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, ...) *StatusCmd
- func (c Tx) TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd
- func (c Tx) TSDecrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Tx) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Tx) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
- func (c Tx) TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd
- func (c Tx) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
- func (c Tx) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
- func (c Tx) TSIncrBy(ctx context.Context, Key string, timestamp float64) *IntCmd
- func (c Tx) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
- func (c Tx) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
- func (c Tx) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
- func (c Tx) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
- func (c Tx) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
- func (c Tx) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
- func (c Tx) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Tx) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Tx) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
- func (c Tx) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, ...) *MapStringSliceInterfaceCmd
- func (c Tx) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
- func (c Tx) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Tx) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Tx) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
- func (c Tx) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, ...) *TSTimestampValueSliceCmd
- func (c Tx) TTL(ctx context.Context, key string) *DurationCmd
- func (c Tx) Time(ctx context.Context) *TimeCmd
- func (c Tx) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Tx) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
- func (c Tx) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
- func (c Tx) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
- func (c Tx) TopKList(ctx context.Context, key string) *StringSliceCmd
- func (c Tx) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
- func (c Tx) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
- func (c Tx) TopKReserve(ctx context.Context, key string, k int64) *StatusCmd
- func (c Tx) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
- func (c Tx) Touch(ctx context.Context, keys ...string) *IntCmd
- func (c *Tx) TxPipeline() Pipeliner
- func (c *Tx) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error)
- func (c Tx) Type(ctx context.Context, key string) *StatusCmd
- func (c Tx) Unlink(ctx context.Context, keys ...string) *IntCmd
- func (c *Tx) Unwatch(ctx context.Context, keys ...string) *StatusCmd
- func (c Tx) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd
- func (c Tx) WaitAOF(ctx context.Context, numLocal, numSlaves int, timeout time.Duration) *IntCmd
- func (c *Tx) Watch(ctx context.Context, keys ...string) *StatusCmd
- func (c Tx) XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd
- func (c Tx) XAdd(ctx context.Context, a *XAddArgs) *StringCmd
- func (c Tx) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
- func (c Tx) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
- func (c Tx) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
- func (c Tx) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
- func (c Tx) XDel(ctx context.Context, stream string, ids ...string) *IntCmd
- func (c Tx) XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Tx) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Tx) XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Tx) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd
- func (c Tx) XGroupDestroy(ctx context.Context, stream, group string) *IntCmd
- func (c Tx) XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd
- func (c Tx) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
- func (c Tx) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
- func (c Tx) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
- func (c Tx) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
- func (c Tx) XLen(ctx context.Context, stream string) *IntCmd
- func (c Tx) XPending(ctx context.Context, stream, group string) *XPendingCmd
- func (c Tx) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
- func (c Tx) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Tx) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Tx) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
- func (c Tx) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
- func (c Tx) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
- func (c Tx) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
- func (c Tx) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
- func (c Tx) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd
- func (c Tx) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd
- func (c Tx) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd
- func (c Tx) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd
- func (c Tx) ZAdd(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Tx) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd
- func (c Tx) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd
- func (c Tx) ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Tx) ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Tx) ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Tx) ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd
- func (c Tx) ZCard(ctx context.Context, key string) *IntCmd
- func (c Tx) ZCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Tx) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
- func (c Tx) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd
- func (c Tx) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd
- func (c Tx) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd
- func (c Tx) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
- func (c Tx) ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd
- func (c Tx) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd
- func (c Tx) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd
- func (c Tx) ZLexCount(ctx context.Context, key, min, max string) *IntCmd
- func (c Tx) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
- func (c Tx) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
- func (c Tx) ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Tx) ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd
- func (c Tx) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
- func (c Tx) ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd
- func (c Tx) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Tx) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
- func (c Tx) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
- func (c Tx) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Tx) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Tx) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Tx) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
- func (c Tx) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Tx) ZRank(ctx context.Context, key, member string) *IntCmd
- func (c Tx) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Tx) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd
- func (c Tx) ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd
- func (c Tx) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd
- func (c Tx) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd
- func (c Tx) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
- func (c Tx) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Tx) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
- func (c Tx) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
- func (c Tx) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
- func (c Tx) ZRevRank(ctx context.Context, key, member string) *IntCmd
- func (c Tx) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
- func (c Tx) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd
- func (c Tx) ZScore(ctx context.Context, key, member string) *FloatCmd
- func (c Tx) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
- func (c Tx) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
- func (c Tx) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd
- type UniversalClient
- type UniversalOptions
- type XAddArgs
- type XAutoClaimArgs
- type XAutoClaimCmd
- func (cmd *XAutoClaimCmd) Args() []interface{}
- func (cmd *XAutoClaimCmd) Err() error
- func (cmd *XAutoClaimCmd) FullName() string
- func (cmd *XAutoClaimCmd) Name() string
- func (cmd *XAutoClaimCmd) Result() (messages []XMessage, start string, err error)
- func (cmd *XAutoClaimCmd) SetErr(e error)
- func (cmd *XAutoClaimCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XAutoClaimCmd) SetVal(val []XMessage, start string)
- func (cmd *XAutoClaimCmd) String() string
- func (cmd *XAutoClaimCmd) Val() (messages []XMessage, start string)
- type XAutoClaimJustIDCmd
- func (cmd *XAutoClaimJustIDCmd) Args() []interface{}
- func (cmd *XAutoClaimJustIDCmd) Err() error
- func (cmd *XAutoClaimJustIDCmd) FullName() string
- func (cmd *XAutoClaimJustIDCmd) Name() string
- func (cmd *XAutoClaimJustIDCmd) Result() (ids []string, start string, err error)
- func (cmd *XAutoClaimJustIDCmd) SetErr(e error)
- func (cmd *XAutoClaimJustIDCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XAutoClaimJustIDCmd) SetVal(val []string, start string)
- func (cmd *XAutoClaimJustIDCmd) String() string
- func (cmd *XAutoClaimJustIDCmd) Val() (ids []string, start string)
- type XClaimArgs
- type XInfoConsumer
- type XInfoConsumersCmd
- func (cmd *XInfoConsumersCmd) Args() []interface{}
- func (cmd *XInfoConsumersCmd) Err() error
- func (cmd *XInfoConsumersCmd) FullName() string
- func (cmd *XInfoConsumersCmd) Name() string
- func (cmd *XInfoConsumersCmd) Result() ([]XInfoConsumer, error)
- func (cmd *XInfoConsumersCmd) SetErr(e error)
- func (cmd *XInfoConsumersCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XInfoConsumersCmd) SetVal(val []XInfoConsumer)
- func (cmd *XInfoConsumersCmd) String() string
- func (cmd *XInfoConsumersCmd) Val() []XInfoConsumer
- type XInfoGroup
- type XInfoGroupsCmd
- func (cmd *XInfoGroupsCmd) Args() []interface{}
- func (cmd *XInfoGroupsCmd) Err() error
- func (cmd *XInfoGroupsCmd) FullName() string
- func (cmd *XInfoGroupsCmd) Name() string
- func (cmd *XInfoGroupsCmd) Result() ([]XInfoGroup, error)
- func (cmd *XInfoGroupsCmd) SetErr(e error)
- func (cmd *XInfoGroupsCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XInfoGroupsCmd) SetVal(val []XInfoGroup)
- func (cmd *XInfoGroupsCmd) String() string
- func (cmd *XInfoGroupsCmd) Val() []XInfoGroup
- type XInfoStream
- type XInfoStreamCmd
- func (cmd *XInfoStreamCmd) Args() []interface{}
- func (cmd *XInfoStreamCmd) Err() error
- func (cmd *XInfoStreamCmd) FullName() string
- func (cmd *XInfoStreamCmd) Name() string
- func (cmd *XInfoStreamCmd) Result() (*XInfoStream, error)
- func (cmd *XInfoStreamCmd) SetErr(e error)
- func (cmd *XInfoStreamCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XInfoStreamCmd) SetVal(val *XInfoStream)
- func (cmd *XInfoStreamCmd) String() string
- func (cmd *XInfoStreamCmd) Val() *XInfoStream
- type XInfoStreamConsumer
- type XInfoStreamConsumerPending
- type XInfoStreamFull
- type XInfoStreamFullCmd
- func (cmd *XInfoStreamFullCmd) Args() []interface{}
- func (cmd *XInfoStreamFullCmd) Err() error
- func (cmd *XInfoStreamFullCmd) FullName() string
- func (cmd *XInfoStreamFullCmd) Name() string
- func (cmd *XInfoStreamFullCmd) Result() (*XInfoStreamFull, error)
- func (cmd *XInfoStreamFullCmd) SetErr(e error)
- func (cmd *XInfoStreamFullCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XInfoStreamFullCmd) SetVal(val *XInfoStreamFull)
- func (cmd *XInfoStreamFullCmd) String() string
- func (cmd *XInfoStreamFullCmd) Val() *XInfoStreamFull
- type XInfoStreamGroup
- type XInfoStreamGroupPending
- type XMessage
- type XMessageSliceCmd
- func (cmd *XMessageSliceCmd) Args() []interface{}
- func (cmd *XMessageSliceCmd) Err() error
- func (cmd *XMessageSliceCmd) FullName() string
- func (cmd *XMessageSliceCmd) Name() string
- func (cmd *XMessageSliceCmd) Result() ([]XMessage, error)
- func (cmd *XMessageSliceCmd) SetErr(e error)
- func (cmd *XMessageSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XMessageSliceCmd) SetVal(val []XMessage)
- func (cmd *XMessageSliceCmd) String() string
- func (cmd *XMessageSliceCmd) Val() []XMessage
- type XPending
- type XPendingCmd
- func (cmd *XPendingCmd) Args() []interface{}
- func (cmd *XPendingCmd) Err() error
- func (cmd *XPendingCmd) FullName() string
- func (cmd *XPendingCmd) Name() string
- func (cmd *XPendingCmd) Result() (*XPending, error)
- func (cmd *XPendingCmd) SetErr(e error)
- func (cmd *XPendingCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XPendingCmd) SetVal(val *XPending)
- func (cmd *XPendingCmd) String() string
- func (cmd *XPendingCmd) Val() *XPending
- type XPendingExt
- type XPendingExtArgs
- type XPendingExtCmd
- func (cmd *XPendingExtCmd) Args() []interface{}
- func (cmd *XPendingExtCmd) Err() error
- func (cmd *XPendingExtCmd) FullName() string
- func (cmd *XPendingExtCmd) Name() string
- func (cmd *XPendingExtCmd) Result() ([]XPendingExt, error)
- func (cmd *XPendingExtCmd) SetErr(e error)
- func (cmd *XPendingExtCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XPendingExtCmd) SetVal(val []XPendingExt)
- func (cmd *XPendingExtCmd) String() string
- func (cmd *XPendingExtCmd) Val() []XPendingExt
- type XReadArgs
- type XReadGroupArgs
- type XStream
- type XStreamSliceCmd
- func (cmd *XStreamSliceCmd) Args() []interface{}
- func (cmd *XStreamSliceCmd) Err() error
- func (cmd *XStreamSliceCmd) FullName() string
- func (cmd *XStreamSliceCmd) Name() string
- func (cmd *XStreamSliceCmd) Result() ([]XStream, error)
- func (cmd *XStreamSliceCmd) SetErr(e error)
- func (cmd *XStreamSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *XStreamSliceCmd) SetVal(val []XStream)
- func (cmd *XStreamSliceCmd) String() string
- func (cmd *XStreamSliceCmd) Val() []XStream
- type Z
- type ZAddArgs
- type ZRangeArgs
- type ZRangeBy
- type ZSliceCmd
- func (cmd *ZSliceCmd) Args() []interface{}
- func (cmd *ZSliceCmd) Err() error
- func (cmd *ZSliceCmd) FullName() string
- func (cmd *ZSliceCmd) Name() string
- func (cmd *ZSliceCmd) Result() ([]Z, error)
- func (cmd *ZSliceCmd) SetErr(e error)
- func (cmd *ZSliceCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ZSliceCmd) SetVal(val []Z)
- func (cmd *ZSliceCmd) String() string
- func (cmd *ZSliceCmd) Val() []Z
- type ZSliceWithKeyCmd
- func (cmd *ZSliceWithKeyCmd) Args() []interface{}
- func (cmd *ZSliceWithKeyCmd) Err() error
- func (cmd *ZSliceWithKeyCmd) FullName() string
- func (cmd *ZSliceWithKeyCmd) Name() string
- func (cmd *ZSliceWithKeyCmd) Result() (string, []Z, error)
- func (cmd *ZSliceWithKeyCmd) SetErr(e error)
- func (cmd *ZSliceWithKeyCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ZSliceWithKeyCmd) SetVal(key string, val []Z)
- func (cmd *ZSliceWithKeyCmd) String() string
- func (cmd *ZSliceWithKeyCmd) Val() (string, []Z)
- type ZStore
- type ZWithKey
- type ZWithKeyCmd
- func (cmd *ZWithKeyCmd) Args() []interface{}
- func (cmd *ZWithKeyCmd) Err() error
- func (cmd *ZWithKeyCmd) FullName() string
- func (cmd *ZWithKeyCmd) Name() string
- func (cmd *ZWithKeyCmd) Result() (*ZWithKey, error)
- func (cmd *ZWithKeyCmd) SetErr(e error)
- func (cmd *ZWithKeyCmd) SetFirstKeyPos(keyPos int8)
- func (cmd *ZWithKeyCmd) SetVal(val *ZWithKey)
- func (cmd *ZWithKeyCmd) String() string
- func (cmd *ZWithKeyCmd) Val() *ZWithKey
Examples ¶
- Package (CustomCommand)
- Package (CustomCommand2)
- Package (Instrumentation)
- Client
- Client.BLPop
- Client.HSet
- Client.Incr
- Client.Pipeline
- Client.Pipelined
- Client.Scan
- Client.ScanType
- Client.ScanType (HashType)
- Client.Set
- Client.SetEx
- Client.SlowLogGet
- Client.TxPipeline
- Client.TxPipelined
- Client.Watch
- Client.Watch (Instrumentation)
- Conn (Client_setInfo_libraryVersion)
- Conn (Name)
- MapStringStringCmd.Scan
- NewClient
- NewClusterClient
- NewClusterClient (ManualSetup)
- NewFailoverClient
- NewRing
- NewUniversalClient (Cluster)
- NewUniversalClient (Failover)
- NewUniversalClient (Simple)
- ParseURL
- Pipeline (Instrumentation)
- PubSub
- PubSub.Receive
- ScanCmd.Iterator
- ScanIterator
- Script
- SliceCmd.Scan
Constants ¶
const ( SearchInvalid = SearchAggregator(iota) SearchAvg SearchSum SearchMin SearchMax SearchCount SearchCountDistinct SearchCountDistinctish SearchStdDev SearchQuantile SearchToList SearchFirstValue SearchRandomSample )
const ( SearchFieldTypeInvalid = SearchFieldType(iota) SearchFieldTypeNumeric SearchFieldTypeTag SearchFieldTypeText SearchFieldTypeGeo SearchFieldTypeVector SearchFieldTypeGeoShape )
const ( Invalid = Aggregator(iota) Avg Sum Min Max Range Count First Last StdP StdS VarP VarS Twa )
const BitCountIndexBit string = "BIT"
const BitCountIndexByte string = "BYTE"
const KeepTTL = -1
KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error. For example:
rdb.Set(ctx, key, value, redis.KeepTTL)
const Nil = proto.Nil
Nil reply returned by Redis when key does not exist.
const TxFailedErr = proto.RedisError("redis: transaction failed")
TxFailedErr transaction redis failed.
Variables ¶
var ErrClosed = pool.ErrClosed
ErrClosed performs any operation on the closed client will return this error.
Functions ¶
func HasErrorPrefix ¶
HasErrorPrefix checks if err is a Redis error and the message contains a prefix.
Types ¶
type ACLCmdable ¶
type ACLLogCmd ¶
type ACLLogCmd struct {
// contains filtered or unexported fields
}
func NewACLLogCmd ¶
func (*ACLLogCmd) Result ¶
func (cmd *ACLLogCmd) Result() ([]*ACLLogEntry, error)
func (*ACLLogCmd) SetFirstKeyPos ¶
func (cmd *ACLLogCmd) SetFirstKeyPos(keyPos int8)
func (*ACLLogCmd) SetVal ¶
func (cmd *ACLLogCmd) SetVal(val []*ACLLogEntry)
func (*ACLLogCmd) Val ¶
func (cmd *ACLLogCmd) Val() []*ACLLogEntry
type ACLLogEntry ¶
type AggregateCmd ¶
type AggregateCmd struct {
// contains filtered or unexported fields
}
func NewAggregateCmd ¶
func NewAggregateCmd(ctx context.Context, args ...interface{}) *AggregateCmd
func (*AggregateCmd) RawResult ¶
func (cmd *AggregateCmd) RawResult() (interface{}, error)
func (*AggregateCmd) RawVal ¶
func (cmd *AggregateCmd) RawVal() interface{}
func (*AggregateCmd) Result ¶
func (cmd *AggregateCmd) Result() (*FTAggregateResult, error)
func (*AggregateCmd) SetFirstKeyPos ¶
func (cmd *AggregateCmd) SetFirstKeyPos(keyPos int8)
func (*AggregateCmd) SetVal ¶
func (cmd *AggregateCmd) SetVal(val *FTAggregateResult)
func (*AggregateCmd) String ¶
func (cmd *AggregateCmd) String() string
func (*AggregateCmd) Val ¶
func (cmd *AggregateCmd) Val() *FTAggregateResult
type AggregateQuery ¶
type AggregateQuery []interface{}
func FTAggregateQuery ¶
func FTAggregateQuery(query string, options *FTAggregateOptions) AggregateQuery
type AggregateRow ¶
type AggregateRow struct {
Fields map[string]interface{}
}
type Aggregator ¶
type Aggregator int
func (Aggregator) String ¶
func (a Aggregator) String() string
type BFInfoCmd ¶
type BFInfoCmd struct {
// contains filtered or unexported fields
}
func NewBFInfoCmd ¶
func (*BFInfoCmd) SetFirstKeyPos ¶
func (cmd *BFInfoCmd) SetFirstKeyPos(keyPos int8)
type BFInsertOptions ¶
type BFReserveOptions ¶
type BitMapCmdable ¶
type BitMapCmdable interface { GetBit(ctx context.Context, key string, offset int64) *IntCmd SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd BitCount(ctx context.Context, key string, bitCount *BitCount) *IntCmd BitOpAnd(ctx context.Context, destKey string, keys ...string) *IntCmd BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitOpNot(ctx context.Context, destKey string, key string) *IntCmd BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd }
type BoolCmd ¶
type BoolCmd struct {
// contains filtered or unexported fields
}
func NewBoolCmd ¶
func NewBoolResult ¶
NewBoolResult returns a BoolCmd initialised with val and err for testing.
func (*BoolCmd) SetFirstKeyPos ¶
func (cmd *BoolCmd) SetFirstKeyPos(keyPos int8)
type BoolSliceCmd ¶
type BoolSliceCmd struct {
// contains filtered or unexported fields
}
func NewBoolSliceCmd ¶
func NewBoolSliceCmd(ctx context.Context, args ...interface{}) *BoolSliceCmd
func NewBoolSliceResult ¶
func NewBoolSliceResult(val []bool, err error) *BoolSliceCmd
NewBoolSliceResult returns a BoolSliceCmd initialised with val and err for testing.
func (*BoolSliceCmd) Result ¶
func (cmd *BoolSliceCmd) Result() ([]bool, error)
func (*BoolSliceCmd) SetFirstKeyPos ¶
func (cmd *BoolSliceCmd) SetFirstKeyPos(keyPos int8)
func (*BoolSliceCmd) SetVal ¶
func (cmd *BoolSliceCmd) SetVal(val []bool)
func (*BoolSliceCmd) String ¶
func (cmd *BoolSliceCmd) String() string
func (*BoolSliceCmd) Val ¶
func (cmd *BoolSliceCmd) Val() []bool
type CFInfoCmd ¶
type CFInfoCmd struct {
// contains filtered or unexported fields
}
func NewCFInfoCmd ¶
func (*CFInfoCmd) SetFirstKeyPos ¶
func (cmd *CFInfoCmd) SetFirstKeyPos(keyPos int8)
type CFInsertOptions ¶
type CFReserveOptions ¶
type CMSInfoCmd ¶
type CMSInfoCmd struct {
// contains filtered or unexported fields
}
func NewCMSInfoCmd ¶
func NewCMSInfoCmd(ctx context.Context, args ...interface{}) *CMSInfoCmd
func (*CMSInfoCmd) Result ¶
func (cmd *CMSInfoCmd) Result() (CMSInfo, error)
func (*CMSInfoCmd) SetFirstKeyPos ¶
func (cmd *CMSInfoCmd) SetFirstKeyPos(keyPos int8)
func (*CMSInfoCmd) SetVal ¶
func (cmd *CMSInfoCmd) SetVal(val CMSInfo)
func (*CMSInfoCmd) String ¶
func (cmd *CMSInfoCmd) String() string
func (*CMSInfoCmd) Val ¶
func (cmd *CMSInfoCmd) Val() CMSInfo
type ChannelOption ¶
type ChannelOption func(c *channel)
func WithChannelHealthCheckInterval ¶
func WithChannelHealthCheckInterval(d time.Duration) ChannelOption
WithChannelHealthCheckInterval specifies the health check interval. PubSub will ping Redis Server if it does not receive any messages within the interval. To disable health check, use zero interval.
The default is 3 seconds.
func WithChannelSendTimeout ¶
func WithChannelSendTimeout(d time.Duration) ChannelOption
WithChannelSendTimeout specifies the channel send timeout after which the message is dropped.
The default is 60 seconds.
func WithChannelSize ¶
func WithChannelSize(size int) ChannelOption
WithChannelSize specifies the Go chan size that is used to buffer incoming messages.
The default is 100 messages.
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.
Client creates and frees connections automatically; it also maintains a free pool of idle connections. You can control the pool size with Config.PoolSize option.
Example ¶
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) }
Output: key value missing_key does not exist
func NewClient ¶
NewClient returns a client to the Redis Server specified by Options.
Example ¶
rdb := redis.NewClient(&redis.Options{ Addr: "localhost:6379", // use default Addr Password: "", // no password set DB: 0, // use default DB }) pong, err := rdb.Ping(ctx).Result() fmt.Println(pong, err)
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 ¶
// See http://redis.io/topics/sentinel for instructions how to // setup Redis Sentinel. rdb := redis.NewFailoverClient(&redis.FailoverOptions{ MasterName: "master", SentinelAddrs: []string{":26379"}, }) rdb.Ping(ctx)
Output:
func (Client) ACLLogReset ¶
func (*Client) AddHook ¶
func (hs *Client) AddHook(hook Hook)
AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2:
client.AddHook(hook-1, hook-2)
hook-1:
func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } }
hook-2:
func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } }
The execution sequence is:
hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end
Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed.
func (Client) BFAdd ¶
BFAdd adds an item to a Bloom filter. For more information - https://redis.io/commands/bf.add/
func (Client) BFCard ¶
BFCard returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter). For more information - https://redis.io/commands/bf.card/
func (Client) BFExists ¶
BFExists determines whether a given item was added to a Bloom filter. For more information - https://redis.io/commands/bf.exists/
func (Client) BFInfo ¶
Returns information about a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Client) BFInfoArg ¶
BFInfoArg returns information about a specific option of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Client) BFInfoCapacity ¶
BFInfoCapacity returns information about the capacity of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Client) BFInfoExpansion ¶
BFInfoExpansion returns information about the expansion rate of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Client) BFInfoFilters ¶
BFInfoFilters returns information about the filters of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Client) BFInfoItems ¶
BFInfoItems returns information about the items of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Client) BFInfoSize ¶
BFInfoSize returns information about the size of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Client) BFInsert ¶
func (c Client) BFInsert(ctx context.Context, key string, options *BFInsertOptions, elements ...interface{}) *BoolSliceCmd
BFInsert inserts elements into a Bloom filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. For more information - https://redis.io/commands/bf.insert/
func (Client) BFLoadChunk ¶
func (c Client) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
BFLoadChunk restores a Bloom filter previously saved using BF.SCANDUMP. For more information - https://redis.io/commands/bf.loadchunk/
func (Client) BFMAdd ¶
func (c Client) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMAdd adds multiple elements to a Bloom filter. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/bf.madd/
func (Client) BFMExists ¶
func (c Client) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMExists check if multiple elements exist in a Bloom filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/bf.mexists/
func (Client) BFReserve ¶
func (c Client) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserve creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. For more information - https://redis.io/commands/bf.reserve/
func (Client) BFReserveExpansion ¶
func (c Client) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
BFReserveExpansion creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying an expansion rate for the filter. For more information - https://redis.io/commands/bf.reserve/
func (Client) BFReserveNonScaling ¶
func (c Client) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserveNonScaling creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying that the filter should not scale. For more information - https://redis.io/commands/bf.reserve/
func (Client) BFReserveWithArgs ¶
func (c Client) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
BFReserveWithArgs creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying additional options such as expansion rate and non-scaling behavior. For more information - https://redis.io/commands/bf.reserve/
func (Client) BFScanDump ¶
func (c Client) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
Begins an incremental save of the Bloom filter. This command is useful for large Bloom filters that cannot fit into the DUMP and RESTORE model. For more information - https://redis.io/commands/bf.scandump/
func (Client) BLPop ¶
Example ¶
if err := rdb.RPush(ctx, "queue", "message").Err(); err != nil { panic(err) } // use `rdb.BLPop(ctx, 0, "queue")` for infinite waiting time result, err := rdb.BLPop(ctx, 1*time.Second, "queue").Result() if err != nil { panic(err) } fmt.Println(result[0], result[1])
Output: queue message
func (Client) BRPopLPush ¶
func (Client) BZMPop ¶
func (c Client) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd
BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set")
func (Client) BgRewriteAOF ¶
func (Client) BitField ¶
func (c Client) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitField accepts multiple values:
- BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
- BitField([]string{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
- BitField([]interface{}{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
func (Client) BitFieldRO ¶
func (c Client) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitFieldRO - Read-only variant of the BITFIELD command. It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas. - BitFieldRO(ctx, key, "<Encoding0>", "<Offset0>", "<Encoding1>","<Offset1>")
func (Client) BitPos ¶
BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`.
func (Client) BitPosSpan ¶
func (c Client) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte
func (Client) CFAdd ¶
CFAdd adds an element to a Cuckoo filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.add/
func (Client) CFAddNX ¶
CFAddNX adds an element to a Cuckoo filter only if it does not already exist in the filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.addnx/
func (Client) CFCount ¶
CFCount returns an estimate of the number of times an element may be in a Cuckoo Filter. For more information - https://redis.io/commands/cf.count/
func (Client) CFDel ¶
CFDel deletes an item once from the cuckoo filter. For more information - https://redis.io/commands/cf.del/
func (Client) CFExists ¶
CFExists determines whether an item may exist in the Cuckoo Filter or not. For more information - https://redis.io/commands/cf.exists/
func (Client) CFInfo ¶
CFInfo returns information about a Cuckoo filter. For more information - https://redis.io/commands/cf.info/
func (Client) CFInsert ¶
func (c Client) CFInsert(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *BoolSliceCmd
CFInsert inserts elements into a Cuckoo filter. This function also allows for specifying additional options such as capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insert/
func (Client) CFInsertNX ¶
func (c Client) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *IntSliceCmd
CFInsertNX inserts elements into a Cuckoo filter only if they do not already exist in the filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of integers indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insertnx/
func (Client) CFLoadChunk ¶
func (c Client) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
CFLoadChunk restores a filter previously saved using SCANDUMP. For more information - https://redis.io/commands/cf.loadchunk/
func (Client) CFMExists ¶
func (c Client) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
CFMExists check if multiple elements exist in a Cuckoo filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/cf.mexists/
func (Client) CFReserve ¶
CFReserve creates an empty Cuckoo filter with the specified capacity. For more information - https://redis.io/commands/cf.reserve/
func (Client) CFReserveBucketSize ¶
func (c Client) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
CFReserveBucketSize creates an empty Cuckoo filter with the specified capacity and bucket size. For more information - https://redis.io/commands/cf.reserve/
func (Client) CFReserveExpansion ¶
func (c Client) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
CFReserveExpansion creates an empty Cuckoo filter with the specified capacity and expansion rate. For more information - https://redis.io/commands/cf.reserve/
func (Client) CFReserveMaxIterations ¶
func (c Client) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
CFReserveMaxIterations creates an empty Cuckoo filter with the specified capacity and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Client) CFReserveWithArgs ¶
func (c Client) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
CFReserveWithArgs creates an empty Cuckoo filter with the specified options. This function allows for specifying additional options such as bucket size and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Client) CFScanDump ¶
func (c Client) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
CFScanDump begins an incremental save of the cuckoo filter. For more information - https://redis.io/commands/cf.scandump/
func (Client) CMSIncrBy ¶
func (c Client) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSIncrBy increments the count of one or more items in a Count-Min Sketch filter. Returns an array of integers representing the updated count of each item. For more information - https://redis.io/commands/cms.incrby/
func (Client) CMSInfo ¶
func (c Client) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
CMSInfo returns information about a Count-Min Sketch filter. For more information - https://redis.io/commands/cms.info/
func (Client) CMSInitByDim ¶
CMSInitByDim creates an empty Count-Min Sketch filter with the specified dimensions. For more information - https://redis.io/commands/cms.initbydim/
func (Client) CMSInitByProb ¶
func (c Client) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
CMSInitByProb creates an empty Count-Min Sketch filter with the specified error rate and probability. For more information - https://redis.io/commands/cms.initbyprob/
func (Client) CMSMerge ¶
CMSMerge merges multiple Count-Min Sketch filters into a single filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Client) CMSMergeWithWeight ¶
func (c Client) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
CMSMergeWithWeight merges multiple Count-Min Sketch filters into a single filter with weights for each source filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Client) CMSQuery ¶
func (c Client) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSQuery returns count for item(s). For more information - https://redis.io/commands/cms.query/
func (Client) ClientGetName ¶
ClientGetName returns the name of the connection.
func (Client) ClientInfo ¶
func (c Client) ClientInfo(ctx context.Context) *ClientInfoCmd
func (Client) ClientKill ¶
func (Client) ClientKillByFilter ¶
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
func (Client) ClientList ¶
func (Client) ClientPause ¶
func (Client) ClientUnblockWithError ¶
func (Client) ClientUnpause ¶
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 (Client) ClusterAddSlotsRange ¶
func (Client) ClusterCountFailureReports ¶
func (Client) ClusterCountKeysInSlot ¶
func (Client) ClusterDelSlots ¶
func (Client) ClusterDelSlotsRange ¶
func (Client) ClusterFailover ¶
func (Client) ClusterForget ¶
func (Client) ClusterGetKeysInSlot ¶
func (c Client) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
func (Client) ClusterInfo ¶
func (Client) ClusterKeySlot ¶
func (Client) ClusterLinks ¶
func (c Client) ClusterLinks(ctx context.Context) *ClusterLinksCmd
func (Client) ClusterMeet ¶
func (Client) ClusterMyShardID ¶
func (Client) ClusterNodes ¶
func (Client) ClusterReplicate ¶
func (Client) ClusterResetHard ¶
func (Client) ClusterResetSoft ¶
func (Client) ClusterSaveConfig ¶
func (Client) ClusterShards ¶
func (c Client) ClusterShards(ctx context.Context) *ClusterShardsCmd
func (Client) ClusterSlaves ¶
func (c Client) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
func (Client) ClusterSlots ¶
func (c Client) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
func (Client) Command ¶
func (c Client) Command(ctx context.Context) *CommandsInfoCmd
func (Client) CommandGetKeys ¶
func (c Client) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
func (Client) CommandGetKeysAndFlags ¶
func (c Client) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
func (Client) CommandList ¶
func (c Client) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
func (Client) ConfigGet ¶
func (c Client) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
func (Client) ConfigResetStat ¶
func (Client) ConfigRewrite ¶
func (Client) ExpireTime ¶
func (c Client) ExpireTime(ctx context.Context, key string) *DurationCmd
func (Client) FCallRo ¶
func (c Client) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
FCallRo this function simply calls FCallRO, Deprecated: to maintain convention FCallRO.
func (Client) FTAggregate ¶
func (c Client) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
FTAggregate - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Client) FTAggregateWithArgs ¶
func (c Client) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
FTAggregateWithArgs - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. This function also allows for specifying additional options such as: Verbatim, LoadAll, Load, Timeout, GroupBy, SortBy, SortByMax, Apply, LimitOffset, Limit, Filter, WithCursor, Params, and DialectVersion. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Client) FTAliasAdd ¶
FTAliasAdd - Adds an alias to an index. The 'index' parameter specifies the index to which the alias is added, and the 'alias' parameter specifies the alias. For more information, please refer to the Redis documentation: [FT.ALIASADD]: (https://redis.io/commands/ft.aliasadd/)
func (Client) FTAliasDel ¶
FTAliasDel - Removes an alias from an index. The 'alias' parameter specifies the alias to be removed. For more information, please refer to the Redis documentation: [FT.ALIASDEL]: (https://redis.io/commands/ft.aliasdel/)
func (Client) FTAliasUpdate ¶
FTAliasUpdate - Updates an alias to an index. The 'index' parameter specifies the index to which the alias is updated, and the 'alias' parameter specifies the alias. If the alias already exists for a different index, it updates the alias to point to the specified index instead. For more information, please refer to the Redis documentation: [FT.ALIASUPDATE]: (https://redis.io/commands/ft.aliasupdate/)
func (Client) FTAlter ¶
func (c Client) FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd
FTAlter - Alters the definition of an existing index. The 'index' parameter specifies the index to alter, and the 'skipInitialScan' parameter specifies whether to skip the initial scan. The 'definition' parameter specifies the new definition for the index. For more information, please refer to the Redis documentation: [FT.ALTER]: (https://redis.io/commands/ft.alter/)
func (Client) FTConfigGet ¶
func (c Client) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
FTConfigGet - Retrieves the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to retrieve. For more information, please refer to the Redis documentation: [FT.CONFIG GET]: (https://redis.io/commands/ft.config-get/)
func (Client) FTConfigSet ¶
FTConfigSet - Sets the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to set, and the 'value' parameter specifies the new value. For more information, please refer to the Redis documentation: [FT.CONFIG SET]: (https://redis.io/commands/ft.config-set/)
func (Client) FTCreate ¶
func (c Client) FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd
FTCreate - Creates a new index with the given options and schema. The 'index' parameter specifies the name of the index to create. The 'options' parameter specifies various options for the index, such as: whether to index hashes or JSONs, prefixes, filters, default language, score, score field, payload field, etc. The 'schema' parameter specifies the schema for the index, which includes the field name, field type, etc. For more information, please refer to the Redis documentation: [FT.CREATE]: (https://redis.io/commands/ft.create/)
func (Client) FTCursorDel ¶
FTCursorDel - Deletes a cursor from an existing index. The 'index' parameter specifies the index from which to delete the cursor, and the 'cursorId' parameter specifies the ID of the cursor to delete. For more information, please refer to the Redis documentation: [FT.CURSOR DEL]: (https://redis.io/commands/ft.cursor-del/)
func (Client) FTCursorRead ¶
func (c Client) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
FTCursorRead - Reads the next results from an existing cursor. The 'index' parameter specifies the index from which to read the cursor, the 'cursorId' parameter specifies the ID of the cursor to read, and the 'count' parameter specifies the number of results to read. For more information, please refer to the Redis documentation: [FT.CURSOR READ]: (https://redis.io/commands/ft.cursor-read/)
func (Client) FTDictAdd ¶
FTDictAdd - Adds terms to a dictionary. The 'dict' parameter specifies the dictionary to which to add the terms, and the 'term' parameter specifies the terms to add. For more information, please refer to the Redis documentation: [FT.DICTADD]: (https://redis.io/commands/ft.dictadd/)
func (Client) FTDictDel ¶
FTDictDel - Deletes terms from a dictionary. The 'dict' parameter specifies the dictionary from which to delete the terms, and the 'term' parameter specifies the terms to delete. For more information, please refer to the Redis documentation: [FT.DICTDEL]: (https://redis.io/commands/ft.dictdel/)
func (Client) FTDictDump ¶
func (c Client) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
FTDictDump - Returns all terms in the specified dictionary. The 'dict' parameter specifies the dictionary from which to return the terms. For more information, please refer to the Redis documentation: [FT.DICTDUMP]: (https://redis.io/commands/ft.dictdump/)
func (Client) FTDropIndex ¶
FTDropIndex - Deletes an index. The 'index' parameter specifies the index to delete. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Client) FTDropIndexWithArgs ¶
func (c Client) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
FTDropIndexWithArgs - Deletes an index with options. The 'index' parameter specifies the index to delete, and the 'options' parameter specifies the DeleteDocs option for docs deletion. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Client) FTExplain ¶
FTExplain - Returns the execution plan for a complex query. The 'index' parameter specifies the index to query, and the 'query' parameter specifies the query string. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Client) FTExplainCli ¶
FTExplainCli - Returns the execution plan for a complex query. [Not Implemented] For more information, see https://redis.io/commands/ft.explaincli/
func (Client) FTExplainWithArgs ¶
func (c Client) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
FTExplainWithArgs - Returns the execution plan for a complex query with options. The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Client) FTInfo ¶
FTInfo - Retrieves information about an index. The 'index' parameter specifies the index to retrieve information about. For more information, please refer to the Redis documentation: [FT.INFO]: (https://redis.io/commands/ft.info/)
func (Client) FTSearch ¶
func (c Client) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
FTSearch - Executes a search query on an index. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Client) FTSearchWithArgs ¶
func (c Client) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
FTSearchWithArgs - Executes a search query on an index with additional options. The 'index' parameter specifies the index to search, the 'query' parameter specifies the search query, and the 'options' parameter specifies additional options for the search. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Client) FTSpellCheck ¶
func (c Client) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
FTSpellCheck - Checks a query string for spelling errors. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Client) FTSpellCheckWithArgs ¶
func (c Client) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
FTSpellCheckWithArgs - Checks a query string for spelling errors with additional options. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Client) FTSynDump ¶
func (c Client) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
FTSynDump - Dumps the contents of a synonym group. The 'index' parameter specifies the index to dump. For more information, please refer to the Redis documentation: [FT.SYNDUMP]: (https://redis.io/commands/ft.syndump/)
func (Client) FTSynUpdate ¶
func (c Client) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
FTSynUpdate - Creates or updates a synonym group with additional terms. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Client) FTSynUpdateWithArgs ¶
func (c Client) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd
FTSynUpdateWithArgs - Creates or updates a synonym group with additional terms and options. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, the 'options' parameter specifies additional options for the update, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Client) FTTagVals ¶
func (c Client) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
FTTagVals - Returns all distinct values indexed in a tag field. The 'index' parameter specifies the index to check, and the 'field' parameter specifies the tag field to retrieve values from. For more information, please refer to the Redis documentation: [FT.TAGVALS]: (https://redis.io/commands/ft.tagvals/)
func (Client) FT_List ¶
func (c Client) FT_List(ctx context.Context) *StringSliceCmd
FT_List - Lists all the existing indexes in the database. For more information, please refer to the Redis documentation: [FT._LIST]: (https://redis.io/commands/ft._list/)
func (Client) FlushAllAsync ¶
func (Client) FlushDBAsync ¶
func (Client) FunctionDelete ¶
func (Client) FunctionDump ¶
func (Client) FunctionFlush ¶
func (Client) FunctionFlushAsync ¶
func (Client) FunctionKill ¶
func (Client) FunctionList ¶
func (c Client) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
func (Client) FunctionLoad ¶
func (Client) FunctionLoadReplace ¶
func (Client) FunctionRestore ¶
func (Client) FunctionStats ¶
func (c Client) FunctionStats(ctx context.Context) *FunctionStatsCmd
func (Client) GeoAdd ¶
func (c Client) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
func (Client) GeoHash ¶
func (c Client) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
func (Client) GeoRadius ¶
func (c Client) GeoRadius( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
func (Client) GeoRadiusByMember ¶
func (c Client) GeoRadiusByMember( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
func (Client) GeoRadiusByMemberStore ¶
func (c Client) GeoRadiusByMemberStore( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
func (Client) GeoRadiusStore ¶
func (c Client) GeoRadiusStore( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
func (Client) GeoSearch ¶
func (c Client) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
func (Client) GeoSearchLocation ¶
func (c Client) GeoSearchLocation( ctx context.Context, key string, q *GeoSearchLocationQuery, ) *GeoSearchLocationCmd
func (Client) GeoSearchStore ¶
func (c Client) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
func (Client) Get ¶
Get Redis `GET key` command. It returns redis.Nil error when key does not exist.
func (Client) GetEx ¶
GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0.
func (Client) HExpire ¶
func (c Client) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Client) HExpireAt ¶
func (c Client) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds. Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields. The command sets absolute expiration times based on the UNIX timestamp provided. For more information - https://redis.io/commands/hexpireat/
func (Client) HExpireAtWithArgs ¶
func (c Client) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Client) HExpireTime ¶
func (c Client) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds. Requires a key and the fields themselves to fetch their expiration timestamps. This command returns the expiration times for each field or error/status codes for each field as specified. For more information - https://redis.io/commands/hexpiretime/
func (Client) HExpireWithArgs ¶
func (c Client) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Client) HGetAll ¶
func (c Client) HGetAll(ctx context.Context, key string) *MapStringStringCmd
func (Client) HIncrByFloat ¶
func (Client) HMGet ¶
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.
func (Client) HPExpire ¶
func (c Client) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HPExpire - Sets the expiration time for specified fields in a hash in milliseconds. Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields. The command modifies the standard time.Duration to milliseconds for the Redis command. For more information - https://redis.io/commands/hpexpire/
func (Client) HPExpireAt ¶
func (c Client) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds. Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds. For more information - https://redis.io/commands/hpexpireat/
func (Client) HPExpireAtWithArgs ¶
func (c Client) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Client) HPExpireTime ¶
func (c Client) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds. Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters. Provides the expiration timestamp for each field in milliseconds. For more information - https://redis.io/commands/hexpiretime/
func (Client) HPExpireWithArgs ¶
func (c Client) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Client) HPTTL ¶
func (c Client) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds. Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields. This command provides the TTL in milliseconds for each field or returns error/status codes as needed. For more information - https://redis.io/commands/hpttl/
func (Client) HPersist ¶
func (c Client) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPersist - Removes the expiration time from specified fields in a hash. Accepts a key and the fields themselves. This command ensures that each field specified will have its expiration removed if present. For more information - https://redis.io/commands/hpersist/
func (Client) HRandField ¶
func (c Client) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
func (Client) HRandFieldWithValues ¶
func (c Client) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
func (Client) HScanNoValues ¶
func (Client) HSet ¶
HSet accepts values in following formats:
HSet("myhash", "key1", "value1", "key2", "value2")
HSet("myhash", []string{"key1", "value1", "key2", "value2"})
HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` }
HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface.
Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute.
Example ¶
// Set "redis" tag for hash key type ExampleUser struct { Name string `redis:"name"` Age int `redis:"age"` } items := ExampleUser{"jane", 22} err := rdb.HSet(ctx, "user:1", items).Err() if err != nil { panic(err) }
Output:
func (Client) HTTL ¶
func (c Client) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds. Requires a key and the fields themselves. It returns the TTL for each specified field. This command fetches the TTL in seconds for each field or returns error/status codes as appropriate. For more information - https://redis.io/commands/httl/
func (Client) Incr ¶
Example ¶
result, err := rdb.Incr(ctx, "counter").Result() if err != nil { panic(err) } fmt.Println(result)
Output: 1
func (Client) IncrByFloat ¶
func (Client) JSONArrAppend ¶
func (c Client) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
JSONArrAppend adds the provided JSON values to the end of the array at the given path. For more information, see https://redis.io/commands/json.arrappend
func (Client) JSONArrIndex ¶
func (c Client) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
JSONArrIndex searches for the first occurrence of the provided JSON value in the array at the given path. For more information, see https://redis.io/commands/json.arrindex
func (Client) JSONArrIndexWithArgs ¶
func (c Client) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, value ...interface{}) *IntSliceCmd
JSONArrIndexWithArgs searches for the first occurrence of a JSON value in an array while allowing the start and stop options to be provided. For more information, see https://redis.io/commands/json.arrindex
func (Client) JSONArrInsert ¶
func (c Client) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
JSONArrInsert inserts the JSON values into the array at the specified path before the index (shifts to the right). For more information, see https://redis.io/commands/json.arrinsert
func (Client) JSONArrLen ¶
func (c Client) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
JSONArrLen reports the length of the JSON array at the specified path in the given key. For more information, see https://redis.io/commands/json.arrlen
func (Client) JSONArrPop ¶
func (c Client) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
JSONArrPop removes and returns an element from the specified index in the array. For more information, see https://redis.io/commands/json.arrpop
func (Client) JSONArrTrim ¶
func (c Client) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
JSONArrTrim trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Client) JSONArrTrimWithArgs ¶
func (c Client) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
JSONArrTrimWithArgs trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Client) JSONClear ¶
JSONClear clears container values (arrays/objects) and sets numeric values to 0. For more information, see https://redis.io/commands/json.clear
func (Client) JSONDebugMemory ¶
JSONDebugMemory reports a value's memory usage in bytes (unimplemented) For more information, see https://redis.io/commands/json.debug-memory
func (Client) JSONDel ¶
JSONDel deletes a value. For more information, see https://redis.io/commands/json.del
func (Client) JSONForget ¶
JSONForget deletes a value. For more information, see https://redis.io/commands/json.forget
func (Client) JSONGet ¶
JSONGet returns the value at path in JSON serialized form. JSON.GET returns an array of strings. This function parses out the wrapping array but leaves the internal strings unprocessed by default (see Val()) For more information - https://redis.io/commands/json.get/
func (Client) JSONGetWithArgs ¶
func (c Client) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
JSONGetWithArgs - Retrieves the value of a key from a JSON document. This function also allows for specifying additional options such as: Indention, NewLine and Space For more information - https://redis.io/commands/json.get/
func (Client) JSONMGet ¶
func (c Client) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
JSONMGet returns the values at the specified path from multiple key arguments. Note - the arguments are reversed when compared with `JSON.MGET` as we want to follow the pattern of having the last argument be variable. For more information, see https://redis.io/commands/json.mget
func (Client) JSONMSetArgs ¶
func (c Client) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
JSONMSetArgs sets or updates one or more JSON values according to the specified key-path-value triplets. For more information, see https://redis.io/commands/json.mset
func (Client) JSONMerge ¶
JSONMerge merges a given JSON value into matching paths. For more information, see https://redis.io/commands/json.merge
func (Client) JSONNumIncrBy ¶
JSONNumIncrBy increments the number value stored at the specified path by the provided number. For more information, see https://redis.io/docs/latest/commands/json.numincrby/
func (Client) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by the specified path. For more information, see https://redis.io/commands/json.objkeys
func (Client) JSONObjLen ¶
func (c Client) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONObjLen reports the number of keys in the JSON object at the specified path in the given key. For more information, see https://redis.io/commands/json.objlen
func (Client) JSONSet ¶
JSONSet sets the JSON value at the given path in the given key. The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or a []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Client) JSONSetMode ¶
func (c Client) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
JSONSetMode sets the JSON value at the given path in the given key and allows the mode to be set (the mode value must be "XX" or "NX"). The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Client) JSONStrAppend ¶
func (c Client) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
JSONStrAppend appends the JSON-string values to the string at the specified path. For more information, see https://redis.io/commands/json.strappend
func (Client) JSONStrLen ¶
func (c Client) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONStrLen reports the length of the JSON String at the specified path in the given key. For more information, see https://redis.io/commands/json.strlen
func (Client) JSONToggle ¶
func (c Client) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONToggle toggles a Boolean value stored at the specified path. For more information, see https://redis.io/commands/json.toggle
func (Client) JSONType ¶
func (c Client) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
JSONType reports the type of JSON value at the specified path. For more information, see https://redis.io/commands/json.type
func (Client) LInsertAfter ¶
func (Client) LInsertBefore ¶
func (Client) LMPop ¶
func (c Client) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2")
func (Client) LPopCount ¶
func (c Client) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Client) LRange ¶
func (c Client) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Client) MSet ¶
MSet is like Set but accepts multiple values:
- MSet("key1", "value1", "key2", "value2")
- MSet([]string{"key1", "value1", "key2", "value2"})
- MSet(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSet(struct), For struct types, see HSet description.
func (Client) MSetNX ¶
MSetNX is like SetNX but accepts multiple values:
- MSetNX("key1", "value1", "key2", "value2")
- MSetNX([]string{"key1", "value1", "key2", "value2"})
- MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSetNX(struct), For struct types, see HSet description.
func (Client) MemoryUsage ¶
func (Client) ModuleLoadex ¶
func (c Client) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
ModuleLoadex Redis `MODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS args [args ...]]` command.
func (Client) Monitor ¶
func (c Client) Monitor(ctx context.Context, ch chan string) *MonitorCmd
Monitor - represents a Redis MONITOR command, allowing the user to capture and process all commands sent to a Redis server. This mimics the behavior of MONITOR in the redis-cli.
Notes: - Using MONITOR blocks the connection to the server for itself. It needs a dedicated connection - The user should create a channel of type string - This runs concurrently in the background. Trigger via the Start and Stop functions See further: Redis MONITOR command: https://redis.io/commands/monitor
func (Client) ObjectEncoding ¶
func (Client) ObjectIdleTime ¶
func (c Client) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
func (Client) ObjectRefCount ¶
func (Client) PExpireTime ¶
func (c Client) PExpireTime(ctx context.Context, key string) *DurationCmd
func (*Client) PSubscribe ¶
PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription.
func (*Client) Pipeline ¶
Example ¶
pipe := rdb.Pipeline() incr := pipe.Incr(ctx, "pipeline_counter") pipe.Expire(ctx, "pipeline_counter", time.Hour) // Execute // // INCR pipeline_counter // EXPIRE pipeline_counts 3600 // // using one rdb-server roundtrip. _, err := pipe.Exec(ctx) fmt.Println(incr.Val(), err)
Output: 1 <nil>
func (*Client) Pipelined ¶
Example ¶
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)
Output: 1 <nil>
func (Client) PubSubChannels ¶
func (c Client) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Client) PubSubNumPat ¶
func (Client) PubSubNumSub ¶
func (c Client) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Client) PubSubShardChannels ¶
func (c Client) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Client) PubSubShardNumSub ¶
func (c Client) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Client) RPopCount ¶
func (c Client) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Client) RestoreReplace ¶
func (Client) SDiffStore ¶
func (Client) SInterCard ¶
func (Client) SInterStore ¶
func (Client) SMIsMember ¶
func (c Client) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
func (Client) SMembers ¶
func (c Client) SMembers(ctx context.Context, key string) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
func (Client) SMembersMap ¶
func (c Client) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
func (Client) SPopN ¶
func (c Client) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
SPopN Redis `SPOP key count` command.
func (Client) SRandMember ¶
SRandMember Redis `SRANDMEMBER key` command.
func (Client) SRandMemberN ¶
func (c Client) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
SRandMemberN Redis `SRANDMEMBER key count` command.
func (*Client) SSubscribe ¶
SSubscribe Subscribes the client to the specified shard channels. Channels can be omitted to create empty subscription.
func (Client) SUnionStore ¶
func (Client) Scan ¶
Example ¶
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)
Output: found 33 keys
func (Client) ScanType ¶
func (c Client) ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd
Example ¶
rdb.FlushDB(ctx) for i := 0; i < 33; i++ { err := rdb.Set(ctx, fmt.Sprintf("key%d", i), "value", 0).Err() if err != nil { panic(err) } } var cursor uint64 var n int for { var keys []string var err error keys, cursor, err = rdb.ScanType(ctx, cursor, "key*", 10, "string").Result() if err != nil { panic(err) } n += len(keys) if cursor == 0 { break } } fmt.Printf("found %d keys\n", n)
Output: found 33 keys
Example (HashType) ¶
ExampleClient_ScanType_hashType uses the keyType "hash".
rdb.FlushDB(ctx) for i := 0; i < 33; i++ { err := rdb.HSet(context.TODO(), fmt.Sprintf("key%d", i), "value", "foo").Err() if err != nil { panic(err) } } var allKeys []string var cursor uint64 var err error for { var keysFromScan []string keysFromScan, cursor, err = rdb.ScanType(context.TODO(), cursor, "key*", 10, "hash").Result() if err != nil { panic(err) } allKeys = append(allKeys, keysFromScan...) if cursor == 0 { break } } fmt.Printf("%d keys ready for use", len(allKeys))
Output: 33 keys ready for use
func (Client) ScriptExists ¶
func (c Client) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
func (Client) ScriptFlush ¶
func (Client) ScriptKill ¶
func (Client) ScriptLoad ¶
func (Client) Set ¶
func (c Client) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
Example ¶
// Last argument is expiration. Zero means the key has no // expiration time. err := rdb.Set(ctx, "key", "value", 0).Err() if err != nil { panic(err) } // key2 will expire in an hour. err = rdb.Set(ctx, "key2", "value", time.Hour).Err() if err != nil { panic(err) }
Output:
func (Client) SetArgs ¶
SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options.
func (Client) SetEx ¶
func (c Client) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
Example ¶
err := rdb.SetEx(ctx, "key", "value", time.Hour).Err() if err != nil { panic(err) }
Output:
func (Client) SetNX ¶
func (c Client) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetNX Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Client) SetXX ¶
func (c Client) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetXX Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Client) ShutdownNoSave ¶
func (Client) ShutdownSave ¶
func (Client) SlowLogGet ¶
func (c Client) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
Example ¶
if RECluster { // skip slowlog test for cluster fmt.Println(2) return } const key = "slowlog-log-slower-than" old := rdb.ConfigGet(ctx, key).Val() rdb.ConfigSet(ctx, key, "0") defer rdb.ConfigSet(ctx, key, old[key]) if err := rdb.Do(ctx, "slowlog", "reset").Err(); err != nil { panic(err) } rdb.Set(ctx, "test", "true", 0) result, err := rdb.SlowLogGet(ctx, -1).Result() if err != nil { panic(err) } fmt.Println(len(result))
Output: 2
func (Client) Sort ¶
func (c Client) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (Client) SortInterfaces ¶
func (Client) SortRO ¶
func (c Client) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (*Client) Subscribe ¶
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()
func (Client) TDigestAdd ¶
TDigestAdd adds one or more elements to a t-Digest data structure. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.add/
func (Client) TDigestByRank ¶
func (c Client) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRank returns an array of values from a t-Digest data structure based on their rank. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrank/
func (Client) TDigestByRevRank ¶
func (c Client) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRevRank returns an array of values from a t-Digest data structure based on their reverse rank. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrevrank/
func (Client) TDigestCDF ¶
func (c Client) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestCDF returns an array of cumulative distribution function (CDF) values for one or more elements in a t-Digest data structure. The CDF value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the CDF values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.cdf/
func (Client) TDigestCreate ¶
TDigestCreate creates an empty t-Digest data structure with default parameters. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Client) TDigestCreateWithCompression ¶
func (c Client) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
TDigestCreateWithCompression creates an empty t-Digest data structure with a specified compression parameter. The compression parameter controls the accuracy and memory usage of the t-Digest. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Client) TDigestInfo ¶
func (c Client) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
TDigestInfo returns information about a t-Digest data structure. For more information - https://redis.io/commands/tdigest.info/
func (Client) TDigestMax ¶
TDigestMax returns the maximum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.max/
func (Client) TDigestMerge ¶
func (c Client) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, sourceKeys ...string) *StatusCmd
TDigestMerge merges multiple t-Digest data structures into a single t-Digest. This function also allows for specifying additional options such as compression and override behavior. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.merge/
func (Client) TDigestMin ¶
TDigestMin returns the minimum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.min/
func (Client) TDigestQuantile ¶
func (c Client) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestQuantile returns an array of quantile values for one or more elements in a t-Digest data structure. The quantile value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the quantile values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.quantile/
func (Client) TDigestRank ¶
func (c Client) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRank returns an array of rank values for one or more elements in a t-Digest data structure. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of integers representing the rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.rank/
func (Client) TDigestReset ¶
TDigestReset resets a t-Digest data structure to its initial state. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.reset/
func (Client) TDigestRevRank ¶
func (c Client) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRevRank returns an array of reverse rank values for one or more elements in a t-Digest data structure. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of integers representing the reverse rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.revrank/
func (Client) TDigestTrimmedMean ¶
func (c Client) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
TDigestTrimmedMean returns the trimmed mean value from a t-Digest data structure. The trimmed mean is calculated by removing a specified fraction of the highest and lowest values from the t-Digest and then calculating the mean of the remaining values. Returns a float representing the trimmed mean value or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.trimmed_mean/
func (Client) TFCall ¶
TFCall - invoke a function. For more information - https://redis.io/commands/tfcall/
func (Client) TFCallASYNC ¶
TFCallASYNC - invoke an asynchronous JavaScript function (coroutine). For more information - https://redis.io/commands/TFCallASYNC/
func (Client) TFCallASYNCArgs ¶
func (Client) TFCallArgs ¶
func (Client) TFunctionDelete ¶
TFunctionDelete - delete a JavaScript library from Redis. For more information - https://redis.io/commands/tfunction-delete/
func (Client) TFunctionList ¶
func (c Client) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
TFunctionList - list the functions with additional information about each function. For more information - https://redis.io/commands/tfunction-list/
func (Client) TFunctionListArgs ¶
func (c Client) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
func (Client) TFunctionLoad ¶
TFunctionLoad - load a new JavaScript library into Redis. For more information - https://redis.io/commands/tfunction-load/
func (Client) TFunctionLoadArgs ¶
func (c Client) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
func (Client) TSAdd ¶
func (c Client) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
TSAdd - Adds one or more observations to a t-digest sketch. For more information - https://redis.io/commands/ts.add/
func (Client) TSAddWithArgs ¶
func (c Client) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, options *TSOptions) *IntCmd
TSAddWithArgs - Adds one or more observations to a t-digest sketch. This function also allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.add/
func (Client) TSAlter ¶
func (c Client) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
TSAlter - Alters an existing time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize and DuplicatePolicy. For more information - https://redis.io/commands/ts.alter/
func (Client) TSCreate ¶
TSCreate - Creates a new time-series key. For more information - https://redis.io/commands/ts.create/
func (Client) TSCreateRule ¶
func (c Client) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int) *StatusCmd
TSCreateRule - Creates a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.createrule/
func (Client) TSCreateRuleWithArgs ¶
func (c Client) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd
TSCreateRuleWithArgs - Creates a compaction rule from sourceKey to destKey with additional option. This function allows for specifying additional option such as: alignTimestamp. For more information - https://redis.io/commands/ts.createrule/
func (Client) TSCreateWithArgs ¶
TSCreateWithArgs - Creates a new time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.create/
func (Client) TSDecrBy ¶
TSDecrBy - Decrements the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.decrby/
func (Client) TSDecrByWithArgs ¶
func (c Client) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSDecrByWithArgs - Decrements the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.decrby/
func (Client) TSDel ¶
TSDel - Deletes a range of samples from a time-series key. For more information - https://redis.io/commands/ts.del/
func (Client) TSDeleteRule ¶
TSDeleteRule - Deletes a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.deleterule/
func (Client) TSGet ¶
func (c Client) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
TSGet - Gets the last sample of a time-series key. For more information - https://redis.io/commands/ts.get/
func (Client) TSGetWithArgs ¶
func (c Client) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
TSGetWithArgs - Gets the last sample of a time-series key with additional option. This function allows for specifying additional option such as: Latest. For more information - https://redis.io/commands/ts.get/
func (Client) TSIncrBy ¶
TSIncrBy - Increments the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.incrby/
func (Client) TSIncrByWithArgs ¶
func (c Client) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSIncrByWithArgs - Increments the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.incrby/
func (Client) TSInfo ¶
func (c Client) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
TSInfo - Returns information about a time-series key. For more information - https://redis.io/commands/ts.info/
func (Client) TSInfoWithArgs ¶
func (c Client) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
TSInfoWithArgs - Returns information about a time-series key with additional option. This function allows for specifying additional option such as: Debug. For more information - https://redis.io/commands/ts.info/
func (Client) TSMAdd ¶
func (c Client) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
TSMAdd - Adds multiple samples to multiple time-series keys. It accepts a slice of 'ktv' slices, each containing exactly three elements: key, timestamp, and value. This struct must be provided for this command to work. For more information - https://redis.io/commands/ts.madd/
func (Client) TSMGet ¶
func (c Client) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
TSMGet - Returns the last sample of multiple time-series keys. For more information - https://redis.io/commands/ts.mget/
func (Client) TSMGetWithArgs ¶
func (c Client) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
TSMGetWithArgs - Returns the last sample of multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, WithLabels and SelectedLabels. For more information - https://redis.io/commands/ts.mget/
func (Client) TSMRange ¶
func (c Client) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRange - Returns a range of samples from multiple time-series keys. For more information - https://redis.io/commands/ts.mrange/
func (Client) TSMRangeWithArgs ¶
func (c Client) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRangeOptions) *MapStringSliceInterfaceCmd
TSMRangeWithArgs - Returns a range of samples from multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrange/
func (Client) TSMRevRange ¶
func (c Client) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRevRange - Returns a range of samples from multiple time-series keys in reverse order. For more information - https://redis.io/commands/ts.mrevrange/
func (Client) TSMRevRangeWithArgs ¶
func (c Client) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRevRangeOptions) *MapStringSliceInterfaceCmd
TSMRevRangeWithArgs - Returns a range of samples from multiple time-series keys in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrevrange/
func (Client) TSQueryIndex ¶
func (c Client) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
TSQueryIndex - Returns all the keys matching the filter expression. For more information - https://redis.io/commands/ts.queryindex/
func (Client) TSRange ¶
func (c Client) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRange - Returns a range of samples from a time-series key. For more information - https://redis.io/commands/ts.range/
func (Client) TSRangeWithArgs ¶
func (c Client) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRangeOptions) *TSTimestampValueSliceCmd
TSRangeWithArgs - Returns a range of samples from a time-series key with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.range/
func (Client) TSRevRange ¶
func (c Client) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRevRange - Returns a range of samples from a time-series key in reverse order. For more information - https://redis.io/commands/ts.revrange/
func (Client) TSRevRangeWithArgs ¶
func (c Client) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRevRangeOptions) *TSTimestampValueSliceCmd
TSRevRangeWithArgs - Returns a range of samples from a time-series key in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.revrange/
func (Client) TopKAdd ¶
func (c Client) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKAdd adds one or more elements to a Top-K filter. Returns an array of strings representing the items that were removed from the filter, if any. For more information - https://redis.io/commands/topk.add/
func (Client) TopKCount ¶
func (c Client) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
TopKCount returns an estimate of the number of times an item may be in a Top-K filter. For more information - https://redis.io/commands/topk.count/
func (Client) TopKIncrBy ¶
func (c Client) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKIncrBy increases the count of one or more items in a Top-K filter. For more information - https://redis.io/commands/topk.incrby/
func (Client) TopKInfo ¶
func (c Client) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
TopKInfo returns information about a Top-K filter. For more information - https://redis.io/commands/topk.info/
func (Client) TopKList ¶
func (c Client) TopKList(ctx context.Context, key string) *StringSliceCmd
TopKList returns all items in Top-K list. For more information - https://redis.io/commands/topk.list/
func (Client) TopKListWithCount ¶
func (c Client) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
TopKListWithCount returns all items in Top-K list with their respective count. For more information - https://redis.io/commands/topk.list/
func (Client) TopKQuery ¶
func (c Client) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
TopKQuery check if multiple elements exist in a Top-K filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/topk.query/
func (Client) TopKReserve ¶
TopKReserve creates an empty Top-K filter with the specified number of top items to keep. For more information - https://redis.io/commands/topk.reserve/
func (Client) TopKReserveWithOptions ¶
func (c Client) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
TopKReserveWithOptions creates an empty Top-K filter with the specified number of top items to keep and additional options. This function allows for specifying additional options such as width, depth and decay. For more information - https://redis.io/commands/topk.reserve/
func (*Client) TxPipeline ¶
TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
Example ¶
pipe := rdb.TxPipeline() incr := pipe.Incr(ctx, "tx_pipeline_counter") pipe.Expire(ctx, "tx_pipeline_counter", time.Hour) // Execute // // MULTI // INCR pipeline_counter // EXPIRE pipeline_counts 3600 // EXEC // // using one rdb-server roundtrip. _, err := pipe.Exec(ctx) fmt.Println(incr.Val(), err)
Output: 1 <nil>
func (*Client) TxPipelined ¶
Example ¶
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)
Output: 1 <nil>
func (*Client) Watch ¶
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.
Example ¶
const maxRetries = 10000 // Increment transactionally increments key using GET and SET commands. increment := func(key string) error { // Transactional function. txf := func(tx *redis.Tx) error { // Get current value or zero. n, err := tx.Get(ctx, key).Int() if err != nil && err != redis.Nil { return err } // Actual operation (local in optimistic lock). n++ // Operation is committed only if the watched keys remain unchanged. _, 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 { // Success. return nil } if err == redis.TxFailedErr { // Optimistic lock lost. Retry. continue } // Return any other error. 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)
Output: ended with 100 <nil>
Example (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")
Output: starting processing: <watch foo: > dialing tcp :6379 finished dialing tcp :6379 finished processing: <watch foo: OK> starting processing: <ping: > finished processing: <ping: PONG> starting processing: <ping: > finished processing: <ping: PONG> starting processing: <unwatch: > finished processing: <unwatch: OK>
func (Client) XAutoClaim ¶
func (c Client) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
func (Client) XAutoClaimJustID ¶
func (c Client) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
func (Client) XClaim ¶
func (c Client) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
func (Client) XClaimJustID ¶
func (c Client) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
func (Client) XGroupCreate ¶
func (Client) XGroupCreateConsumer ¶
func (Client) XGroupCreateMkStream ¶
func (Client) XGroupDelConsumer ¶
func (Client) XGroupDestroy ¶
func (Client) XGroupSetID ¶
func (Client) XInfoConsumers ¶
func (c Client) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
func (Client) XInfoGroups ¶
func (c Client) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
func (Client) XInfoStream ¶
func (c Client) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
func (Client) XInfoStreamFull ¶
func (c Client) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0.
func (Client) XPending ¶
func (c Client) XPending(ctx context.Context, stream, group string) *XPendingCmd
func (Client) XPendingExt ¶
func (c Client) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
func (Client) XRange ¶
func (c Client) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Client) XRangeN ¶
func (c Client) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Client) XReadGroup ¶
func (c Client) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
func (Client) XReadStreams ¶
func (c Client) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
func (Client) XRevRange ¶
func (c Client) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Client) XRevRangeN ¶
func (c Client) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Client) XTrimMaxLen ¶
XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen
func (Client) XTrimMaxLenApprox ¶
func (Client) XTrimMinID ¶
func (Client) XTrimMinIDApprox ¶
func (Client) ZAddArgsIncr ¶
func (Client) ZDiff ¶
func (c Client) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
func (Client) ZDiffStore ¶
ZDiffStore redis-server version >=6.2.0.
func (Client) ZDiffWithScores ¶
ZDiffWithScores redis-server version >= 6.2.0.
func (Client) ZInterCard ¶
func (Client) ZInterStore ¶
func (Client) ZInterWithScores ¶
func (Client) ZMPop ¶
func (c Client) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2")
func (Client) ZMScore ¶
func (c Client) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
func (Client) ZRandMember ¶
func (c Client) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
func (Client) ZRandMemberWithScores ¶
ZRandMemberWithScores redis-server version >= 6.2.0.
func (Client) ZRange ¶
func (c Client) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Client) ZRangeArgs ¶
func (c Client) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
func (Client) ZRangeArgsWithScores ¶
func (c Client) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
func (Client) ZRangeByLex ¶
func (c Client) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Client) ZRangeByScore ¶
func (c Client) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Client) ZRangeByScoreWithScores ¶
func (Client) ZRangeStore ¶
func (c Client) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
func (Client) ZRangeWithScores ¶
func (Client) ZRankWithScore ¶
func (c Client) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
ZRankWithScore according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Client) ZRemRangeByLex ¶
func (Client) ZRemRangeByRank ¶
func (Client) ZRemRangeByScore ¶
func (Client) ZRevRange ¶
func (c Client) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Client) ZRevRangeByLex ¶
func (c Client) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Client) ZRevRangeByScore ¶
func (c Client) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Client) ZRevRangeByScoreWithScores ¶
func (Client) ZRevRangeWithScores ¶
ZRevRangeWithScores according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Client) ZRevRankWithScore ¶
func (c Client) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
func (Client) ZUnionStore ¶
type ClientFlags ¶
type ClientFlags uint64
ClientFlags is redis-server client flags, copy from redis/src/server.h (redis 7.0)
const ( ClientSlave ClientFlags = 1 << 0 /* This client is a replica */ ClientMaster ClientFlags = 1 << 1 /* This client is a master */ ClientMonitor ClientFlags = 1 << 2 /* This client is a slave monitor, see MONITOR */ ClientMulti ClientFlags = 1 << 3 /* This client is in a MULTI context */ ClientBlocked ClientFlags = 1 << 4 /* The client is waiting in a blocking operation */ ClientDirtyCAS ClientFlags = 1 << 5 /* Watched keys modified. EXEC will fail. */ ClientCloseAfterReply ClientFlags = 1 << 6 /* Close after writing entire reply. */ ClientUnBlocked ClientFlags = 1 << 7 /* This client was unblocked and is stored in server.unblocked_clients */ ClientScript ClientFlags = 1 << 8 /* This is a non-connected client used by Lua */ ClientAsking ClientFlags = 1 << 9 /* Client issued the ASKING command */ ClientCloseASAP ClientFlags = 1 << 10 /* Close this client ASAP */ ClientUnixSocket ClientFlags = 1 << 11 /* Client connected via Unix domain socket */ ClientDirtyExec ClientFlags = 1 << 12 /* EXEC will fail for errors while queueing */ ClientMasterForceReply ClientFlags = 1 << 13 /* Queue replies even if is master */ ClientForceAOF ClientFlags = 1 << 14 /* Force AOF propagation of current cmd. */ ClientForceRepl ClientFlags = 1 << 15 /* Force replication of current cmd. */ ClientPrePSync ClientFlags = 1 << 16 /* Instance don't understand PSYNC. */ ClientReadOnly ClientFlags = 1 << 17 /* Cluster client is in read-only state. */ ClientPubSub ClientFlags = 1 << 18 /* Client is in Pub/Sub mode. */ ClientPreventAOFProp ClientFlags = 1 << 19 /* Don't propagate to AOF. */ ClientPreventReplProp ClientFlags = 1 << 20 /* Don't propagate to slaves. */ ClientPreventProp ClientFlags = ClientPreventAOFProp | ClientPreventReplProp ClientPendingWrite ClientFlags = 1 << 21 /* Client has output to send but a-write handler is yet not installed. */ ClientReplyOff ClientFlags = 1 << 22 /* Don't send replies to client. */ ClientReplySkipNext ClientFlags = 1 << 23 /* Set ClientREPLY_SKIP for next cmd */ ClientReplySkip ClientFlags = 1 << 24 /* Don't send just this reply. */ ClientLuaDebug ClientFlags = 1 << 25 /* Run EVAL in debug mode. */ ClientLuaDebugSync ClientFlags = 1 << 26 /* EVAL debugging without fork() */ ClientModule ClientFlags = 1 << 27 /* Non connected client used by some module. */ ClientProtected ClientFlags = 1 << 28 /* Client should not be freed for now. */ ClientExecutingCommand ClientFlags = 1 << 29 /* Indicates that the client is currently in the process of handling a command. usually this will be marked only during call() however, blocked clients might have this flag kept until they will try to reprocess the command. */ ClientPendingCommand ClientFlags = 1 << 30 /* Indicates the client has a fully * parsed command ready for execution. */ ClientTracking ClientFlags = 1 << 31 /* Client enabled keys tracking in order to perform client side caching. */ ClientTrackingBrokenRedir ClientFlags = 1 << 32 /* Target client is invalid. */ ClientTrackingBCAST ClientFlags = 1 << 33 /* Tracking in BCAST mode. */ ClientTrackingOptIn ClientFlags = 1 << 34 /* Tracking in opt-in mode. */ ClientTrackingOptOut ClientFlags = 1 << 35 /* Tracking in opt-out mode. */ ClientTrackingCaching ClientFlags = 1 << 36 /* CACHING yes/no was given, depending on optin/optout mode. */ ClientTrackingNoLoop ClientFlags = 1 << 37 /* Don't send invalidation messages about writes performed by myself.*/ ClientInTimeoutTable ClientFlags = 1 << 38 /* This client is in the timeout table. */ ClientProtocolError ClientFlags = 1 << 39 /* Protocol error chatting with it. */ ClientCloseAfterCommand ClientFlags = 1 << 40 /* Close after executing commands * and writing entire reply. */ ClientDenyBlocking ClientFlags = 1 << 41 /* Indicate that the client should not be blocked. currently, turned on inside MULTI, Lua, RM_Call, and AOF client */ ClientReplRDBOnly ClientFlags = 1 << 42 /* This client is a replica that only wants RDB without replication buffer. */ ClientNoEvict ClientFlags = 1 << 43 /* This client is protected against client memory eviction. */ ClientAllowOOM ClientFlags = 1 << 44 /* Client used by RM_Call is allowed to fully execute scripts even when in OOM */ ClientNoTouch ClientFlags = 1 << 45 /* This client will not touch LFU/LRU stats. */ ClientPushing ClientFlags = 1 << 46 /* This client is pushing notifications. */ )
type ClientInfo ¶
type ClientInfo struct { ID int64 // redis version 2.8.12, a unique 64-bit client ID Addr string // address/port of the client LAddr string // address/port of local address client connected to (bind address) FD int64 // file descriptor corresponding to the socket Name string // the name set by the client with CLIENT SETNAME Age time.Duration // total duration of the connection in seconds Idle time.Duration // idle time of the connection in seconds Flags ClientFlags // client flags (see below) DB int // current database ID Sub int // number of channel subscriptions PSub int // number of pattern matching subscriptions SSub int // redis version 7.0.3, number of shard channel subscriptions Multi int // number of commands in a MULTI/EXEC context Watch int // redis version 7.4 RC1, number of keys this client is currently watching. QueryBuf int // qbuf, query buffer length (0 means no query pending) QueryBufFree int // qbuf-free, free space of the query buffer (0 means the buffer is full) ArgvMem int // incomplete arguments for the next command (already extracted from query buffer) MultiMem int // redis version 7.0, memory is used up by buffered multi commands BufferSize int // rbs, usable size of buffer BufferPeak int // rbp, peak used size of buffer in last 5 sec interval OutputBufferLength int // obl, output buffer length OutputListLength int // oll, output list length (replies are queued in this list when the buffer is full) OutputMemory int // omem, output buffer memory usage TotalMemory int // tot-mem, total memory consumed by this client in its various buffers Events string // file descriptor events (see below) LastCmd string // cmd, last command played User string // the authenticated username of the client Redir int64 // client id of current client tracking redirection Resp int // redis version 7.0, client RESP protocol version LibName string // redis version 7.2, client library name LibVer string // redis version 7.2, client library version }
ClientInfo is redis-server ClientInfo, not go-redis *Client
type ClientInfoCmd ¶
type ClientInfoCmd struct {
// contains filtered or unexported fields
}
func NewClientInfoCmd ¶
func NewClientInfoCmd(ctx context.Context, args ...interface{}) *ClientInfoCmd
func (*ClientInfoCmd) Result ¶
func (cmd *ClientInfoCmd) Result() (*ClientInfo, error)
func (*ClientInfoCmd) SetFirstKeyPos ¶
func (cmd *ClientInfoCmd) SetFirstKeyPos(keyPos int8)
func (*ClientInfoCmd) SetVal ¶
func (cmd *ClientInfoCmd) SetVal(val *ClientInfo)
func (*ClientInfoCmd) String ¶
func (cmd *ClientInfoCmd) String() string
func (*ClientInfoCmd) Val ¶
func (cmd *ClientInfoCmd) Val() *ClientInfo
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 ¶
// See http://redis.io/topics/cluster-tutorial for instructions // how to setup Redis Cluster. rdb := redis.NewClusterClient(&redis.ClusterOptions{ Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"}, }) rdb.Ping(ctx)
Output:
Example (ManualSetup) ¶
Following example creates a cluster from 2 master nodes and 2 slave nodes without using cluster mode or Redis Sentinel.
// clusterSlots returns cluster slots information. // It can use service like ZooKeeper to maintain configuration information // and Cluster.ReloadState to manually trigger state reloading. clusterSlots := func(ctx context.Context) ([]redis.ClusterSlot, error) { slots := []redis.ClusterSlot{ // First node with 1 master and 1 slave. { Start: 0, End: 8191, Nodes: []redis.ClusterNode{{ Addr: ":7000", // master }, { Addr: ":8000", // 1st slave }}, }, // Second node with 1 master and 1 slave. { Start: 8192, End: 16383, Nodes: []redis.ClusterNode{{ Addr: ":7001", // master }, { Addr: ":8001", // 1st slave }}, }, } return slots, nil } rdb := redis.NewClusterClient(&redis.ClusterOptions{ ClusterSlots: clusterSlots, RouteRandomly: true, }) rdb.Ping(ctx) // ReloadState reloads cluster state. It calls ClusterSlots func // to get cluster slots information. rdb.ReloadState(ctx)
Output:
func NewFailoverClusterClient ¶
func NewFailoverClusterClient(failoverOpt *FailoverOptions) *ClusterClient
NewFailoverClusterClient returns a client that supports routing read-only commands to a replica node.
func (ClusterClient) ACLLogReset ¶
func (*ClusterClient) AddHook ¶
func (hs *ClusterClient) AddHook(hook Hook)
AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2:
client.AddHook(hook-1, hook-2)
hook-1:
func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } }
hook-2:
func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } }
The execution sequence is:
hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end
Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed.
func (ClusterClient) BFAdd ¶
BFAdd adds an item to a Bloom filter. For more information - https://redis.io/commands/bf.add/
func (ClusterClient) BFCard ¶
BFCard returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter). For more information - https://redis.io/commands/bf.card/
func (ClusterClient) BFExists ¶
BFExists determines whether a given item was added to a Bloom filter. For more information - https://redis.io/commands/bf.exists/
func (ClusterClient) BFInfo ¶
Returns information about a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (ClusterClient) BFInfoArg ¶
BFInfoArg returns information about a specific option of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (ClusterClient) BFInfoCapacity ¶
BFInfoCapacity returns information about the capacity of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (ClusterClient) BFInfoExpansion ¶
BFInfoExpansion returns information about the expansion rate of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (ClusterClient) BFInfoFilters ¶
BFInfoFilters returns information about the filters of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (ClusterClient) BFInfoItems ¶
BFInfoItems returns information about the items of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (ClusterClient) BFInfoSize ¶
BFInfoSize returns information about the size of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (ClusterClient) BFInsert ¶
func (c ClusterClient) BFInsert(ctx context.Context, key string, options *BFInsertOptions, elements ...interface{}) *BoolSliceCmd
BFInsert inserts elements into a Bloom filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. For more information - https://redis.io/commands/bf.insert/
func (ClusterClient) BFLoadChunk ¶
func (c ClusterClient) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
BFLoadChunk restores a Bloom filter previously saved using BF.SCANDUMP. For more information - https://redis.io/commands/bf.loadchunk/
func (ClusterClient) BFMAdd ¶
func (c ClusterClient) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMAdd adds multiple elements to a Bloom filter. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/bf.madd/
func (ClusterClient) BFMExists ¶
func (c ClusterClient) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMExists check if multiple elements exist in a Bloom filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/bf.mexists/
func (ClusterClient) BFReserve ¶
func (c ClusterClient) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserve creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. For more information - https://redis.io/commands/bf.reserve/
func (ClusterClient) BFReserveExpansion ¶
func (c ClusterClient) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
BFReserveExpansion creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying an expansion rate for the filter. For more information - https://redis.io/commands/bf.reserve/
func (ClusterClient) BFReserveNonScaling ¶
func (c ClusterClient) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserveNonScaling creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying that the filter should not scale. For more information - https://redis.io/commands/bf.reserve/
func (ClusterClient) BFReserveWithArgs ¶
func (c ClusterClient) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
BFReserveWithArgs creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying additional options such as expansion rate and non-scaling behavior. For more information - https://redis.io/commands/bf.reserve/
func (ClusterClient) BFScanDump ¶
func (c ClusterClient) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
Begins an incremental save of the Bloom filter. This command is useful for large Bloom filters that cannot fit into the DUMP and RESTORE model. For more information - https://redis.io/commands/bf.scandump/
func (ClusterClient) BRPopLPush ¶
func (ClusterClient) BZMPop ¶
func (c ClusterClient) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd
BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set")
func (ClusterClient) BZPopMax ¶
func (c ClusterClient) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
BZPopMax Redis `BZPOPMAX key [key ...] timeout` command.
func (ClusterClient) BZPopMin ¶
func (c ClusterClient) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
BZPopMin Redis `BZPOPMIN key [key ...] timeout` command.
func (ClusterClient) BgRewriteAOF ¶
func (ClusterClient) BitField ¶
func (c ClusterClient) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitField accepts multiple values:
- BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
- BitField([]string{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
- BitField([]interface{}{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
func (ClusterClient) BitFieldRO ¶
func (c ClusterClient) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitFieldRO - Read-only variant of the BITFIELD command. It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas. - BitFieldRO(ctx, key, "<Encoding0>", "<Offset0>", "<Encoding1>","<Offset1>")
func (ClusterClient) BitPos ¶
BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`.
func (ClusterClient) BitPosSpan ¶
func (c ClusterClient) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte
func (ClusterClient) CFAdd ¶
CFAdd adds an element to a Cuckoo filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.add/
func (ClusterClient) CFAddNX ¶
CFAddNX adds an element to a Cuckoo filter only if it does not already exist in the filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.addnx/
func (ClusterClient) CFCount ¶
CFCount returns an estimate of the number of times an element may be in a Cuckoo Filter. For more information - https://redis.io/commands/cf.count/
func (ClusterClient) CFDel ¶
CFDel deletes an item once from the cuckoo filter. For more information - https://redis.io/commands/cf.del/
func (ClusterClient) CFExists ¶
CFExists determines whether an item may exist in the Cuckoo Filter or not. For more information - https://redis.io/commands/cf.exists/
func (ClusterClient) CFInfo ¶
CFInfo returns information about a Cuckoo filter. For more information - https://redis.io/commands/cf.info/
func (ClusterClient) CFInsert ¶
func (c ClusterClient) CFInsert(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *BoolSliceCmd
CFInsert inserts elements into a Cuckoo filter. This function also allows for specifying additional options such as capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insert/
func (ClusterClient) CFInsertNX ¶
func (c ClusterClient) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *IntSliceCmd
CFInsertNX inserts elements into a Cuckoo filter only if they do not already exist in the filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of integers indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insertnx/
func (ClusterClient) CFLoadChunk ¶
func (c ClusterClient) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
CFLoadChunk restores a filter previously saved using SCANDUMP. For more information - https://redis.io/commands/cf.loadchunk/
func (ClusterClient) CFMExists ¶
func (c ClusterClient) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
CFMExists check if multiple elements exist in a Cuckoo filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/cf.mexists/
func (ClusterClient) CFReserve ¶
CFReserve creates an empty Cuckoo filter with the specified capacity. For more information - https://redis.io/commands/cf.reserve/
func (ClusterClient) CFReserveBucketSize ¶
func (c ClusterClient) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
CFReserveBucketSize creates an empty Cuckoo filter with the specified capacity and bucket size. For more information - https://redis.io/commands/cf.reserve/
func (ClusterClient) CFReserveExpansion ¶
func (c ClusterClient) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
CFReserveExpansion creates an empty Cuckoo filter with the specified capacity and expansion rate. For more information - https://redis.io/commands/cf.reserve/
func (ClusterClient) CFReserveMaxIterations ¶
func (c ClusterClient) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
CFReserveMaxIterations creates an empty Cuckoo filter with the specified capacity and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (ClusterClient) CFReserveWithArgs ¶
func (c ClusterClient) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
CFReserveWithArgs creates an empty Cuckoo filter with the specified options. This function allows for specifying additional options such as bucket size and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (ClusterClient) CFScanDump ¶
func (c ClusterClient) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
CFScanDump begins an incremental save of the cuckoo filter. For more information - https://redis.io/commands/cf.scandump/
func (ClusterClient) CMSIncrBy ¶
func (c ClusterClient) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSIncrBy increments the count of one or more items in a Count-Min Sketch filter. Returns an array of integers representing the updated count of each item. For more information - https://redis.io/commands/cms.incrby/
func (ClusterClient) CMSInfo ¶
func (c ClusterClient) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
CMSInfo returns information about a Count-Min Sketch filter. For more information - https://redis.io/commands/cms.info/
func (ClusterClient) CMSInitByDim ¶
CMSInitByDim creates an empty Count-Min Sketch filter with the specified dimensions. For more information - https://redis.io/commands/cms.initbydim/
func (ClusterClient) CMSInitByProb ¶
func (c ClusterClient) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
CMSInitByProb creates an empty Count-Min Sketch filter with the specified error rate and probability. For more information - https://redis.io/commands/cms.initbyprob/
func (ClusterClient) CMSMerge ¶
func (c ClusterClient) CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd
CMSMerge merges multiple Count-Min Sketch filters into a single filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (ClusterClient) CMSMergeWithWeight ¶
func (c ClusterClient) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
CMSMergeWithWeight merges multiple Count-Min Sketch filters into a single filter with weights for each source filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (ClusterClient) CMSQuery ¶
func (c ClusterClient) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSQuery returns count for item(s). For more information - https://redis.io/commands/cms.query/
func (ClusterClient) ClientGetName ¶
ClientGetName returns the name of the connection.
func (ClusterClient) ClientInfo ¶
func (c ClusterClient) ClientInfo(ctx context.Context) *ClientInfoCmd
func (ClusterClient) ClientKill ¶
func (ClusterClient) ClientKillByFilter ¶
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
func (ClusterClient) ClientList ¶
func (ClusterClient) ClientPause ¶
func (ClusterClient) ClientUnblock ¶
func (ClusterClient) ClientUnblockWithError ¶
func (ClusterClient) ClientUnpause ¶
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 (ClusterClient) ClusterAddSlotsRange ¶
func (ClusterClient) ClusterCountFailureReports ¶
func (ClusterClient) ClusterCountKeysInSlot ¶
func (ClusterClient) ClusterDelSlots ¶
func (ClusterClient) ClusterDelSlotsRange ¶
func (ClusterClient) ClusterFailover ¶
func (ClusterClient) ClusterForget ¶
func (ClusterClient) ClusterGetKeysInSlot ¶
func (c ClusterClient) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
func (ClusterClient) ClusterInfo ¶
func (ClusterClient) ClusterKeySlot ¶
func (ClusterClient) ClusterLinks ¶
func (c ClusterClient) ClusterLinks(ctx context.Context) *ClusterLinksCmd
func (ClusterClient) ClusterMeet ¶
func (ClusterClient) ClusterMyShardID ¶
func (ClusterClient) ClusterNodes ¶
func (ClusterClient) ClusterReplicate ¶
func (ClusterClient) ClusterResetHard ¶
func (ClusterClient) ClusterResetSoft ¶
func (ClusterClient) ClusterSaveConfig ¶
func (ClusterClient) ClusterShards ¶
func (c ClusterClient) ClusterShards(ctx context.Context) *ClusterShardsCmd
func (ClusterClient) ClusterSlaves ¶
func (c ClusterClient) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
func (ClusterClient) ClusterSlots ¶
func (c ClusterClient) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
func (ClusterClient) Command ¶
func (c ClusterClient) Command(ctx context.Context) *CommandsInfoCmd
func (ClusterClient) CommandGetKeys ¶
func (c ClusterClient) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
func (ClusterClient) CommandGetKeysAndFlags ¶
func (c ClusterClient) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
func (ClusterClient) CommandList ¶
func (c ClusterClient) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
func (ClusterClient) ConfigGet ¶
func (c ClusterClient) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
func (ClusterClient) ConfigResetStat ¶
func (ClusterClient) ConfigRewrite ¶
func (ClusterClient) DebugObject ¶
func (*ClusterClient) Do ¶
func (c *ClusterClient) Do(ctx context.Context, args ...interface{}) *Cmd
Do create a Cmd from the args and processes the cmd.
func (ClusterClient) ExpireTime ¶
func (c ClusterClient) ExpireTime(ctx context.Context, key string) *DurationCmd
func (ClusterClient) FCallRo ¶
func (c ClusterClient) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
FCallRo this function simply calls FCallRO, Deprecated: to maintain convention FCallRO.
func (ClusterClient) FTAggregate ¶
func (c ClusterClient) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
FTAggregate - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (ClusterClient) FTAggregateWithArgs ¶
func (c ClusterClient) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
FTAggregateWithArgs - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. This function also allows for specifying additional options such as: Verbatim, LoadAll, Load, Timeout, GroupBy, SortBy, SortByMax, Apply, LimitOffset, Limit, Filter, WithCursor, Params, and DialectVersion. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (ClusterClient) FTAliasAdd ¶
FTAliasAdd - Adds an alias to an index. The 'index' parameter specifies the index to which the alias is added, and the 'alias' parameter specifies the alias. For more information, please refer to the Redis documentation: [FT.ALIASADD]: (https://redis.io/commands/ft.aliasadd/)
func (ClusterClient) FTAliasDel ¶
FTAliasDel - Removes an alias from an index. The 'alias' parameter specifies the alias to be removed. For more information, please refer to the Redis documentation: [FT.ALIASDEL]: (https://redis.io/commands/ft.aliasdel/)
func (ClusterClient) FTAliasUpdate ¶
FTAliasUpdate - Updates an alias to an index. The 'index' parameter specifies the index to which the alias is updated, and the 'alias' parameter specifies the alias. If the alias already exists for a different index, it updates the alias to point to the specified index instead. For more information, please refer to the Redis documentation: [FT.ALIASUPDATE]: (https://redis.io/commands/ft.aliasupdate/)
func (ClusterClient) FTAlter ¶
func (c ClusterClient) FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd
FTAlter - Alters the definition of an existing index. The 'index' parameter specifies the index to alter, and the 'skipInitialScan' parameter specifies whether to skip the initial scan. The 'definition' parameter specifies the new definition for the index. For more information, please refer to the Redis documentation: [FT.ALTER]: (https://redis.io/commands/ft.alter/)
func (ClusterClient) FTConfigGet ¶
func (c ClusterClient) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
FTConfigGet - Retrieves the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to retrieve. For more information, please refer to the Redis documentation: [FT.CONFIG GET]: (https://redis.io/commands/ft.config-get/)
func (ClusterClient) FTConfigSet ¶
func (c ClusterClient) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd
FTConfigSet - Sets the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to set, and the 'value' parameter specifies the new value. For more information, please refer to the Redis documentation: [FT.CONFIG SET]: (https://redis.io/commands/ft.config-set/)
func (ClusterClient) FTCreate ¶
func (c ClusterClient) FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd
FTCreate - Creates a new index with the given options and schema. The 'index' parameter specifies the name of the index to create. The 'options' parameter specifies various options for the index, such as: whether to index hashes or JSONs, prefixes, filters, default language, score, score field, payload field, etc. The 'schema' parameter specifies the schema for the index, which includes the field name, field type, etc. For more information, please refer to the Redis documentation: [FT.CREATE]: (https://redis.io/commands/ft.create/)
func (ClusterClient) FTCursorDel ¶
FTCursorDel - Deletes a cursor from an existing index. The 'index' parameter specifies the index from which to delete the cursor, and the 'cursorId' parameter specifies the ID of the cursor to delete. For more information, please refer to the Redis documentation: [FT.CURSOR DEL]: (https://redis.io/commands/ft.cursor-del/)
func (ClusterClient) FTCursorRead ¶
func (c ClusterClient) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
FTCursorRead - Reads the next results from an existing cursor. The 'index' parameter specifies the index from which to read the cursor, the 'cursorId' parameter specifies the ID of the cursor to read, and the 'count' parameter specifies the number of results to read. For more information, please refer to the Redis documentation: [FT.CURSOR READ]: (https://redis.io/commands/ft.cursor-read/)
func (ClusterClient) FTDictAdd ¶
FTDictAdd - Adds terms to a dictionary. The 'dict' parameter specifies the dictionary to which to add the terms, and the 'term' parameter specifies the terms to add. For more information, please refer to the Redis documentation: [FT.DICTADD]: (https://redis.io/commands/ft.dictadd/)
func (ClusterClient) FTDictDel ¶
FTDictDel - Deletes terms from a dictionary. The 'dict' parameter specifies the dictionary from which to delete the terms, and the 'term' parameter specifies the terms to delete. For more information, please refer to the Redis documentation: [FT.DICTDEL]: (https://redis.io/commands/ft.dictdel/)
func (ClusterClient) FTDictDump ¶
func (c ClusterClient) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
FTDictDump - Returns all terms in the specified dictionary. The 'dict' parameter specifies the dictionary from which to return the terms. For more information, please refer to the Redis documentation: [FT.DICTDUMP]: (https://redis.io/commands/ft.dictdump/)
func (ClusterClient) FTDropIndex ¶
FTDropIndex - Deletes an index. The 'index' parameter specifies the index to delete. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (ClusterClient) FTDropIndexWithArgs ¶
func (c ClusterClient) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
FTDropIndexWithArgs - Deletes an index with options. The 'index' parameter specifies the index to delete, and the 'options' parameter specifies the DeleteDocs option for docs deletion. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (ClusterClient) FTExplain ¶
FTExplain - Returns the execution plan for a complex query. The 'index' parameter specifies the index to query, and the 'query' parameter specifies the query string. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (ClusterClient) FTExplainCli ¶
FTExplainCli - Returns the execution plan for a complex query. [Not Implemented] For more information, see https://redis.io/commands/ft.explaincli/
func (ClusterClient) FTExplainWithArgs ¶
func (c ClusterClient) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
FTExplainWithArgs - Returns the execution plan for a complex query with options. The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (ClusterClient) FTInfo ¶
FTInfo - Retrieves information about an index. The 'index' parameter specifies the index to retrieve information about. For more information, please refer to the Redis documentation: [FT.INFO]: (https://redis.io/commands/ft.info/)
func (ClusterClient) FTSearch ¶
func (c ClusterClient) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
FTSearch - Executes a search query on an index. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (ClusterClient) FTSearchWithArgs ¶
func (c ClusterClient) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
FTSearchWithArgs - Executes a search query on an index with additional options. The 'index' parameter specifies the index to search, the 'query' parameter specifies the search query, and the 'options' parameter specifies additional options for the search. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (ClusterClient) FTSpellCheck ¶
func (c ClusterClient) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
FTSpellCheck - Checks a query string for spelling errors. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (ClusterClient) FTSpellCheckWithArgs ¶
func (c ClusterClient) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
FTSpellCheckWithArgs - Checks a query string for spelling errors with additional options. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (ClusterClient) FTSynDump ¶
func (c ClusterClient) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
FTSynDump - Dumps the contents of a synonym group. The 'index' parameter specifies the index to dump. For more information, please refer to the Redis documentation: [FT.SYNDUMP]: (https://redis.io/commands/ft.syndump/)
func (ClusterClient) FTSynUpdate ¶
func (c ClusterClient) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
FTSynUpdate - Creates or updates a synonym group with additional terms. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (ClusterClient) FTSynUpdateWithArgs ¶
func (c ClusterClient) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd
FTSynUpdateWithArgs - Creates or updates a synonym group with additional terms and options. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, the 'options' parameter specifies additional options for the update, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (ClusterClient) FTTagVals ¶
func (c ClusterClient) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
FTTagVals - Returns all distinct values indexed in a tag field. The 'index' parameter specifies the index to check, and the 'field' parameter specifies the tag field to retrieve values from. For more information, please refer to the Redis documentation: [FT.TAGVALS]: (https://redis.io/commands/ft.tagvals/)
func (ClusterClient) FT_List ¶
func (c ClusterClient) FT_List(ctx context.Context) *StringSliceCmd
FT_List - Lists all the existing indexes in the database. For more information, please refer to the Redis documentation: [FT._LIST]: (https://redis.io/commands/ft._list/)
func (ClusterClient) FlushAllAsync ¶
func (ClusterClient) FlushDBAsync ¶
func (*ClusterClient) ForEachMaster ¶
func (c *ClusterClient) ForEachMaster( ctx context.Context, fn func(ctx context.Context, client *Client) error, ) error
ForEachMaster concurrently calls the fn on each master node in the cluster. It returns the first error if any.
func (*ClusterClient) ForEachShard ¶
func (c *ClusterClient) ForEachShard( ctx context.Context, fn func(ctx context.Context, client *Client) error, ) error
ForEachShard concurrently calls the fn on each known node in the cluster. It returns the first error if any.
func (*ClusterClient) ForEachSlave ¶
func (c *ClusterClient) ForEachSlave( ctx context.Context, fn func(ctx context.Context, client *Client) error, ) error
ForEachSlave concurrently calls the fn on each slave node in the cluster. It returns the first error if any.
func (ClusterClient) FunctionDelete ¶
func (ClusterClient) FunctionDump ¶
func (ClusterClient) FunctionFlush ¶
func (ClusterClient) FunctionFlushAsync ¶
func (ClusterClient) FunctionKill ¶
func (ClusterClient) FunctionList ¶
func (c ClusterClient) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
func (ClusterClient) FunctionLoad ¶
func (ClusterClient) FunctionLoadReplace ¶
func (ClusterClient) FunctionRestore ¶
func (ClusterClient) FunctionStats ¶
func (c ClusterClient) FunctionStats(ctx context.Context) *FunctionStatsCmd
func (ClusterClient) GeoAdd ¶
func (c ClusterClient) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
func (ClusterClient) GeoHash ¶
func (c ClusterClient) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
func (ClusterClient) GeoRadius ¶
func (c ClusterClient) GeoRadius( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
func (ClusterClient) GeoRadiusByMember ¶
func (c ClusterClient) GeoRadiusByMember( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
func (ClusterClient) GeoRadiusByMemberStore ¶
func (c ClusterClient) GeoRadiusByMemberStore( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
func (ClusterClient) GeoRadiusStore ¶
func (c ClusterClient) GeoRadiusStore( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
func (ClusterClient) GeoSearch ¶
func (c ClusterClient) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
func (ClusterClient) GeoSearchLocation ¶
func (c ClusterClient) GeoSearchLocation( ctx context.Context, key string, q *GeoSearchLocationQuery, ) *GeoSearchLocationCmd
func (ClusterClient) GeoSearchStore ¶
func (c ClusterClient) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
func (ClusterClient) Get ¶
Get Redis `GET key` command. It returns redis.Nil error when key does not exist.
func (ClusterClient) GetEx ¶
GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0.
func (ClusterClient) HExpire ¶
func (c ClusterClient) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (ClusterClient) HExpireAt ¶
func (c ClusterClient) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds. Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields. The command sets absolute expiration times based on the UNIX timestamp provided. For more information - https://redis.io/commands/hexpireat/
func (ClusterClient) HExpireAtWithArgs ¶
func (c ClusterClient) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (ClusterClient) HExpireTime ¶
func (c ClusterClient) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds. Requires a key and the fields themselves to fetch their expiration timestamps. This command returns the expiration times for each field or error/status codes for each field as specified. For more information - https://redis.io/commands/hexpiretime/
func (ClusterClient) HExpireWithArgs ¶
func (c ClusterClient) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (ClusterClient) HGetAll ¶
func (c ClusterClient) HGetAll(ctx context.Context, key string) *MapStringStringCmd
func (ClusterClient) HIncrByFloat ¶
func (ClusterClient) HKeys ¶
func (c ClusterClient) HKeys(ctx context.Context, key string) *StringSliceCmd
func (ClusterClient) HMGet ¶
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.
func (ClusterClient) HMSet ¶
HMSet is a deprecated version of HSet left for compatibility with Redis 3.
func (ClusterClient) HPExpire ¶
func (c ClusterClient) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HPExpire - Sets the expiration time for specified fields in a hash in milliseconds. Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields. The command modifies the standard time.Duration to milliseconds for the Redis command. For more information - https://redis.io/commands/hpexpire/
func (ClusterClient) HPExpireAt ¶
func (c ClusterClient) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds. Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds. For more information - https://redis.io/commands/hpexpireat/
func (ClusterClient) HPExpireAtWithArgs ¶
func (c ClusterClient) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (ClusterClient) HPExpireTime ¶
func (c ClusterClient) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds. Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters. Provides the expiration timestamp for each field in milliseconds. For more information - https://redis.io/commands/hexpiretime/
func (ClusterClient) HPExpireWithArgs ¶
func (c ClusterClient) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (ClusterClient) HPTTL ¶
func (c ClusterClient) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds. Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields. This command provides the TTL in milliseconds for each field or returns error/status codes as needed. For more information - https://redis.io/commands/hpttl/
func (ClusterClient) HPersist ¶
func (c ClusterClient) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPersist - Removes the expiration time from specified fields in a hash. Accepts a key and the fields themselves. This command ensures that each field specified will have its expiration removed if present. For more information - https://redis.io/commands/hpersist/
func (ClusterClient) HRandField ¶
func (c ClusterClient) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
func (ClusterClient) HRandFieldWithValues ¶
func (c ClusterClient) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
func (ClusterClient) HScanNoValues ¶
func (ClusterClient) HSet ¶
HSet accepts values in following formats:
HSet("myhash", "key1", "value1", "key2", "value2")
HSet("myhash", []string{"key1", "value1", "key2", "value2"})
HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` }
HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface.
Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute.
func (ClusterClient) HTTL ¶
func (c ClusterClient) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds. Requires a key and the fields themselves. It returns the TTL for each specified field. This command fetches the TTL in seconds for each field or returns error/status codes as appropriate. For more information - https://redis.io/commands/httl/
func (ClusterClient) HVals ¶
func (c ClusterClient) HVals(ctx context.Context, key string) *StringSliceCmd
func (ClusterClient) IncrByFloat ¶
func (ClusterClient) JSONArrAppend ¶
func (c ClusterClient) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
JSONArrAppend adds the provided JSON values to the end of the array at the given path. For more information, see https://redis.io/commands/json.arrappend
func (ClusterClient) JSONArrIndex ¶
func (c ClusterClient) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
JSONArrIndex searches for the first occurrence of the provided JSON value in the array at the given path. For more information, see https://redis.io/commands/json.arrindex
func (ClusterClient) JSONArrIndexWithArgs ¶
func (c ClusterClient) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, value ...interface{}) *IntSliceCmd
JSONArrIndexWithArgs searches for the first occurrence of a JSON value in an array while allowing the start and stop options to be provided. For more information, see https://redis.io/commands/json.arrindex
func (ClusterClient) JSONArrInsert ¶
func (c ClusterClient) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
JSONArrInsert inserts the JSON values into the array at the specified path before the index (shifts to the right). For more information, see https://redis.io/commands/json.arrinsert
func (ClusterClient) JSONArrLen ¶
func (c ClusterClient) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
JSONArrLen reports the length of the JSON array at the specified path in the given key. For more information, see https://redis.io/commands/json.arrlen
func (ClusterClient) JSONArrPop ¶
func (c ClusterClient) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
JSONArrPop removes and returns an element from the specified index in the array. For more information, see https://redis.io/commands/json.arrpop
func (ClusterClient) JSONArrTrim ¶
func (c ClusterClient) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
JSONArrTrim trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (ClusterClient) JSONArrTrimWithArgs ¶
func (c ClusterClient) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
JSONArrTrimWithArgs trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (ClusterClient) JSONClear ¶
JSONClear clears container values (arrays/objects) and sets numeric values to 0. For more information, see https://redis.io/commands/json.clear
func (ClusterClient) JSONDebugMemory ¶
JSONDebugMemory reports a value's memory usage in bytes (unimplemented) For more information, see https://redis.io/commands/json.debug-memory
func (ClusterClient) JSONDel ¶
JSONDel deletes a value. For more information, see https://redis.io/commands/json.del
func (ClusterClient) JSONForget ¶
JSONForget deletes a value. For more information, see https://redis.io/commands/json.forget
func (ClusterClient) JSONGet ¶
JSONGet returns the value at path in JSON serialized form. JSON.GET returns an array of strings. This function parses out the wrapping array but leaves the internal strings unprocessed by default (see Val()) For more information - https://redis.io/commands/json.get/
func (ClusterClient) JSONGetWithArgs ¶
func (c ClusterClient) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
JSONGetWithArgs - Retrieves the value of a key from a JSON document. This function also allows for specifying additional options such as: Indention, NewLine and Space For more information - https://redis.io/commands/json.get/
func (ClusterClient) JSONMGet ¶
func (c ClusterClient) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
JSONMGet returns the values at the specified path from multiple key arguments. Note - the arguments are reversed when compared with `JSON.MGET` as we want to follow the pattern of having the last argument be variable. For more information, see https://redis.io/commands/json.mget
func (ClusterClient) JSONMSetArgs ¶
func (c ClusterClient) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
JSONMSetArgs sets or updates one or more JSON values according to the specified key-path-value triplets. For more information, see https://redis.io/commands/json.mset
func (ClusterClient) JSONMerge ¶
JSONMerge merges a given JSON value into matching paths. For more information, see https://redis.io/commands/json.merge
func (ClusterClient) JSONNumIncrBy ¶
JSONNumIncrBy increments the number value stored at the specified path by the provided number. For more information, see https://redis.io/docs/latest/commands/json.numincrby/
func (ClusterClient) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by the specified path. For more information, see https://redis.io/commands/json.objkeys
func (ClusterClient) JSONObjLen ¶
func (c ClusterClient) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONObjLen reports the number of keys in the JSON object at the specified path in the given key. For more information, see https://redis.io/commands/json.objlen
func (ClusterClient) JSONSet ¶
JSONSet sets the JSON value at the given path in the given key. The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or a []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (ClusterClient) JSONSetMode ¶
func (c ClusterClient) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
JSONSetMode sets the JSON value at the given path in the given key and allows the mode to be set (the mode value must be "XX" or "NX"). The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (ClusterClient) JSONStrAppend ¶
func (c ClusterClient) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
JSONStrAppend appends the JSON-string values to the string at the specified path. For more information, see https://redis.io/commands/json.strappend
func (ClusterClient) JSONStrLen ¶
func (c ClusterClient) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONStrLen reports the length of the JSON String at the specified path in the given key. For more information, see https://redis.io/commands/json.strlen
func (ClusterClient) JSONToggle ¶
func (c ClusterClient) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONToggle toggles a Boolean value stored at the specified path. For more information, see https://redis.io/commands/json.toggle
func (ClusterClient) JSONType ¶
func (c ClusterClient) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
JSONType reports the type of JSON value at the specified path. For more information, see https://redis.io/commands/json.type
func (ClusterClient) Keys ¶
func (c ClusterClient) Keys(ctx context.Context, pattern string) *StringSliceCmd
func (ClusterClient) LInsertAfter ¶
func (ClusterClient) LInsertBefore ¶
func (ClusterClient) LMPop ¶
func (c ClusterClient) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2")
func (ClusterClient) LPopCount ¶
func (c ClusterClient) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (ClusterClient) LRange ¶
func (c ClusterClient) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (ClusterClient) MSet ¶
MSet is like Set but accepts multiple values:
- MSet("key1", "value1", "key2", "value2")
- MSet([]string{"key1", "value1", "key2", "value2"})
- MSet(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSet(struct), For struct types, see HSet description.
func (ClusterClient) MSetNX ¶
MSetNX is like SetNX but accepts multiple values:
- MSetNX("key1", "value1", "key2", "value2")
- MSetNX([]string{"key1", "value1", "key2", "value2"})
- MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSetNX(struct), For struct types, see HSet description.
func (*ClusterClient) MasterForKey ¶
MasterForKey return a client to the master node for a particular key.
func (ClusterClient) MemoryUsage ¶
func (ClusterClient) ModuleLoadex ¶
func (c ClusterClient) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
ModuleLoadex Redis `MODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS args [args ...]]` command.
func (ClusterClient) Monitor ¶
func (c ClusterClient) Monitor(ctx context.Context, ch chan string) *MonitorCmd
Monitor - represents a Redis MONITOR command, allowing the user to capture and process all commands sent to a Redis server. This mimics the behavior of MONITOR in the redis-cli.
Notes: - Using MONITOR blocks the connection to the server for itself. It needs a dedicated connection - The user should create a channel of type string - This runs concurrently in the background. Trigger via the Start and Stop functions See further: Redis MONITOR command: https://redis.io/commands/monitor
func (ClusterClient) ObjectEncoding ¶
func (ClusterClient) ObjectFreq ¶
func (ClusterClient) ObjectIdleTime ¶
func (c ClusterClient) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
func (ClusterClient) ObjectRefCount ¶
func (*ClusterClient) OnNewNode ¶
func (c *ClusterClient) OnNewNode(fn func(rdb *Client))
func (*ClusterClient) Options ¶
func (c *ClusterClient) Options() *ClusterOptions
Options returns read-only Options that were used to create the client.
func (ClusterClient) PExpireTime ¶
func (c ClusterClient) PExpireTime(ctx context.Context, key string) *DurationCmd
func (*ClusterClient) PSubscribe ¶
func (c *ClusterClient) PSubscribe(ctx context.Context, channels ...string) *PubSub
PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription.
func (ClusterClient) PTTL ¶
func (c ClusterClient) PTTL(ctx context.Context, key string) *DurationCmd
func (*ClusterClient) Pipeline ¶
func (c *ClusterClient) Pipeline() Pipeliner
func (*ClusterClient) PoolStats ¶
func (c *ClusterClient) PoolStats() *PoolStats
PoolStats returns accumulated connection pool stats.
func (*ClusterClient) Process ¶
func (c *ClusterClient) Process(ctx context.Context, cmd Cmder) error
func (ClusterClient) PubSubChannels ¶
func (c ClusterClient) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
func (ClusterClient) PubSubNumPat ¶
func (ClusterClient) PubSubNumSub ¶
func (c ClusterClient) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (ClusterClient) PubSubShardChannels ¶
func (c ClusterClient) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
func (ClusterClient) PubSubShardNumSub ¶
func (c ClusterClient) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (ClusterClient) RPopCount ¶
func (c ClusterClient) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (*ClusterClient) ReloadState ¶
func (c *ClusterClient) ReloadState(ctx context.Context)
ReloadState reloads cluster state. If available it calls ClusterSlots func to get cluster slots information.
func (ClusterClient) RestoreReplace ¶
func (ClusterClient) SDiff ¶
func (c ClusterClient) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
func (ClusterClient) SDiffStore ¶
func (ClusterClient) SInter ¶
func (c ClusterClient) SInter(ctx context.Context, keys ...string) *StringSliceCmd
func (ClusterClient) SInterCard ¶
func (ClusterClient) SInterStore ¶
func (ClusterClient) SMIsMember ¶
func (c ClusterClient) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
func (ClusterClient) SMembers ¶
func (c ClusterClient) SMembers(ctx context.Context, key string) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
func (ClusterClient) SMembersMap ¶
func (c ClusterClient) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
func (ClusterClient) SPopN ¶
func (c ClusterClient) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
SPopN Redis `SPOP key count` command.
func (ClusterClient) SRandMember ¶
SRandMember Redis `SRANDMEMBER key` command.
func (ClusterClient) SRandMemberN ¶
func (c ClusterClient) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
SRandMemberN Redis `SRANDMEMBER key count` command.
func (*ClusterClient) SSubscribe ¶
func (c *ClusterClient) SSubscribe(ctx context.Context, channels ...string) *PubSub
SSubscribe Subscribes the client to the specified shard channels.
func (ClusterClient) SUnion ¶
func (c ClusterClient) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
func (ClusterClient) SUnionStore ¶
func (*ClusterClient) ScriptExists ¶
func (c *ClusterClient) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
func (*ClusterClient) ScriptFlush ¶
func (c *ClusterClient) ScriptFlush(ctx context.Context) *StatusCmd
func (ClusterClient) ScriptKill ¶
func (*ClusterClient) ScriptLoad ¶
func (c *ClusterClient) ScriptLoad(ctx context.Context, script string) *StringCmd
func (ClusterClient) Set ¶
func (c ClusterClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (ClusterClient) SetArgs ¶
func (c ClusterClient) SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd
SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options.
func (ClusterClient) SetEx ¶
func (c ClusterClient) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
func (ClusterClient) SetNX ¶
func (c ClusterClient) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetNX Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (ClusterClient) SetXX ¶
func (c ClusterClient) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetXX Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (ClusterClient) ShutdownNoSave ¶
func (ClusterClient) ShutdownSave ¶
func (*ClusterClient) SlaveForKey ¶
SlaveForKey gets a client for a replica node to run any command on it. This is especially useful if we want to run a particular lua script which has only read only commands on the replica. This is because other redis commands generally have a flag that points that they are read only and automatically run on the replica nodes if ClusterOptions.ReadOnly flag is set to true.
func (ClusterClient) SlowLogGet ¶
func (c ClusterClient) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
func (ClusterClient) Sort ¶
func (c ClusterClient) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (ClusterClient) SortInterfaces ¶
func (ClusterClient) SortRO ¶
func (c ClusterClient) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (*ClusterClient) Subscribe ¶
func (c *ClusterClient) Subscribe(ctx context.Context, channels ...string) *PubSub
Subscribe subscribes the client to the specified channels. Channels can be omitted to create empty subscription.
func (ClusterClient) TDigestAdd ¶
TDigestAdd adds one or more elements to a t-Digest data structure. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.add/
func (ClusterClient) TDigestByRank ¶
func (c ClusterClient) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRank returns an array of values from a t-Digest data structure based on their rank. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrank/
func (ClusterClient) TDigestByRevRank ¶
func (c ClusterClient) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRevRank returns an array of values from a t-Digest data structure based on their reverse rank. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrevrank/
func (ClusterClient) TDigestCDF ¶
func (c ClusterClient) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestCDF returns an array of cumulative distribution function (CDF) values for one or more elements in a t-Digest data structure. The CDF value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the CDF values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.cdf/
func (ClusterClient) TDigestCreate ¶
TDigestCreate creates an empty t-Digest data structure with default parameters. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (ClusterClient) TDigestCreateWithCompression ¶
func (c ClusterClient) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
TDigestCreateWithCompression creates an empty t-Digest data structure with a specified compression parameter. The compression parameter controls the accuracy and memory usage of the t-Digest. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (ClusterClient) TDigestInfo ¶
func (c ClusterClient) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
TDigestInfo returns information about a t-Digest data structure. For more information - https://redis.io/commands/tdigest.info/
func (ClusterClient) TDigestMax ¶
TDigestMax returns the maximum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.max/
func (ClusterClient) TDigestMerge ¶
func (c ClusterClient) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, sourceKeys ...string) *StatusCmd
TDigestMerge merges multiple t-Digest data structures into a single t-Digest. This function also allows for specifying additional options such as compression and override behavior. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.merge/
func (ClusterClient) TDigestMin ¶
TDigestMin returns the minimum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.min/
func (ClusterClient) TDigestQuantile ¶
func (c ClusterClient) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestQuantile returns an array of quantile values for one or more elements in a t-Digest data structure. The quantile value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the quantile values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.quantile/
func (ClusterClient) TDigestRank ¶
func (c ClusterClient) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRank returns an array of rank values for one or more elements in a t-Digest data structure. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of integers representing the rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.rank/
func (ClusterClient) TDigestReset ¶
TDigestReset resets a t-Digest data structure to its initial state. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.reset/
func (ClusterClient) TDigestRevRank ¶
func (c ClusterClient) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRevRank returns an array of reverse rank values for one or more elements in a t-Digest data structure. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of integers representing the reverse rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.revrank/
func (ClusterClient) TDigestTrimmedMean ¶
func (c ClusterClient) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
TDigestTrimmedMean returns the trimmed mean value from a t-Digest data structure. The trimmed mean is calculated by removing a specified fraction of the highest and lowest values from the t-Digest and then calculating the mean of the remaining values. Returns a float representing the trimmed mean value or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.trimmed_mean/
func (ClusterClient) TFCall ¶
func (c ClusterClient) TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
TFCall - invoke a function. For more information - https://redis.io/commands/tfcall/
func (ClusterClient) TFCallASYNC ¶
func (c ClusterClient) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
TFCallASYNC - invoke an asynchronous JavaScript function (coroutine). For more information - https://redis.io/commands/TFCallASYNC/
func (ClusterClient) TFCallASYNCArgs ¶
func (ClusterClient) TFCallArgs ¶
func (ClusterClient) TFunctionDelete ¶
TFunctionDelete - delete a JavaScript library from Redis. For more information - https://redis.io/commands/tfunction-delete/
func (ClusterClient) TFunctionList ¶
func (c ClusterClient) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
TFunctionList - list the functions with additional information about each function. For more information - https://redis.io/commands/tfunction-list/
func (ClusterClient) TFunctionListArgs ¶
func (c ClusterClient) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
func (ClusterClient) TFunctionLoad ¶
TFunctionLoad - load a new JavaScript library into Redis. For more information - https://redis.io/commands/tfunction-load/
func (ClusterClient) TFunctionLoadArgs ¶
func (c ClusterClient) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
func (ClusterClient) TSAdd ¶
func (c ClusterClient) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
TSAdd - Adds one or more observations to a t-digest sketch. For more information - https://redis.io/commands/ts.add/
func (ClusterClient) TSAddWithArgs ¶
func (c ClusterClient) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, options *TSOptions) *IntCmd
TSAddWithArgs - Adds one or more observations to a t-digest sketch. This function also allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.add/
func (ClusterClient) TSAlter ¶
func (c ClusterClient) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
TSAlter - Alters an existing time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize and DuplicatePolicy. For more information - https://redis.io/commands/ts.alter/
func (ClusterClient) TSCreate ¶
TSCreate - Creates a new time-series key. For more information - https://redis.io/commands/ts.create/
func (ClusterClient) TSCreateRule ¶
func (c ClusterClient) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int) *StatusCmd
TSCreateRule - Creates a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.createrule/
func (ClusterClient) TSCreateRuleWithArgs ¶
func (c ClusterClient) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd
TSCreateRuleWithArgs - Creates a compaction rule from sourceKey to destKey with additional option. This function allows for specifying additional option such as: alignTimestamp. For more information - https://redis.io/commands/ts.createrule/
func (ClusterClient) TSCreateWithArgs ¶
func (c ClusterClient) TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd
TSCreateWithArgs - Creates a new time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.create/
func (ClusterClient) TSDecrBy ¶
TSDecrBy - Decrements the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.decrby/
func (ClusterClient) TSDecrByWithArgs ¶
func (c ClusterClient) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSDecrByWithArgs - Decrements the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.decrby/
func (ClusterClient) TSDel ¶
func (c ClusterClient) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
TSDel - Deletes a range of samples from a time-series key. For more information - https://redis.io/commands/ts.del/
func (ClusterClient) TSDeleteRule ¶
func (c ClusterClient) TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd
TSDeleteRule - Deletes a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.deleterule/
func (ClusterClient) TSGet ¶
func (c ClusterClient) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
TSGet - Gets the last sample of a time-series key. For more information - https://redis.io/commands/ts.get/
func (ClusterClient) TSGetWithArgs ¶
func (c ClusterClient) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
TSGetWithArgs - Gets the last sample of a time-series key with additional option. This function allows for specifying additional option such as: Latest. For more information - https://redis.io/commands/ts.get/
func (ClusterClient) TSIncrBy ¶
TSIncrBy - Increments the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.incrby/
func (ClusterClient) TSIncrByWithArgs ¶
func (c ClusterClient) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSIncrByWithArgs - Increments the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.incrby/
func (ClusterClient) TSInfo ¶
func (c ClusterClient) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
TSInfo - Returns information about a time-series key. For more information - https://redis.io/commands/ts.info/
func (ClusterClient) TSInfoWithArgs ¶
func (c ClusterClient) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
TSInfoWithArgs - Returns information about a time-series key with additional option. This function allows for specifying additional option such as: Debug. For more information - https://redis.io/commands/ts.info/
func (ClusterClient) TSMAdd ¶
func (c ClusterClient) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
TSMAdd - Adds multiple samples to multiple time-series keys. It accepts a slice of 'ktv' slices, each containing exactly three elements: key, timestamp, and value. This struct must be provided for this command to work. For more information - https://redis.io/commands/ts.madd/
func (ClusterClient) TSMGet ¶
func (c ClusterClient) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
TSMGet - Returns the last sample of multiple time-series keys. For more information - https://redis.io/commands/ts.mget/
func (ClusterClient) TSMGetWithArgs ¶
func (c ClusterClient) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
TSMGetWithArgs - Returns the last sample of multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, WithLabels and SelectedLabels. For more information - https://redis.io/commands/ts.mget/
func (ClusterClient) TSMRange ¶
func (c ClusterClient) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRange - Returns a range of samples from multiple time-series keys. For more information - https://redis.io/commands/ts.mrange/
func (ClusterClient) TSMRangeWithArgs ¶
func (c ClusterClient) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRangeOptions) *MapStringSliceInterfaceCmd
TSMRangeWithArgs - Returns a range of samples from multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrange/
func (ClusterClient) TSMRevRange ¶
func (c ClusterClient) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRevRange - Returns a range of samples from multiple time-series keys in reverse order. For more information - https://redis.io/commands/ts.mrevrange/
func (ClusterClient) TSMRevRangeWithArgs ¶
func (c ClusterClient) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRevRangeOptions) *MapStringSliceInterfaceCmd
TSMRevRangeWithArgs - Returns a range of samples from multiple time-series keys in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrevrange/
func (ClusterClient) TSQueryIndex ¶
func (c ClusterClient) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
TSQueryIndex - Returns all the keys matching the filter expression. For more information - https://redis.io/commands/ts.queryindex/
func (ClusterClient) TSRange ¶
func (c ClusterClient) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRange - Returns a range of samples from a time-series key. For more information - https://redis.io/commands/ts.range/
func (ClusterClient) TSRangeWithArgs ¶
func (c ClusterClient) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRangeOptions) *TSTimestampValueSliceCmd
TSRangeWithArgs - Returns a range of samples from a time-series key with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.range/
func (ClusterClient) TSRevRange ¶
func (c ClusterClient) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRevRange - Returns a range of samples from a time-series key in reverse order. For more information - https://redis.io/commands/ts.revrange/
func (ClusterClient) TSRevRangeWithArgs ¶
func (c ClusterClient) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRevRangeOptions) *TSTimestampValueSliceCmd
TSRevRangeWithArgs - Returns a range of samples from a time-series key in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.revrange/
func (ClusterClient) TopKAdd ¶
func (c ClusterClient) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKAdd adds one or more elements to a Top-K filter. Returns an array of strings representing the items that were removed from the filter, if any. For more information - https://redis.io/commands/topk.add/
func (ClusterClient) TopKCount ¶
func (c ClusterClient) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
TopKCount returns an estimate of the number of times an item may be in a Top-K filter. For more information - https://redis.io/commands/topk.count/
func (ClusterClient) TopKIncrBy ¶
func (c ClusterClient) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKIncrBy increases the count of one or more items in a Top-K filter. For more information - https://redis.io/commands/topk.incrby/
func (ClusterClient) TopKInfo ¶
func (c ClusterClient) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
TopKInfo returns information about a Top-K filter. For more information - https://redis.io/commands/topk.info/
func (ClusterClient) TopKList ¶
func (c ClusterClient) TopKList(ctx context.Context, key string) *StringSliceCmd
TopKList returns all items in Top-K list. For more information - https://redis.io/commands/topk.list/
func (ClusterClient) TopKListWithCount ¶
func (c ClusterClient) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
TopKListWithCount returns all items in Top-K list with their respective count. For more information - https://redis.io/commands/topk.list/
func (ClusterClient) TopKQuery ¶
func (c ClusterClient) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
TopKQuery check if multiple elements exist in a Top-K filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/topk.query/
func (ClusterClient) TopKReserve ¶
TopKReserve creates an empty Top-K filter with the specified number of top items to keep. For more information - https://redis.io/commands/topk.reserve/
func (ClusterClient) TopKReserveWithOptions ¶
func (c ClusterClient) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
TopKReserveWithOptions creates an empty Top-K filter with the specified number of top items to keep and additional options. This function allows for specifying additional options such as width, depth and decay. For more information - https://redis.io/commands/topk.reserve/
func (*ClusterClient) TxPipeline ¶
func (c *ClusterClient) TxPipeline() Pipeliner
TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
func (*ClusterClient) TxPipelined ¶
func (ClusterClient) XAutoClaim ¶
func (c ClusterClient) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
func (ClusterClient) XAutoClaimJustID ¶
func (c ClusterClient) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
func (ClusterClient) XClaim ¶
func (c ClusterClient) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
func (ClusterClient) XClaimJustID ¶
func (c ClusterClient) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
func (ClusterClient) XGroupCreate ¶
func (ClusterClient) XGroupCreateConsumer ¶
func (ClusterClient) XGroupCreateMkStream ¶
func (ClusterClient) XGroupDelConsumer ¶
func (ClusterClient) XGroupDestroy ¶
func (ClusterClient) XGroupSetID ¶
func (ClusterClient) XInfoConsumers ¶
func (c ClusterClient) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
func (ClusterClient) XInfoGroups ¶
func (c ClusterClient) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
func (ClusterClient) XInfoStream ¶
func (c ClusterClient) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
func (ClusterClient) XInfoStreamFull ¶
func (c ClusterClient) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0.
func (ClusterClient) XPending ¶
func (c ClusterClient) XPending(ctx context.Context, stream, group string) *XPendingCmd
func (ClusterClient) XPendingExt ¶
func (c ClusterClient) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
func (ClusterClient) XRange ¶
func (c ClusterClient) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (ClusterClient) XRangeN ¶
func (c ClusterClient) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (ClusterClient) XRead ¶
func (c ClusterClient) XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd
func (ClusterClient) XReadGroup ¶
func (c ClusterClient) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
func (ClusterClient) XReadStreams ¶
func (c ClusterClient) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
func (ClusterClient) XRevRange ¶
func (c ClusterClient) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (ClusterClient) XRevRangeN ¶
func (c ClusterClient) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (ClusterClient) XTrimMaxLen ¶
XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen
func (ClusterClient) XTrimMaxLenApprox ¶
func (ClusterClient) XTrimMinID ¶
func (ClusterClient) XTrimMinIDApprox ¶
func (ClusterClient) ZAddArgsIncr ¶
func (ClusterClient) ZDiff ¶
func (c ClusterClient) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
func (ClusterClient) ZDiffStore ¶
ZDiffStore redis-server version >=6.2.0.
func (ClusterClient) ZDiffWithScores ¶
ZDiffWithScores redis-server version >= 6.2.0.
func (ClusterClient) ZInter ¶
func (c ClusterClient) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
func (ClusterClient) ZInterCard ¶
func (ClusterClient) ZInterStore ¶
func (ClusterClient) ZInterWithScores ¶
func (ClusterClient) ZMPop ¶
func (c ClusterClient) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2")
func (ClusterClient) ZMScore ¶
func (c ClusterClient) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
func (ClusterClient) ZRandMember ¶
func (c ClusterClient) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
func (ClusterClient) ZRandMemberWithScores ¶
ZRandMemberWithScores redis-server version >= 6.2.0.
func (ClusterClient) ZRange ¶
func (c ClusterClient) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (ClusterClient) ZRangeArgs ¶
func (c ClusterClient) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
func (ClusterClient) ZRangeArgsWithScores ¶
func (c ClusterClient) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
func (ClusterClient) ZRangeByLex ¶
func (c ClusterClient) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (ClusterClient) ZRangeByScore ¶
func (c ClusterClient) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (ClusterClient) ZRangeByScoreWithScores ¶
func (ClusterClient) ZRangeStore ¶
func (c ClusterClient) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
func (ClusterClient) ZRangeWithScores ¶
func (ClusterClient) ZRankWithScore ¶
func (c ClusterClient) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
ZRankWithScore according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (ClusterClient) ZRemRangeByLex ¶
func (ClusterClient) ZRemRangeByRank ¶
func (ClusterClient) ZRemRangeByScore ¶
func (ClusterClient) ZRevRange ¶
func (c ClusterClient) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (ClusterClient) ZRevRangeByLex ¶
func (c ClusterClient) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (ClusterClient) ZRevRangeByScore ¶
func (c ClusterClient) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (ClusterClient) ZRevRangeByScoreWithScores ¶
func (ClusterClient) ZRevRangeWithScores ¶
func (c ClusterClient) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
ZRevRangeWithScores according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (ClusterClient) ZRevRankWithScore ¶
func (c ClusterClient) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
func (ClusterClient) ZUnion ¶
func (c ClusterClient) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
func (ClusterClient) ZUnionStore ¶
type ClusterCmdable ¶
type ClusterCmdable interface { ClusterMyShardID(ctx context.Context) *StringCmd ClusterSlots(ctx context.Context) *ClusterSlotsCmd ClusterShards(ctx context.Context) *ClusterShardsCmd ClusterLinks(ctx context.Context) *ClusterLinksCmd ClusterNodes(ctx context.Context) *StringCmd ClusterMeet(ctx context.Context, host, port string) *StatusCmd ClusterForget(ctx context.Context, nodeID string) *StatusCmd ClusterReplicate(ctx context.Context, nodeID string) *StatusCmd ClusterResetSoft(ctx context.Context) *StatusCmd ClusterResetHard(ctx context.Context) *StatusCmd ClusterInfo(ctx context.Context) *StringCmd ClusterKeySlot(ctx context.Context, key string) *IntCmd ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd ClusterCountFailureReports(ctx context.Context, nodeID string) *IntCmd ClusterCountKeysInSlot(ctx context.Context, slot int) *IntCmd ClusterDelSlots(ctx context.Context, slots ...int) *StatusCmd ClusterDelSlotsRange(ctx context.Context, min, max int) *StatusCmd ClusterSaveConfig(ctx context.Context) *StatusCmd ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd ClusterFailover(ctx context.Context) *StatusCmd ClusterAddSlots(ctx context.Context, slots ...int) *StatusCmd ClusterAddSlotsRange(ctx context.Context, min, max int) *StatusCmd ReadOnly(ctx context.Context) *StatusCmd ReadWrite(ctx context.Context) *StatusCmd }
type ClusterLink ¶
type ClusterLinksCmd ¶
type ClusterLinksCmd struct {
// contains filtered or unexported fields
}
func NewClusterLinksCmd ¶
func NewClusterLinksCmd(ctx context.Context, args ...interface{}) *ClusterLinksCmd
func (*ClusterLinksCmd) Result ¶
func (cmd *ClusterLinksCmd) Result() ([]ClusterLink, error)
func (*ClusterLinksCmd) SetFirstKeyPos ¶
func (cmd *ClusterLinksCmd) SetFirstKeyPos(keyPos int8)
func (*ClusterLinksCmd) SetVal ¶
func (cmd *ClusterLinksCmd) SetVal(val []ClusterLink)
func (*ClusterLinksCmd) String ¶
func (cmd *ClusterLinksCmd) String() string
func (*ClusterLinksCmd) Val ¶
func (cmd *ClusterLinksCmd) Val() []ClusterLink
type ClusterNode ¶
type ClusterOptions ¶
type ClusterOptions struct { // A seed list of host:port addresses of cluster nodes. Addrs []string // 每个连接都会执行 CLIENT SETNAME ClientName 为当前客户端设置客户端名字 ClientName string // NewClient creates a cluster node client with provided name and options. NewClient func(opt *Options) *Client // The maximum number of retries before giving up. Command is retried // on network errors and MOVED/ASK redirects. // Default is 3 retries. MaxRedirects int // Enables read-only commands on slave nodes. ReadOnly bool // Allows routing read-only commands to the closest master or slave node. // It automatically enables ReadOnly. RouteByLatency bool // Allows routing read-only commands to the random master or slave node. // It automatically enables ReadOnly. RouteRandomly bool // 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. ClusterSlots func(context.Context) ([]ClusterSlot, error) Dialer func(ctx context.Context, network, addr string) (net.Conn, error) OnConnect func(ctx context.Context, cn *Conn) error Protocol int Username string Password string CredentialsProvider func() (username string, password string) CredentialsProviderContext func(ctx context.Context) (username string, password string, err error) MaxRetries int MinRetryBackoff time.Duration MaxRetryBackoff time.Duration DialTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration ContextTimeoutEnabled bool PoolFIFO bool PoolSize int // applies per cluster node and not for the whole cluster PoolTimeout time.Duration MinIdleConns int MaxIdleConns int MaxActiveConns int // applies per cluster node and not for the whole cluster ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration TLSConfig *tls.Config DisableIndentity bool // Disable set-lib on connect. Default is false. IdentitySuffix string // Add suffix to client name. Default is empty. }
ClusterOptions are used to configure a cluster client and should be passed to NewClusterClient.
func ParseClusterURL ¶
func ParseClusterURL(redisURL string) (*ClusterOptions, error)
ParseClusterURL parses a URL into ClusterOptions that can be used to connect to Redis. The URL must be in the form:
redis://<user>:<password>@<host>:<port> or rediss://<user>:<password>@<host>:<port>
To add additional addresses, specify the query parameter, "addr" one or more times. e.g:
redis://<user>:<password>@<host>:<port>?addr=<host2>:<port2>&addr=<host3>:<port3> or rediss://<user>:<password>@<host>:<port>?addr=<host2>:<port2>&addr=<host3>:<port3>
Most Option fields can be set using query parameters, with the following restrictions:
- field names are mapped using snake-case conversion: to set MaxRetries, use max_retries
- only scalar type fields are supported (bool, int, time.Duration)
- for time.Duration fields, values must be a valid input for time.ParseDuration(); additionally a plain integer as value (i.e. without unit) is interpreted as seconds
- to disable a duration field, use value less than or equal to 0; to use the default value, leave the value blank or remove the parameter
- only the last value is interpreted if a parameter is given multiple times
- fields "network", "addr", "username" and "password" can only be set using other URL attributes (scheme, host, userinfo, resp.), query parameters using these names will be treated as unknown parameters
- unknown parameter names will result in an error
Example:
redis://user:password@localhost:6789?dial_timeout=3&read_timeout=6s&addr=localhost:6790&addr=localhost:6791 is equivalent to: &ClusterOptions{ Addr: ["localhost:6789", "localhost:6790", "localhost:6791"] DialTimeout: 3 * time.Second, // no time unit = seconds ReadTimeout: 6 * time.Second, }
type ClusterShard ¶
type ClusterShardsCmd ¶
type ClusterShardsCmd struct {
// contains filtered or unexported fields
}
func NewClusterShardsCmd ¶
func NewClusterShardsCmd(ctx context.Context, args ...interface{}) *ClusterShardsCmd
func (*ClusterShardsCmd) Result ¶
func (cmd *ClusterShardsCmd) Result() ([]ClusterShard, error)
func (*ClusterShardsCmd) SetFirstKeyPos ¶
func (cmd *ClusterShardsCmd) SetFirstKeyPos(keyPos int8)
func (*ClusterShardsCmd) SetVal ¶
func (cmd *ClusterShardsCmd) SetVal(val []ClusterShard)
func (*ClusterShardsCmd) String ¶
func (cmd *ClusterShardsCmd) String() string
func (*ClusterShardsCmd) Val ¶
func (cmd *ClusterShardsCmd) Val() []ClusterShard
type ClusterSlot ¶
type ClusterSlot struct { Start int End int Nodes []ClusterNode }
type ClusterSlotsCmd ¶
type ClusterSlotsCmd struct {
// contains filtered or unexported fields
}
func NewClusterSlotsCmd ¶
func NewClusterSlotsCmd(ctx context.Context, args ...interface{}) *ClusterSlotsCmd
func NewClusterSlotsCmdResult ¶
func NewClusterSlotsCmdResult(val []ClusterSlot, err error) *ClusterSlotsCmd
NewClusterSlotsCmdResult returns a ClusterSlotsCmd initialised with val and err for testing.
func (*ClusterSlotsCmd) Result ¶
func (cmd *ClusterSlotsCmd) Result() ([]ClusterSlot, error)
func (*ClusterSlotsCmd) SetFirstKeyPos ¶
func (cmd *ClusterSlotsCmd) SetFirstKeyPos(keyPos int8)
func (*ClusterSlotsCmd) SetVal ¶
func (cmd *ClusterSlotsCmd) SetVal(val []ClusterSlot)
func (*ClusterSlotsCmd) String ¶
func (cmd *ClusterSlotsCmd) String() string
func (*ClusterSlotsCmd) Val ¶
func (cmd *ClusterSlotsCmd) Val() []ClusterSlot
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
func NewCmdResult ¶
NewCmdResult returns a Cmd initialised with val and err for testing.
func (*Cmd) Float32Slice ¶
func (*Cmd) Float64Slice ¶
func (*Cmd) Int64Slice ¶
func (*Cmd) SetFirstKeyPos ¶
func (cmd *Cmd) SetFirstKeyPos(keyPos int8)
func (*Cmd) StringSlice ¶
func (*Cmd) Uint64Slice ¶
type Cmdable ¶
type Cmdable interface { Pipeline() Pipeliner Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) TxPipeline() Pipeliner Command(ctx context.Context) *CommandsInfoCmd CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd ClientGetName(ctx context.Context) *StringCmd Echo(ctx context.Context, message interface{}) *StringCmd Ping(ctx context.Context) *StatusCmd Quit(ctx context.Context) *StatusCmd Unlink(ctx context.Context, keys ...string) *IntCmd BgRewriteAOF(ctx context.Context) *StatusCmd BgSave(ctx context.Context) *StatusCmd ClientKill(ctx context.Context, ipPort string) *StatusCmd ClientKillByFilter(ctx context.Context, keys ...string) *IntCmd ClientList(ctx context.Context) *StringCmd ClientInfo(ctx context.Context) *ClientInfoCmd ClientPause(ctx context.Context, dur time.Duration) *BoolCmd ClientUnpause(ctx context.Context) *BoolCmd ClientID(ctx context.Context) *IntCmd ClientUnblock(ctx context.Context, id int64) *IntCmd ClientUnblockWithError(ctx context.Context, id int64) *IntCmd ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd ConfigResetStat(ctx context.Context) *StatusCmd ConfigSet(ctx context.Context, parameter, value string) *StatusCmd ConfigRewrite(ctx context.Context) *StatusCmd DBSize(ctx context.Context) *IntCmd FlushAll(ctx context.Context) *StatusCmd FlushAllAsync(ctx context.Context) *StatusCmd FlushDB(ctx context.Context) *StatusCmd FlushDBAsync(ctx context.Context) *StatusCmd Info(ctx context.Context, section ...string) *StringCmd LastSave(ctx context.Context) *IntCmd Save(ctx context.Context) *StatusCmd Shutdown(ctx context.Context) *StatusCmd ShutdownSave(ctx context.Context) *StatusCmd ShutdownNoSave(ctx context.Context) *StatusCmd SlaveOf(ctx context.Context, host, port string) *StatusCmd SlowLogGet(ctx context.Context, num int64) *SlowLogCmd Time(ctx context.Context) *TimeCmd DebugObject(ctx context.Context, key string) *StringCmd MemoryUsage(ctx context.Context, key string, samples ...int) *IntCmd ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd ACLCmdable BitMapCmdable ClusterCmdable GearsCmdable GenericCmdable GeoCmdable HashCmdable HyperLogLogCmdable ListCmdable ProbabilisticCmdable PubSubCmdable ScriptingFunctionsCmdable SearchCmdable SetCmdable SortedSetCmdable StringCmdable StreamCmdable TimeseriesCmdable JSONCmdable }
type Cmder ¶
type Cmder interface { // Name command name. // e.g. "set k v ex 10" -> "set", "cluster info" -> "cluster". Name() string // full command name. // e.g. "set k v ex 10" -> "set", "cluster info" -> "cluster info". FullName() string // all args of the command. // e.g. "set k v ex 10" -> "[set k v ex 10]". Args() []interface{} // format request and response string. // e.g. "set k v ex 10" -> "set k v ex 10: OK", "get k" -> "get k: v". String() string SetFirstKeyPos(int8) SetErr(error) Err() error // contains filtered or unexported methods }
type CommandInfo ¶
type CommandsInfoCmd ¶
type CommandsInfoCmd struct {
// contains filtered or unexported fields
}
func NewCommandsInfoCmd ¶
func NewCommandsInfoCmd(ctx context.Context, args ...interface{}) *CommandsInfoCmd
func NewCommandsInfoCmdResult ¶
func NewCommandsInfoCmdResult(val map[string]*CommandInfo, err error) *CommandsInfoCmd
NewCommandsInfoCmdResult returns a CommandsInfoCmd initialised with val and err for testing.
func (*CommandsInfoCmd) Result ¶
func (cmd *CommandsInfoCmd) Result() (map[string]*CommandInfo, error)
func (*CommandsInfoCmd) SetFirstKeyPos ¶
func (cmd *CommandsInfoCmd) SetFirstKeyPos(keyPos int8)
func (*CommandsInfoCmd) SetVal ¶
func (cmd *CommandsInfoCmd) SetVal(val map[string]*CommandInfo)
func (*CommandsInfoCmd) String ¶
func (cmd *CommandsInfoCmd) String() string
func (*CommandsInfoCmd) Val ¶
func (cmd *CommandsInfoCmd) Val() map[string]*CommandInfo
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a single Redis connection rather than a pool of connections. Prefer running commands from Client unless there is a specific need for a continuous single Redis connection.
Example (Client_setInfo_libraryVersion) ¶
conn := rdb.Conn() err := conn.ClientSetInfo(ctx, redis.WithLibraryVersion("1.2.3")).Err() if err != nil { panic(err) } // Open other connections. for i := 0; i < 10; i++ { go rdb.Ping(ctx) } s, err := conn.ClientInfo(ctx).Result() if err != nil { panic(err) } fmt.Println(s.LibVer)
Output: 1.2.3
Example (Name) ¶
conn := rdb.Conn() err := conn.ClientSetName(ctx, "foobar").Err() if err != nil { panic(err) } // Open other connections. for i := 0; i < 10; i++ { go rdb.Ping(ctx) } s, err := conn.ClientGetName(ctx).Result() if err != nil { panic(err) } fmt.Println(s)
Output: foobar
func (Conn) ACLLogReset ¶
func (*Conn) AddHook ¶
func (hs *Conn) AddHook(hook Hook)
AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2:
client.AddHook(hook-1, hook-2)
hook-1:
func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } }
hook-2:
func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } }
The execution sequence is:
hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end
Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed.
func (Conn) AuthACL ¶
AuthACL Perform an AUTH command, using the given user and pass. Should be used to authenticate the current connection with one of the connections defined in the ACL list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
func (Conn) BFAdd ¶
BFAdd adds an item to a Bloom filter. For more information - https://redis.io/commands/bf.add/
func (Conn) BFCard ¶
BFCard returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter). For more information - https://redis.io/commands/bf.card/
func (Conn) BFExists ¶
BFExists determines whether a given item was added to a Bloom filter. For more information - https://redis.io/commands/bf.exists/
func (Conn) BFInfo ¶
Returns information about a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Conn) BFInfoArg ¶
BFInfoArg returns information about a specific option of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Conn) BFInfoCapacity ¶
BFInfoCapacity returns information about the capacity of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Conn) BFInfoExpansion ¶
BFInfoExpansion returns information about the expansion rate of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Conn) BFInfoFilters ¶
BFInfoFilters returns information about the filters of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Conn) BFInfoItems ¶
BFInfoItems returns information about the items of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Conn) BFInfoSize ¶
BFInfoSize returns information about the size of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Conn) BFInsert ¶
func (c Conn) BFInsert(ctx context.Context, key string, options *BFInsertOptions, elements ...interface{}) *BoolSliceCmd
BFInsert inserts elements into a Bloom filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. For more information - https://redis.io/commands/bf.insert/
func (Conn) BFLoadChunk ¶
func (c Conn) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
BFLoadChunk restores a Bloom filter previously saved using BF.SCANDUMP. For more information - https://redis.io/commands/bf.loadchunk/
func (Conn) BFMAdd ¶
func (c Conn) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMAdd adds multiple elements to a Bloom filter. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/bf.madd/
func (Conn) BFMExists ¶
func (c Conn) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMExists check if multiple elements exist in a Bloom filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/bf.mexists/
func (Conn) BFReserve ¶
func (c Conn) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserve creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. For more information - https://redis.io/commands/bf.reserve/
func (Conn) BFReserveExpansion ¶
func (c Conn) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
BFReserveExpansion creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying an expansion rate for the filter. For more information - https://redis.io/commands/bf.reserve/
func (Conn) BFReserveNonScaling ¶
func (c Conn) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserveNonScaling creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying that the filter should not scale. For more information - https://redis.io/commands/bf.reserve/
func (Conn) BFReserveWithArgs ¶
func (c Conn) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
BFReserveWithArgs creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying additional options such as expansion rate and non-scaling behavior. For more information - https://redis.io/commands/bf.reserve/
func (Conn) BFScanDump ¶
func (c Conn) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
Begins an incremental save of the Bloom filter. This command is useful for large Bloom filters that cannot fit into the DUMP and RESTORE model. For more information - https://redis.io/commands/bf.scandump/
func (Conn) BRPopLPush ¶
func (Conn) BZMPop ¶
func (c Conn) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd
BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set")
func (Conn) BgRewriteAOF ¶
func (Conn) BitField ¶
func (c Conn) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitField accepts multiple values:
- BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
- BitField([]string{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
- BitField([]interface{}{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
func (Conn) BitFieldRO ¶
func (c Conn) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitFieldRO - Read-only variant of the BITFIELD command. It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas. - BitFieldRO(ctx, key, "<Encoding0>", "<Offset0>", "<Encoding1>","<Offset1>")
func (Conn) BitPos ¶
BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`.
func (Conn) BitPosSpan ¶
func (c Conn) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte
func (Conn) CFAdd ¶
CFAdd adds an element to a Cuckoo filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.add/
func (Conn) CFAddNX ¶
CFAddNX adds an element to a Cuckoo filter only if it does not already exist in the filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.addnx/
func (Conn) CFCount ¶
CFCount returns an estimate of the number of times an element may be in a Cuckoo Filter. For more information - https://redis.io/commands/cf.count/
func (Conn) CFDel ¶
CFDel deletes an item once from the cuckoo filter. For more information - https://redis.io/commands/cf.del/
func (Conn) CFExists ¶
CFExists determines whether an item may exist in the Cuckoo Filter or not. For more information - https://redis.io/commands/cf.exists/
func (Conn) CFInfo ¶
CFInfo returns information about a Cuckoo filter. For more information - https://redis.io/commands/cf.info/
func (Conn) CFInsert ¶
func (c Conn) CFInsert(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *BoolSliceCmd
CFInsert inserts elements into a Cuckoo filter. This function also allows for specifying additional options such as capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insert/
func (Conn) CFInsertNX ¶
func (c Conn) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *IntSliceCmd
CFInsertNX inserts elements into a Cuckoo filter only if they do not already exist in the filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of integers indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insertnx/
func (Conn) CFLoadChunk ¶
func (c Conn) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
CFLoadChunk restores a filter previously saved using SCANDUMP. For more information - https://redis.io/commands/cf.loadchunk/
func (Conn) CFMExists ¶
func (c Conn) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
CFMExists check if multiple elements exist in a Cuckoo filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/cf.mexists/
func (Conn) CFReserve ¶
CFReserve creates an empty Cuckoo filter with the specified capacity. For more information - https://redis.io/commands/cf.reserve/
func (Conn) CFReserveBucketSize ¶
func (c Conn) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
CFReserveBucketSize creates an empty Cuckoo filter with the specified capacity and bucket size. For more information - https://redis.io/commands/cf.reserve/
func (Conn) CFReserveExpansion ¶
func (c Conn) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
CFReserveExpansion creates an empty Cuckoo filter with the specified capacity and expansion rate. For more information - https://redis.io/commands/cf.reserve/
func (Conn) CFReserveMaxIterations ¶
func (c Conn) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
CFReserveMaxIterations creates an empty Cuckoo filter with the specified capacity and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Conn) CFReserveWithArgs ¶
func (c Conn) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
CFReserveWithArgs creates an empty Cuckoo filter with the specified options. This function allows for specifying additional options such as bucket size and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Conn) CFScanDump ¶
func (c Conn) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
CFScanDump begins an incremental save of the cuckoo filter. For more information - https://redis.io/commands/cf.scandump/
func (Conn) CMSIncrBy ¶
func (c Conn) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSIncrBy increments the count of one or more items in a Count-Min Sketch filter. Returns an array of integers representing the updated count of each item. For more information - https://redis.io/commands/cms.incrby/
func (Conn) CMSInfo ¶
func (c Conn) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
CMSInfo returns information about a Count-Min Sketch filter. For more information - https://redis.io/commands/cms.info/
func (Conn) CMSInitByDim ¶
CMSInitByDim creates an empty Count-Min Sketch filter with the specified dimensions. For more information - https://redis.io/commands/cms.initbydim/
func (Conn) CMSInitByProb ¶
func (c Conn) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
CMSInitByProb creates an empty Count-Min Sketch filter with the specified error rate and probability. For more information - https://redis.io/commands/cms.initbyprob/
func (Conn) CMSMerge ¶
CMSMerge merges multiple Count-Min Sketch filters into a single filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Conn) CMSMergeWithWeight ¶
func (c Conn) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
CMSMergeWithWeight merges multiple Count-Min Sketch filters into a single filter with weights for each source filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Conn) CMSQuery ¶
func (c Conn) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSQuery returns count for item(s). For more information - https://redis.io/commands/cms.query/
func (Conn) ClientGetName ¶
ClientGetName returns the name of the connection.
func (Conn) ClientInfo ¶
func (c Conn) ClientInfo(ctx context.Context) *ClientInfoCmd
func (Conn) ClientKillByFilter ¶
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
func (Conn) ClientList ¶
func (Conn) ClientPause ¶
func (Conn) ClientSetInfo ¶
func (c Conn) ClientSetInfo(ctx context.Context, info LibraryInfo) *StatusCmd
ClientSetInfo sends a CLIENT SETINFO command with the provided info.
func (Conn) ClientSetName ¶
ClientSetName assigns a name to the connection.
func (Conn) ClientUnblockWithError ¶
func (Conn) ClientUnpause ¶
func (*Conn) Close ¶
func (c *Conn) Close() error
Close closes the client, releasing any open resources.
It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines.
func (Conn) ClusterAddSlots ¶
func (Conn) ClusterAddSlotsRange ¶
func (Conn) ClusterCountFailureReports ¶
func (Conn) ClusterCountKeysInSlot ¶
func (Conn) ClusterDelSlots ¶
func (Conn) ClusterDelSlotsRange ¶
func (Conn) ClusterFailover ¶
func (Conn) ClusterForget ¶
func (Conn) ClusterGetKeysInSlot ¶
func (c Conn) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
func (Conn) ClusterInfo ¶
func (Conn) ClusterLinks ¶
func (c Conn) ClusterLinks(ctx context.Context) *ClusterLinksCmd
func (Conn) ClusterMeet ¶
func (Conn) ClusterMyShardID ¶
func (Conn) ClusterNodes ¶
func (Conn) ClusterReplicate ¶
func (Conn) ClusterResetHard ¶
func (Conn) ClusterResetSoft ¶
func (Conn) ClusterSaveConfig ¶
func (Conn) ClusterShards ¶
func (c Conn) ClusterShards(ctx context.Context) *ClusterShardsCmd
func (Conn) ClusterSlaves ¶
func (c Conn) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
func (Conn) ClusterSlots ¶
func (c Conn) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
func (Conn) Command ¶
func (c Conn) Command(ctx context.Context) *CommandsInfoCmd
func (Conn) CommandGetKeys ¶
func (c Conn) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
func (Conn) CommandGetKeysAndFlags ¶
func (c Conn) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
func (Conn) CommandList ¶
func (c Conn) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
func (Conn) ConfigGet ¶
func (c Conn) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
func (Conn) ConfigResetStat ¶
func (Conn) ConfigRewrite ¶
func (Conn) ExpireTime ¶
func (c Conn) ExpireTime(ctx context.Context, key string) *DurationCmd
func (Conn) FCallRo ¶
func (c Conn) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
FCallRo this function simply calls FCallRO, Deprecated: to maintain convention FCallRO.
func (Conn) FTAggregate ¶
func (c Conn) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
FTAggregate - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Conn) FTAggregateWithArgs ¶
func (c Conn) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
FTAggregateWithArgs - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. This function also allows for specifying additional options such as: Verbatim, LoadAll, Load, Timeout, GroupBy, SortBy, SortByMax, Apply, LimitOffset, Limit, Filter, WithCursor, Params, and DialectVersion. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Conn) FTAliasAdd ¶
FTAliasAdd - Adds an alias to an index. The 'index' parameter specifies the index to which the alias is added, and the 'alias' parameter specifies the alias. For more information, please refer to the Redis documentation: [FT.ALIASADD]: (https://redis.io/commands/ft.aliasadd/)
func (Conn) FTAliasDel ¶
FTAliasDel - Removes an alias from an index. The 'alias' parameter specifies the alias to be removed. For more information, please refer to the Redis documentation: [FT.ALIASDEL]: (https://redis.io/commands/ft.aliasdel/)
func (Conn) FTAliasUpdate ¶
FTAliasUpdate - Updates an alias to an index. The 'index' parameter specifies the index to which the alias is updated, and the 'alias' parameter specifies the alias. If the alias already exists for a different index, it updates the alias to point to the specified index instead. For more information, please refer to the Redis documentation: [FT.ALIASUPDATE]: (https://redis.io/commands/ft.aliasupdate/)
func (Conn) FTAlter ¶
func (c Conn) FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd
FTAlter - Alters the definition of an existing index. The 'index' parameter specifies the index to alter, and the 'skipInitialScan' parameter specifies whether to skip the initial scan. The 'definition' parameter specifies the new definition for the index. For more information, please refer to the Redis documentation: [FT.ALTER]: (https://redis.io/commands/ft.alter/)
func (Conn) FTConfigGet ¶
func (c Conn) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
FTConfigGet - Retrieves the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to retrieve. For more information, please refer to the Redis documentation: [FT.CONFIG GET]: (https://redis.io/commands/ft.config-get/)
func (Conn) FTConfigSet ¶
FTConfigSet - Sets the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to set, and the 'value' parameter specifies the new value. For more information, please refer to the Redis documentation: [FT.CONFIG SET]: (https://redis.io/commands/ft.config-set/)
func (Conn) FTCreate ¶
func (c Conn) FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd
FTCreate - Creates a new index with the given options and schema. The 'index' parameter specifies the name of the index to create. The 'options' parameter specifies various options for the index, such as: whether to index hashes or JSONs, prefixes, filters, default language, score, score field, payload field, etc. The 'schema' parameter specifies the schema for the index, which includes the field name, field type, etc. For more information, please refer to the Redis documentation: [FT.CREATE]: (https://redis.io/commands/ft.create/)
func (Conn) FTCursorDel ¶
FTCursorDel - Deletes a cursor from an existing index. The 'index' parameter specifies the index from which to delete the cursor, and the 'cursorId' parameter specifies the ID of the cursor to delete. For more information, please refer to the Redis documentation: [FT.CURSOR DEL]: (https://redis.io/commands/ft.cursor-del/)
func (Conn) FTCursorRead ¶
func (c Conn) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
FTCursorRead - Reads the next results from an existing cursor. The 'index' parameter specifies the index from which to read the cursor, the 'cursorId' parameter specifies the ID of the cursor to read, and the 'count' parameter specifies the number of results to read. For more information, please refer to the Redis documentation: [FT.CURSOR READ]: (https://redis.io/commands/ft.cursor-read/)
func (Conn) FTDictAdd ¶
FTDictAdd - Adds terms to a dictionary. The 'dict' parameter specifies the dictionary to which to add the terms, and the 'term' parameter specifies the terms to add. For more information, please refer to the Redis documentation: [FT.DICTADD]: (https://redis.io/commands/ft.dictadd/)
func (Conn) FTDictDel ¶
FTDictDel - Deletes terms from a dictionary. The 'dict' parameter specifies the dictionary from which to delete the terms, and the 'term' parameter specifies the terms to delete. For more information, please refer to the Redis documentation: [FT.DICTDEL]: (https://redis.io/commands/ft.dictdel/)
func (Conn) FTDictDump ¶
func (c Conn) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
FTDictDump - Returns all terms in the specified dictionary. The 'dict' parameter specifies the dictionary from which to return the terms. For more information, please refer to the Redis documentation: [FT.DICTDUMP]: (https://redis.io/commands/ft.dictdump/)
func (Conn) FTDropIndex ¶
FTDropIndex - Deletes an index. The 'index' parameter specifies the index to delete. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Conn) FTDropIndexWithArgs ¶
func (c Conn) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
FTDropIndexWithArgs - Deletes an index with options. The 'index' parameter specifies the index to delete, and the 'options' parameter specifies the DeleteDocs option for docs deletion. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Conn) FTExplain ¶
FTExplain - Returns the execution plan for a complex query. The 'index' parameter specifies the index to query, and the 'query' parameter specifies the query string. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Conn) FTExplainCli ¶
FTExplainCli - Returns the execution plan for a complex query. [Not Implemented] For more information, see https://redis.io/commands/ft.explaincli/
func (Conn) FTExplainWithArgs ¶
func (c Conn) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
FTExplainWithArgs - Returns the execution plan for a complex query with options. The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Conn) FTInfo ¶
FTInfo - Retrieves information about an index. The 'index' parameter specifies the index to retrieve information about. For more information, please refer to the Redis documentation: [FT.INFO]: (https://redis.io/commands/ft.info/)
func (Conn) FTSearch ¶
func (c Conn) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
FTSearch - Executes a search query on an index. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Conn) FTSearchWithArgs ¶
func (c Conn) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
FTSearchWithArgs - Executes a search query on an index with additional options. The 'index' parameter specifies the index to search, the 'query' parameter specifies the search query, and the 'options' parameter specifies additional options for the search. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Conn) FTSpellCheck ¶
func (c Conn) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
FTSpellCheck - Checks a query string for spelling errors. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Conn) FTSpellCheckWithArgs ¶
func (c Conn) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
FTSpellCheckWithArgs - Checks a query string for spelling errors with additional options. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Conn) FTSynDump ¶
func (c Conn) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
FTSynDump - Dumps the contents of a synonym group. The 'index' parameter specifies the index to dump. For more information, please refer to the Redis documentation: [FT.SYNDUMP]: (https://redis.io/commands/ft.syndump/)
func (Conn) FTSynUpdate ¶
func (c Conn) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
FTSynUpdate - Creates or updates a synonym group with additional terms. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Conn) FTSynUpdateWithArgs ¶
func (c Conn) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd
FTSynUpdateWithArgs - Creates or updates a synonym group with additional terms and options. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, the 'options' parameter specifies additional options for the update, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Conn) FTTagVals ¶
func (c Conn) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
FTTagVals - Returns all distinct values indexed in a tag field. The 'index' parameter specifies the index to check, and the 'field' parameter specifies the tag field to retrieve values from. For more information, please refer to the Redis documentation: [FT.TAGVALS]: (https://redis.io/commands/ft.tagvals/)
func (Conn) FT_List ¶
func (c Conn) FT_List(ctx context.Context) *StringSliceCmd
FT_List - Lists all the existing indexes in the database. For more information, please refer to the Redis documentation: [FT._LIST]: (https://redis.io/commands/ft._list/)
func (Conn) FlushAllAsync ¶
func (Conn) FlushDBAsync ¶
func (Conn) FunctionDelete ¶
func (Conn) FunctionDump ¶
func (Conn) FunctionFlush ¶
func (Conn) FunctionFlushAsync ¶
func (Conn) FunctionKill ¶
func (Conn) FunctionList ¶
func (c Conn) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
func (Conn) FunctionLoadReplace ¶
func (Conn) FunctionRestore ¶
func (Conn) FunctionStats ¶
func (c Conn) FunctionStats(ctx context.Context) *FunctionStatsCmd
func (Conn) GeoAdd ¶
func (c Conn) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
func (Conn) GeoHash ¶
func (c Conn) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
func (Conn) GeoRadius ¶
func (c Conn) GeoRadius( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
func (Conn) GeoRadiusByMember ¶
func (c Conn) GeoRadiusByMember( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
func (Conn) GeoRadiusByMemberStore ¶
func (c Conn) GeoRadiusByMemberStore( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
func (Conn) GeoRadiusStore ¶
func (c Conn) GeoRadiusStore( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
func (Conn) GeoSearch ¶
func (c Conn) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
func (Conn) GeoSearchLocation ¶
func (c Conn) GeoSearchLocation( ctx context.Context, key string, q *GeoSearchLocationQuery, ) *GeoSearchLocationCmd
func (Conn) GeoSearchStore ¶
func (c Conn) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
func (Conn) GetEx ¶
GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0.
func (Conn) HExpire ¶
func (c Conn) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Conn) HExpireAt ¶
func (c Conn) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds. Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields. The command sets absolute expiration times based on the UNIX timestamp provided. For more information - https://redis.io/commands/hexpireat/
func (Conn) HExpireAtWithArgs ¶
func (c Conn) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Conn) HExpireTime ¶
func (c Conn) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds. Requires a key and the fields themselves to fetch their expiration timestamps. This command returns the expiration times for each field or error/status codes for each field as specified. For more information - https://redis.io/commands/hexpiretime/
func (Conn) HExpireWithArgs ¶
func (c Conn) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Conn) HIncrByFloat ¶
func (Conn) HMGet ¶
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.
func (Conn) HPExpire ¶
func (c Conn) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HPExpire - Sets the expiration time for specified fields in a hash in milliseconds. Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields. The command modifies the standard time.Duration to milliseconds for the Redis command. For more information - https://redis.io/commands/hpexpire/
func (Conn) HPExpireAt ¶
func (c Conn) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds. Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds. For more information - https://redis.io/commands/hpexpireat/
func (Conn) HPExpireAtWithArgs ¶
func (c Conn) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Conn) HPExpireTime ¶
func (c Conn) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds. Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters. Provides the expiration timestamp for each field in milliseconds. For more information - https://redis.io/commands/hexpiretime/
func (Conn) HPExpireWithArgs ¶
func (c Conn) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Conn) HPTTL ¶
func (c Conn) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds. Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields. This command provides the TTL in milliseconds for each field or returns error/status codes as needed. For more information - https://redis.io/commands/hpttl/
func (Conn) HPersist ¶
func (c Conn) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPersist - Removes the expiration time from specified fields in a hash. Accepts a key and the fields themselves. This command ensures that each field specified will have its expiration removed if present. For more information - https://redis.io/commands/hpersist/
func (Conn) HRandField ¶
func (c Conn) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
func (Conn) HRandFieldWithValues ¶
func (c Conn) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
func (Conn) HScanNoValues ¶
func (Conn) HSet ¶
HSet accepts values in following formats:
HSet("myhash", "key1", "value1", "key2", "value2")
HSet("myhash", []string{"key1", "value1", "key2", "value2"})
HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` }
HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface.
Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute.
func (Conn) HTTL ¶
func (c Conn) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds. Requires a key and the fields themselves. It returns the TTL for each specified field. This command fetches the TTL in seconds for each field or returns error/status codes as appropriate. For more information - https://redis.io/commands/httl/
func (Conn) Hello ¶
func (c Conn) Hello(ctx context.Context, ver int, username, password, clientName string, ) *MapStringInterfaceCmd
Hello Set the resp protocol used.
func (Conn) IncrByFloat ¶
func (Conn) JSONArrAppend ¶
func (c Conn) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
JSONArrAppend adds the provided JSON values to the end of the array at the given path. For more information, see https://redis.io/commands/json.arrappend
func (Conn) JSONArrIndex ¶
func (c Conn) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
JSONArrIndex searches for the first occurrence of the provided JSON value in the array at the given path. For more information, see https://redis.io/commands/json.arrindex
func (Conn) JSONArrIndexWithArgs ¶
func (c Conn) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, value ...interface{}) *IntSliceCmd
JSONArrIndexWithArgs searches for the first occurrence of a JSON value in an array while allowing the start and stop options to be provided. For more information, see https://redis.io/commands/json.arrindex
func (Conn) JSONArrInsert ¶
func (c Conn) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
JSONArrInsert inserts the JSON values into the array at the specified path before the index (shifts to the right). For more information, see https://redis.io/commands/json.arrinsert
func (Conn) JSONArrLen ¶
func (c Conn) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
JSONArrLen reports the length of the JSON array at the specified path in the given key. For more information, see https://redis.io/commands/json.arrlen
func (Conn) JSONArrPop ¶
func (c Conn) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
JSONArrPop removes and returns an element from the specified index in the array. For more information, see https://redis.io/commands/json.arrpop
func (Conn) JSONArrTrim ¶
func (c Conn) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
JSONArrTrim trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Conn) JSONArrTrimWithArgs ¶
func (c Conn) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
JSONArrTrimWithArgs trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Conn) JSONClear ¶
JSONClear clears container values (arrays/objects) and sets numeric values to 0. For more information, see https://redis.io/commands/json.clear
func (Conn) JSONDebugMemory ¶
JSONDebugMemory reports a value's memory usage in bytes (unimplemented) For more information, see https://redis.io/commands/json.debug-memory
func (Conn) JSONDel ¶
JSONDel deletes a value. For more information, see https://redis.io/commands/json.del
func (Conn) JSONForget ¶
JSONForget deletes a value. For more information, see https://redis.io/commands/json.forget
func (Conn) JSONGet ¶
JSONGet returns the value at path in JSON serialized form. JSON.GET returns an array of strings. This function parses out the wrapping array but leaves the internal strings unprocessed by default (see Val()) For more information - https://redis.io/commands/json.get/
func (Conn) JSONGetWithArgs ¶
func (c Conn) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
JSONGetWithArgs - Retrieves the value of a key from a JSON document. This function also allows for specifying additional options such as: Indention, NewLine and Space For more information - https://redis.io/commands/json.get/
func (Conn) JSONMGet ¶
func (c Conn) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
JSONMGet returns the values at the specified path from multiple key arguments. Note - the arguments are reversed when compared with `JSON.MGET` as we want to follow the pattern of having the last argument be variable. For more information, see https://redis.io/commands/json.mget
func (Conn) JSONMSetArgs ¶
func (c Conn) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
JSONMSetArgs sets or updates one or more JSON values according to the specified key-path-value triplets. For more information, see https://redis.io/commands/json.mset
func (Conn) JSONMerge ¶
JSONMerge merges a given JSON value into matching paths. For more information, see https://redis.io/commands/json.merge
func (Conn) JSONNumIncrBy ¶
JSONNumIncrBy increments the number value stored at the specified path by the provided number. For more information, see https://redis.io/docs/latest/commands/json.numincrby/
func (Conn) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by the specified path. For more information, see https://redis.io/commands/json.objkeys
func (Conn) JSONObjLen ¶
func (c Conn) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONObjLen reports the number of keys in the JSON object at the specified path in the given key. For more information, see https://redis.io/commands/json.objlen
func (Conn) JSONSet ¶
JSONSet sets the JSON value at the given path in the given key. The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or a []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Conn) JSONSetMode ¶
func (c Conn) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
JSONSetMode sets the JSON value at the given path in the given key and allows the mode to be set (the mode value must be "XX" or "NX"). The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Conn) JSONStrAppend ¶
func (c Conn) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
JSONStrAppend appends the JSON-string values to the string at the specified path. For more information, see https://redis.io/commands/json.strappend
func (Conn) JSONStrLen ¶
func (c Conn) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONStrLen reports the length of the JSON String at the specified path in the given key. For more information, see https://redis.io/commands/json.strlen
func (Conn) JSONToggle ¶
func (c Conn) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONToggle toggles a Boolean value stored at the specified path. For more information, see https://redis.io/commands/json.toggle
func (Conn) JSONType ¶
func (c Conn) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
JSONType reports the type of JSON value at the specified path. For more information, see https://redis.io/commands/json.type
func (Conn) LInsertAfter ¶
func (Conn) LInsertBefore ¶
func (Conn) LMPop ¶
func (c Conn) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2")
func (Conn) LPopCount ¶
func (c Conn) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Conn) LRange ¶
func (c Conn) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Conn) MSet ¶
MSet is like Set but accepts multiple values:
- MSet("key1", "value1", "key2", "value2")
- MSet([]string{"key1", "value1", "key2", "value2"})
- MSet(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSet(struct), For struct types, see HSet description.
func (Conn) MSetNX ¶
MSetNX is like SetNX but accepts multiple values:
- MSetNX("key1", "value1", "key2", "value2")
- MSetNX([]string{"key1", "value1", "key2", "value2"})
- MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSetNX(struct), For struct types, see HSet description.
func (Conn) MemoryUsage ¶
func (Conn) ModuleLoadex ¶
func (c Conn) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
ModuleLoadex Redis `MODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS args [args ...]]` command.
func (Conn) Monitor ¶
func (c Conn) Monitor(ctx context.Context, ch chan string) *MonitorCmd
Monitor - represents a Redis MONITOR command, allowing the user to capture and process all commands sent to a Redis server. This mimics the behavior of MONITOR in the redis-cli.
Notes: - Using MONITOR blocks the connection to the server for itself. It needs a dedicated connection - The user should create a channel of type string - This runs concurrently in the background. Trigger via the Start and Stop functions See further: Redis MONITOR command: https://redis.io/commands/monitor
func (Conn) ObjectEncoding ¶
func (Conn) ObjectIdleTime ¶
func (c Conn) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
func (Conn) PExpireTime ¶
func (c Conn) PExpireTime(ctx context.Context, key string) *DurationCmd
func (Conn) PubSubChannels ¶
func (c Conn) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Conn) PubSubNumPat ¶
func (Conn) PubSubNumSub ¶
func (c Conn) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Conn) PubSubShardChannels ¶
func (c Conn) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Conn) PubSubShardNumSub ¶
func (c Conn) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Conn) RPopCount ¶
func (c Conn) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Conn) RestoreReplace ¶
func (Conn) SDiffStore ¶
func (Conn) SInterCard ¶
func (Conn) SInterStore ¶
func (Conn) SMIsMember ¶
func (c Conn) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
func (Conn) SMembers ¶
func (c Conn) SMembers(ctx context.Context, key string) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
func (Conn) SMembersMap ¶
func (c Conn) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
func (Conn) SPopN ¶
func (c Conn) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
SPopN Redis `SPOP key count` command.
func (Conn) SRandMember ¶
SRandMember Redis `SRANDMEMBER key` command.
func (Conn) SRandMemberN ¶
func (c Conn) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
SRandMemberN Redis `SRANDMEMBER key count` command.
func (Conn) SUnionStore ¶
func (Conn) ScriptExists ¶
func (c Conn) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
func (Conn) ScriptFlush ¶
func (Conn) ScriptKill ¶
func (Conn) Set ¶
func (c Conn) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Conn) SetArgs ¶
SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options.
func (Conn) SetEx ¶
func (c Conn) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
func (Conn) SetNX ¶
func (c Conn) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetNX Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Conn) SetXX ¶
func (c Conn) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetXX Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Conn) ShutdownNoSave ¶
func (Conn) ShutdownSave ¶
func (Conn) SlowLogGet ¶
func (c Conn) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
func (Conn) SortInterfaces ¶
func (Conn) SortRO ¶
func (c Conn) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (Conn) TDigestAdd ¶
TDigestAdd adds one or more elements to a t-Digest data structure. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.add/
func (Conn) TDigestByRank ¶
func (c Conn) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRank returns an array of values from a t-Digest data structure based on their rank. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrank/
func (Conn) TDigestByRevRank ¶
func (c Conn) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRevRank returns an array of values from a t-Digest data structure based on their reverse rank. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrevrank/
func (Conn) TDigestCDF ¶
func (c Conn) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestCDF returns an array of cumulative distribution function (CDF) values for one or more elements in a t-Digest data structure. The CDF value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the CDF values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.cdf/
func (Conn) TDigestCreate ¶
TDigestCreate creates an empty t-Digest data structure with default parameters. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Conn) TDigestCreateWithCompression ¶
func (c Conn) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
TDigestCreateWithCompression creates an empty t-Digest data structure with a specified compression parameter. The compression parameter controls the accuracy and memory usage of the t-Digest. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Conn) TDigestInfo ¶
func (c Conn) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
TDigestInfo returns information about a t-Digest data structure. For more information - https://redis.io/commands/tdigest.info/
func (Conn) TDigestMax ¶
TDigestMax returns the maximum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.max/
func (Conn) TDigestMerge ¶
func (c Conn) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, sourceKeys ...string) *StatusCmd
TDigestMerge merges multiple t-Digest data structures into a single t-Digest. This function also allows for specifying additional options such as compression and override behavior. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.merge/
func (Conn) TDigestMin ¶
TDigestMin returns the minimum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.min/
func (Conn) TDigestQuantile ¶
func (c Conn) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestQuantile returns an array of quantile values for one or more elements in a t-Digest data structure. The quantile value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the quantile values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.quantile/
func (Conn) TDigestRank ¶
func (c Conn) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRank returns an array of rank values for one or more elements in a t-Digest data structure. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of integers representing the rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.rank/
func (Conn) TDigestReset ¶
TDigestReset resets a t-Digest data structure to its initial state. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.reset/
func (Conn) TDigestRevRank ¶
func (c Conn) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRevRank returns an array of reverse rank values for one or more elements in a t-Digest data structure. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of integers representing the reverse rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.revrank/
func (Conn) TDigestTrimmedMean ¶
func (c Conn) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
TDigestTrimmedMean returns the trimmed mean value from a t-Digest data structure. The trimmed mean is calculated by removing a specified fraction of the highest and lowest values from the t-Digest and then calculating the mean of the remaining values. Returns a float representing the trimmed mean value or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.trimmed_mean/
func (Conn) TFCall ¶
TFCall - invoke a function. For more information - https://redis.io/commands/tfcall/
func (Conn) TFCallASYNC ¶
TFCallASYNC - invoke an asynchronous JavaScript function (coroutine). For more information - https://redis.io/commands/TFCallASYNC/
func (Conn) TFCallASYNCArgs ¶
func (Conn) TFCallArgs ¶
func (Conn) TFunctionDelete ¶
TFunctionDelete - delete a JavaScript library from Redis. For more information - https://redis.io/commands/tfunction-delete/
func (Conn) TFunctionList ¶
func (c Conn) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
TFunctionList - list the functions with additional information about each function. For more information - https://redis.io/commands/tfunction-list/
func (Conn) TFunctionListArgs ¶
func (c Conn) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
func (Conn) TFunctionLoad ¶
TFunctionLoad - load a new JavaScript library into Redis. For more information - https://redis.io/commands/tfunction-load/
func (Conn) TFunctionLoadArgs ¶
func (c Conn) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
func (Conn) TSAdd ¶
TSAdd - Adds one or more observations to a t-digest sketch. For more information - https://redis.io/commands/ts.add/
func (Conn) TSAddWithArgs ¶
func (c Conn) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, options *TSOptions) *IntCmd
TSAddWithArgs - Adds one or more observations to a t-digest sketch. This function also allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.add/
func (Conn) TSAlter ¶
func (c Conn) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
TSAlter - Alters an existing time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize and DuplicatePolicy. For more information - https://redis.io/commands/ts.alter/
func (Conn) TSCreate ¶
TSCreate - Creates a new time-series key. For more information - https://redis.io/commands/ts.create/
func (Conn) TSCreateRule ¶
func (c Conn) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int) *StatusCmd
TSCreateRule - Creates a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.createrule/
func (Conn) TSCreateRuleWithArgs ¶
func (c Conn) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd
TSCreateRuleWithArgs - Creates a compaction rule from sourceKey to destKey with additional option. This function allows for specifying additional option such as: alignTimestamp. For more information - https://redis.io/commands/ts.createrule/
func (Conn) TSCreateWithArgs ¶
TSCreateWithArgs - Creates a new time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.create/
func (Conn) TSDecrBy ¶
TSDecrBy - Decrements the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.decrby/
func (Conn) TSDecrByWithArgs ¶
func (c Conn) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSDecrByWithArgs - Decrements the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.decrby/
func (Conn) TSDel ¶
TSDel - Deletes a range of samples from a time-series key. For more information - https://redis.io/commands/ts.del/
func (Conn) TSDeleteRule ¶
TSDeleteRule - Deletes a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.deleterule/
func (Conn) TSGet ¶
func (c Conn) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
TSGet - Gets the last sample of a time-series key. For more information - https://redis.io/commands/ts.get/
func (Conn) TSGetWithArgs ¶
func (c Conn) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
TSGetWithArgs - Gets the last sample of a time-series key with additional option. This function allows for specifying additional option such as: Latest. For more information - https://redis.io/commands/ts.get/
func (Conn) TSIncrBy ¶
TSIncrBy - Increments the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.incrby/
func (Conn) TSIncrByWithArgs ¶
func (c Conn) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSIncrByWithArgs - Increments the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.incrby/
func (Conn) TSInfo ¶
func (c Conn) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
TSInfo - Returns information about a time-series key. For more information - https://redis.io/commands/ts.info/
func (Conn) TSInfoWithArgs ¶
func (c Conn) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
TSInfoWithArgs - Returns information about a time-series key with additional option. This function allows for specifying additional option such as: Debug. For more information - https://redis.io/commands/ts.info/
func (Conn) TSMAdd ¶
func (c Conn) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
TSMAdd - Adds multiple samples to multiple time-series keys. It accepts a slice of 'ktv' slices, each containing exactly three elements: key, timestamp, and value. This struct must be provided for this command to work. For more information - https://redis.io/commands/ts.madd/
func (Conn) TSMGet ¶
func (c Conn) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
TSMGet - Returns the last sample of multiple time-series keys. For more information - https://redis.io/commands/ts.mget/
func (Conn) TSMGetWithArgs ¶
func (c Conn) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
TSMGetWithArgs - Returns the last sample of multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, WithLabels and SelectedLabels. For more information - https://redis.io/commands/ts.mget/
func (Conn) TSMRange ¶
func (c Conn) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRange - Returns a range of samples from multiple time-series keys. For more information - https://redis.io/commands/ts.mrange/
func (Conn) TSMRangeWithArgs ¶
func (c Conn) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRangeOptions) *MapStringSliceInterfaceCmd
TSMRangeWithArgs - Returns a range of samples from multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrange/
func (Conn) TSMRevRange ¶
func (c Conn) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRevRange - Returns a range of samples from multiple time-series keys in reverse order. For more information - https://redis.io/commands/ts.mrevrange/
func (Conn) TSMRevRangeWithArgs ¶
func (c Conn) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRevRangeOptions) *MapStringSliceInterfaceCmd
TSMRevRangeWithArgs - Returns a range of samples from multiple time-series keys in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrevrange/
func (Conn) TSQueryIndex ¶
func (c Conn) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
TSQueryIndex - Returns all the keys matching the filter expression. For more information - https://redis.io/commands/ts.queryindex/
func (Conn) TSRange ¶
func (c Conn) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRange - Returns a range of samples from a time-series key. For more information - https://redis.io/commands/ts.range/
func (Conn) TSRangeWithArgs ¶
func (c Conn) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRangeOptions) *TSTimestampValueSliceCmd
TSRangeWithArgs - Returns a range of samples from a time-series key with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.range/
func (Conn) TSRevRange ¶
func (c Conn) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRevRange - Returns a range of samples from a time-series key in reverse order. For more information - https://redis.io/commands/ts.revrange/
func (Conn) TSRevRangeWithArgs ¶
func (c Conn) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRevRangeOptions) *TSTimestampValueSliceCmd
TSRevRangeWithArgs - Returns a range of samples from a time-series key in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.revrange/
func (Conn) TopKAdd ¶
func (c Conn) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKAdd adds one or more elements to a Top-K filter. Returns an array of strings representing the items that were removed from the filter, if any. For more information - https://redis.io/commands/topk.add/
func (Conn) TopKCount ¶
func (c Conn) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
TopKCount returns an estimate of the number of times an item may be in a Top-K filter. For more information - https://redis.io/commands/topk.count/
func (Conn) TopKIncrBy ¶
func (c Conn) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKIncrBy increases the count of one or more items in a Top-K filter. For more information - https://redis.io/commands/topk.incrby/
func (Conn) TopKInfo ¶
func (c Conn) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
TopKInfo returns information about a Top-K filter. For more information - https://redis.io/commands/topk.info/
func (Conn) TopKList ¶
func (c Conn) TopKList(ctx context.Context, key string) *StringSliceCmd
TopKList returns all items in Top-K list. For more information - https://redis.io/commands/topk.list/
func (Conn) TopKListWithCount ¶
func (c Conn) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
TopKListWithCount returns all items in Top-K list with their respective count. For more information - https://redis.io/commands/topk.list/
func (Conn) TopKQuery ¶
func (c Conn) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
TopKQuery check if multiple elements exist in a Top-K filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/topk.query/
func (Conn) TopKReserve ¶
TopKReserve creates an empty Top-K filter with the specified number of top items to keep. For more information - https://redis.io/commands/topk.reserve/
func (Conn) TopKReserveWithOptions ¶
func (c Conn) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
TopKReserveWithOptions creates an empty Top-K filter with the specified number of top items to keep and additional options. This function allows for specifying additional options such as width, depth and decay. For more information - https://redis.io/commands/topk.reserve/
func (*Conn) TxPipeline ¶
TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
func (*Conn) TxPipelined ¶
func (Conn) XAutoClaim ¶
func (c Conn) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
func (Conn) XAutoClaimJustID ¶
func (c Conn) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
func (Conn) XClaim ¶
func (c Conn) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
func (Conn) XClaimJustID ¶
func (c Conn) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
func (Conn) XGroupCreate ¶
func (Conn) XGroupCreateConsumer ¶
func (Conn) XGroupCreateMkStream ¶
func (Conn) XGroupDelConsumer ¶
func (Conn) XGroupDestroy ¶
func (Conn) XGroupSetID ¶
func (Conn) XInfoConsumers ¶
func (c Conn) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
func (Conn) XInfoGroups ¶
func (c Conn) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
func (Conn) XInfoStream ¶
func (c Conn) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
func (Conn) XInfoStreamFull ¶
func (c Conn) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0.
func (Conn) XPending ¶
func (c Conn) XPending(ctx context.Context, stream, group string) *XPendingCmd
func (Conn) XPendingExt ¶
func (c Conn) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
func (Conn) XRange ¶
func (c Conn) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Conn) XRangeN ¶
func (c Conn) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Conn) XReadGroup ¶
func (c Conn) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
func (Conn) XReadStreams ¶
func (c Conn) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
func (Conn) XRevRange ¶
func (c Conn) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Conn) XRevRangeN ¶
func (c Conn) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Conn) XTrimMaxLen ¶
XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen
func (Conn) XTrimMaxLenApprox ¶
func (Conn) XTrimMinID ¶
func (Conn) XTrimMinIDApprox ¶
func (Conn) ZAddArgsIncr ¶
func (Conn) ZDiff ¶
func (c Conn) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
func (Conn) ZDiffStore ¶
ZDiffStore redis-server version >=6.2.0.
func (Conn) ZDiffWithScores ¶
ZDiffWithScores redis-server version >= 6.2.0.
func (Conn) ZInterCard ¶
func (Conn) ZInterStore ¶
func (Conn) ZInterWithScores ¶
func (Conn) ZMPop ¶
func (c Conn) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2")
func (Conn) ZMScore ¶
func (c Conn) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
func (Conn) ZRandMember ¶
func (c Conn) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
func (Conn) ZRandMemberWithScores ¶
ZRandMemberWithScores redis-server version >= 6.2.0.
func (Conn) ZRange ¶
func (c Conn) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Conn) ZRangeArgs ¶
func (c Conn) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
func (Conn) ZRangeArgsWithScores ¶
func (c Conn) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
func (Conn) ZRangeByLex ¶
func (c Conn) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Conn) ZRangeByScore ¶
func (c Conn) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Conn) ZRangeByScoreWithScores ¶
func (Conn) ZRangeStore ¶
func (c Conn) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
func (Conn) ZRangeWithScores ¶
func (Conn) ZRankWithScore ¶
func (c Conn) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
ZRankWithScore according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Conn) ZRemRangeByLex ¶
func (Conn) ZRemRangeByRank ¶
func (Conn) ZRemRangeByScore ¶
func (Conn) ZRevRange ¶
func (c Conn) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Conn) ZRevRangeByLex ¶
func (c Conn) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Conn) ZRevRangeByScore ¶
func (c Conn) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Conn) ZRevRangeByScoreWithScores ¶
func (Conn) ZRevRangeWithScores ¶
ZRevRangeWithScores according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Conn) ZRevRankWithScore ¶
func (c Conn) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
func (Conn) ZUnionStore ¶
type ConsistentHash ¶
type CursorStats ¶
type DurationCmd ¶
type DurationCmd struct {
// contains filtered or unexported fields
}
func NewDurationCmd ¶
func NewDurationCmd(ctx context.Context, precision time.Duration, args ...interface{}) *DurationCmd
func NewDurationResult ¶
func NewDurationResult(val time.Duration, err error) *DurationCmd
NewDurationResult returns a DurationCmd initialised with val and err for testing.
func (*DurationCmd) SetFirstKeyPos ¶
func (cmd *DurationCmd) SetFirstKeyPos(keyPos int8)
func (*DurationCmd) SetVal ¶
func (cmd *DurationCmd) SetVal(val time.Duration)
func (*DurationCmd) String ¶
func (cmd *DurationCmd) String() string
func (*DurationCmd) Val ¶
func (cmd *DurationCmd) Val() time.Duration
type Error ¶
type Error interface { error // RedisError is a no-op function but // serves to distinguish types that are Redis // errors from ordinary errors: a type is a // Redis error if it has a RedisError method. RedisError() }
type FTAggregateApply ¶
type FTAggregateGroupBy ¶
type FTAggregateGroupBy struct { Fields []interface{} Reduce []FTAggregateReducer }
type FTAggregateLoad ¶
type FTAggregateOptions ¶
type FTAggregateOptions struct { Verbatim bool LoadAll bool Load []FTAggregateLoad Timeout int GroupBy []FTAggregateGroupBy SortBy []FTAggregateSortBy SortByMax int Apply []FTAggregateApply LimitOffset int Limit int Filter string WithCursor bool WithCursorOptions *FTAggregateWithCursor Params map[string]interface{} DialectVersion int }
type FTAggregateReducer ¶
type FTAggregateReducer struct { Reducer SearchAggregator Args []interface{} As string }
Each AggregateReducer have different args. Please follow https://redis.io/docs/interact/search-and-query/search/aggregations/#supported-groupby-reducers for more information.
type FTAggregateResult ¶
type FTAggregateResult struct { Total int Rows []AggregateRow }
func ProcessAggregateResult ¶
func ProcessAggregateResult(data []interface{}) (*FTAggregateResult, error)
type FTAggregateSortBy ¶
type FTAggregateWithCursor ¶
type FTAttribute ¶
type FTCreateOptions ¶
type FTCreateOptions struct { OnHash bool OnJSON bool Prefix []interface{} Filter string DefaultLanguage string LanguageField string Score float64 ScoreField string PayloadField string MaxTextFields int NoOffsets bool Temporary int NoHL bool NoFields bool NoFreqs bool StopWords []interface{} SkipInitialScan bool }
type FTDropIndexOptions ¶
type FTDropIndexOptions struct {
DeleteDocs bool
}
type FTExplainOptions ¶
type FTExplainOptions struct {
Dialect string
}
type FTFlatOptions ¶
type FTHNSWOptions ¶
type FTInfoCmd ¶
type FTInfoCmd struct {
// contains filtered or unexported fields
}
func (*FTInfoCmd) Result ¶
func (cmd *FTInfoCmd) Result() (FTInfoResult, error)
func (*FTInfoCmd) SetFirstKeyPos ¶
func (cmd *FTInfoCmd) SetFirstKeyPos(keyPos int8)
func (*FTInfoCmd) SetVal ¶
func (cmd *FTInfoCmd) SetVal(val FTInfoResult)
func (*FTInfoCmd) Val ¶
func (cmd *FTInfoCmd) Val() FTInfoResult
type FTInfoResult ¶
type FTInfoResult struct { IndexErrors IndexErrors Attributes []FTAttribute BytesPerRecordAvg string Cleaning int CursorStats CursorStats DialectStats map[string]int DocTableSizeMB float64 FieldStatistics []FieldStatistic GCStats GCStats GeoshapesSzMB float64 HashIndexingFailures int IndexDefinition IndexDefinition IndexName string IndexOptions []string Indexing int InvertedSzMB float64 KeyTableSizeMB float64 MaxDocID int NumDocs int NumRecords int NumTerms int NumberOfUses int OffsetBitsPerRecordAvg string OffsetVectorsSzMB float64 OffsetsPerTermAvg string PercentIndexed float64 RecordsPerDocAvg string SortableValuesSizeMB float64 TagOverheadSzMB float64 TextOverheadSzMB float64 TotalIndexMemorySzMB float64 TotalIndexingTime int TotalInvertedIndexBlocks int VectorIndexSzMB float64 }
type FTSearchCmd ¶
type FTSearchCmd struct {
// contains filtered or unexported fields
}
func (*FTSearchCmd) RawResult ¶
func (cmd *FTSearchCmd) RawResult() (interface{}, error)
func (*FTSearchCmd) RawVal ¶
func (cmd *FTSearchCmd) RawVal() interface{}
func (*FTSearchCmd) Result ¶
func (cmd *FTSearchCmd) Result() (FTSearchResult, error)
func (*FTSearchCmd) SetFirstKeyPos ¶
func (cmd *FTSearchCmd) SetFirstKeyPos(keyPos int8)
func (*FTSearchCmd) SetVal ¶
func (cmd *FTSearchCmd) SetVal(val FTSearchResult)
func (*FTSearchCmd) String ¶
func (cmd *FTSearchCmd) String() string
func (*FTSearchCmd) Val ¶
func (cmd *FTSearchCmd) Val() FTSearchResult
type FTSearchFilter ¶
type FTSearchFilter struct { FieldName interface{} Min interface{} Max interface{} }
type FTSearchGeoFilter ¶
type FTSearchOptions ¶
type FTSearchOptions struct { NoContent bool Verbatim bool NoStopWords bool WithScores bool WithPayloads bool WithSortKeys bool Filters []FTSearchFilter GeoFilter []FTSearchGeoFilter InKeys []interface{} InFields []interface{} Return []FTSearchReturn Slop int Timeout int InOrder bool Language string Expander string Scorer string ExplainScore bool Payload string SortBy []FTSearchSortBy SortByWithCount bool LimitOffset int Limit int Params map[string]interface{} DialectVersion int }
type FTSearchResult ¶
type FTSearchReturn ¶
type FTSearchSortBy ¶
type FTSpellCheckCmd ¶
type FTSpellCheckCmd struct {
// contains filtered or unexported fields
}
func (*FTSpellCheckCmd) RawResult ¶
func (cmd *FTSpellCheckCmd) RawResult() (interface{}, error)
func (*FTSpellCheckCmd) RawVal ¶
func (cmd *FTSpellCheckCmd) RawVal() interface{}
func (*FTSpellCheckCmd) Result ¶
func (cmd *FTSpellCheckCmd) Result() ([]SpellCheckResult, error)
func (*FTSpellCheckCmd) SetFirstKeyPos ¶
func (cmd *FTSpellCheckCmd) SetFirstKeyPos(keyPos int8)
func (*FTSpellCheckCmd) SetVal ¶
func (cmd *FTSpellCheckCmd) SetVal(val []SpellCheckResult)
func (*FTSpellCheckCmd) String ¶
func (cmd *FTSpellCheckCmd) String() string
func (*FTSpellCheckCmd) Val ¶
func (cmd *FTSpellCheckCmd) Val() []SpellCheckResult
type FTSpellCheckOptions ¶
type FTSpellCheckOptions struct { Distance int Terms *FTSpellCheckTerms Dialect int }
type FTSpellCheckTerms ¶
type FTSynDumpCmd ¶
type FTSynDumpCmd struct {
// contains filtered or unexported fields
}
func NewFTSynDumpCmd ¶
func NewFTSynDumpCmd(ctx context.Context, args ...interface{}) *FTSynDumpCmd
func (*FTSynDumpCmd) RawResult ¶
func (cmd *FTSynDumpCmd) RawResult() (interface{}, error)
func (*FTSynDumpCmd) RawVal ¶
func (cmd *FTSynDumpCmd) RawVal() interface{}
func (*FTSynDumpCmd) Result ¶
func (cmd *FTSynDumpCmd) Result() ([]FTSynDumpResult, error)
func (*FTSynDumpCmd) SetFirstKeyPos ¶
func (cmd *FTSynDumpCmd) SetFirstKeyPos(keyPos int8)
func (*FTSynDumpCmd) SetVal ¶
func (cmd *FTSynDumpCmd) SetVal(val []FTSynDumpResult)
func (*FTSynDumpCmd) String ¶
func (cmd *FTSynDumpCmd) String() string
func (*FTSynDumpCmd) Val ¶
func (cmd *FTSynDumpCmd) Val() []FTSynDumpResult
type FTSynDumpResult ¶
type FTSynUpdateOptions ¶
type FTSynUpdateOptions struct {
SkipInitialScan bool
}
type FTVectorArgs ¶
type FTVectorArgs struct { FlatOptions *FTFlatOptions HNSWOptions *FTHNSWOptions }
type FailoverOptions ¶
type FailoverOptions struct { // The master name. MasterName string // A seed list of host:port addresses of sentinel nodes. SentinelAddrs []string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. ClientName string // If specified with SentinelPassword, enables ACL-based authentication (via // AUTH <user> <pass>). SentinelUsername string // Sentinel password from "requirepass <password>" (if enabled) in Sentinel // configuration, or, if SentinelUsername is also supplied, used for ACL-based // authentication. SentinelPassword string // Allows routing read-only commands to the closest master or replica node. // This option only works with NewFailoverClusterClient. RouteByLatency bool // Allows routing read-only commands to the random master or replica node. // This option only works with NewFailoverClusterClient. RouteRandomly bool // Route all commands to replica read-only nodes. ReplicaOnly bool // Use replicas disconnected with master when cannot get connected replicas // Now, this option only works in RandomReplicaAddr function. UseDisconnectedReplicas bool Dialer func(ctx context.Context, network, addr string) (net.Conn, error) OnConnect func(ctx context.Context, cn *Conn) error Protocol int Username string Password string DB int MaxRetries int MinRetryBackoff time.Duration MaxRetryBackoff time.Duration DialTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration ContextTimeoutEnabled bool PoolFIFO bool PoolSize int PoolTimeout time.Duration MinIdleConns int MaxIdleConns int MaxActiveConns int ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration TLSConfig *tls.Config DisableIndentity bool IdentitySuffix string UnstableResp3 bool }
FailoverOptions are used to configure a failover client and should be passed to NewFailoverClient.
type FieldSchema ¶
type FieldSchema struct { FieldName string As string FieldType SearchFieldType Sortable bool UNF bool NoStem bool NoIndex bool PhoneticMatcher string Weight float64 Separator string CaseSensitive bool WithSuffixtrie bool VectorArgs *FTVectorArgs GeoShapeFieldType string IndexEmpty bool IndexMissing bool }
type FieldStatistic ¶
type FieldStatistic struct { Identifier string Attribute string IndexErrors IndexErrors }
type FloatCmd ¶
type FloatCmd struct {
// contains filtered or unexported fields
}
func NewFloatCmd ¶
func NewFloatResult ¶
NewFloatResult returns a FloatCmd initialised with val and err for testing.
func (*FloatCmd) SetFirstKeyPos ¶
func (cmd *FloatCmd) SetFirstKeyPos(keyPos int8)
type FloatSliceCmd ¶
type FloatSliceCmd struct {
// contains filtered or unexported fields
}
func NewFloatSliceCmd ¶
func NewFloatSliceCmd(ctx context.Context, args ...interface{}) *FloatSliceCmd
func (*FloatSliceCmd) Result ¶
func (cmd *FloatSliceCmd) Result() ([]float64, error)
func (*FloatSliceCmd) SetFirstKeyPos ¶
func (cmd *FloatSliceCmd) SetFirstKeyPos(keyPos int8)
func (*FloatSliceCmd) SetVal ¶
func (cmd *FloatSliceCmd) SetVal(val []float64)
func (*FloatSliceCmd) String ¶
func (cmd *FloatSliceCmd) String() string
func (*FloatSliceCmd) Val ¶
func (cmd *FloatSliceCmd) Val() []float64
type FunctionListCmd ¶
type FunctionListCmd struct {
// contains filtered or unexported fields
}
func NewFunctionListCmd ¶
func NewFunctionListCmd(ctx context.Context, args ...interface{}) *FunctionListCmd
func (*FunctionListCmd) First ¶
func (cmd *FunctionListCmd) First() (*Library, error)
func (*FunctionListCmd) Result ¶
func (cmd *FunctionListCmd) Result() ([]Library, error)
func (*FunctionListCmd) SetFirstKeyPos ¶
func (cmd *FunctionListCmd) SetFirstKeyPos(keyPos int8)
func (*FunctionListCmd) SetVal ¶
func (cmd *FunctionListCmd) SetVal(val []Library)
func (*FunctionListCmd) String ¶
func (cmd *FunctionListCmd) String() string
func (*FunctionListCmd) Val ¶
func (cmd *FunctionListCmd) Val() []Library
type FunctionListQuery ¶
FunctionListQuery is used with FunctionList to query for Redis libraries
LibraryNamePattern - Use an empty string to get all libraries. - Use a glob-style pattern to match multiple libraries with a matching name - Use a library's full name to match a single library WithCode - If true, it will return the code of the library
type FunctionStats ¶
type FunctionStats struct { Engines []Engine // contains filtered or unexported fields }
FunctionStats contains information about the scripts currently executing on the server, and the available engines
- Engines: Statistics about the engine like number of functions and number of libraries
- RunningScript: The script currently running on the shard we're connecting to. For Redis Enterprise and Redis Cloud, this represents the function with the longest running time, across all the running functions, on all shards
- RunningScripts All scripts currently running in a Redis Enterprise clustered database. Only available on Redis Enterprise
func (*FunctionStats) AllRunningScripts ¶
func (fs *FunctionStats) AllRunningScripts() []RunningScript
AllRunningScripts returns all scripts currently running in a Redis Enterprise clustered database. Only available on Redis Enterprise
func (*FunctionStats) Running ¶
func (fs *FunctionStats) Running() bool
func (*FunctionStats) RunningScript ¶
func (fs *FunctionStats) RunningScript() (RunningScript, bool)
type FunctionStatsCmd ¶
type FunctionStatsCmd struct {
// contains filtered or unexported fields
}
func NewFunctionStatsCmd ¶
func NewFunctionStatsCmd(ctx context.Context, args ...interface{}) *FunctionStatsCmd
func (*FunctionStatsCmd) Result ¶
func (cmd *FunctionStatsCmd) Result() (FunctionStats, error)
func (*FunctionStatsCmd) SetFirstKeyPos ¶
func (cmd *FunctionStatsCmd) SetFirstKeyPos(keyPos int8)
func (*FunctionStatsCmd) SetVal ¶
func (cmd *FunctionStatsCmd) SetVal(val FunctionStats)
func (*FunctionStatsCmd) String ¶
func (cmd *FunctionStatsCmd) String() string
func (*FunctionStatsCmd) Val ¶
func (cmd *FunctionStatsCmd) Val() FunctionStats
type GearsCmdable ¶
type GearsCmdable interface { TFunctionLoad(ctx context.Context, lib string) *StatusCmd TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd TFunctionDelete(ctx context.Context, libName string) *StatusCmd TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd TFCall(ctx context.Context, libName string, funcName string, numKeys int) *Cmd TFCallArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd TFCallASYNCArgs(ctx context.Context, libName string, funcName string, numKeys int, options *TFCallOptions) *Cmd }
type GenericCmdable ¶
type GenericCmdable interface { Del(ctx context.Context, keys ...string) *IntCmd Dump(ctx context.Context, key string) *StringCmd Exists(ctx context.Context, keys ...string) *IntCmd Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd ExpireTime(ctx context.Context, key string) *DurationCmd ExpireNX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ExpireXX(ctx context.Context, key string, expiration time.Duration) *BoolCmd ExpireGT(ctx context.Context, key string, expiration time.Duration) *BoolCmd ExpireLT(ctx context.Context, key string, expiration time.Duration) *BoolCmd Keys(ctx context.Context, pattern string) *StringSliceCmd Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd Move(ctx context.Context, key string, db int) *BoolCmd ObjectFreq(ctx context.Context, key string) *IntCmd ObjectRefCount(ctx context.Context, key string) *IntCmd ObjectEncoding(ctx context.Context, key string) *StringCmd ObjectIdleTime(ctx context.Context, key string) *DurationCmd Persist(ctx context.Context, key string) *BoolCmd PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd PExpireTime(ctx context.Context, key string) *DurationCmd PTTL(ctx context.Context, key string) *DurationCmd RandomKey(ctx context.Context) *StringCmd Rename(ctx context.Context, key, newkey string) *StatusCmd RenameNX(ctx context.Context, key, newkey string) *BoolCmd Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd SortStore(ctx context.Context, key, store string, sort *Sort) *IntCmd SortInterfaces(ctx context.Context, key string, sort *Sort) *SliceCmd Touch(ctx context.Context, keys ...string) *IntCmd TTL(ctx context.Context, key string) *DurationCmd Type(ctx context.Context, key string) *StatusCmd Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *IntCmd Scan(ctx context.Context, cursor uint64, match string, count int64) *ScanCmd ScanType(ctx context.Context, cursor uint64, match string, count int64, keyType string) *ScanCmd }
type GeoCmdable ¶
type GeoCmdable interface { GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd GeoPos(ctx context.Context, key string, members ...string) *GeoPosCmd GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery) *IntCmd GeoRadiusByMember(ctx context.Context, key, member string, query *GeoRadiusQuery) *GeoLocationCmd GeoRadiusByMemberStore(ctx context.Context, key, member string, query *GeoRadiusQuery) *IntCmd GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd GeoSearchLocation(ctx context.Context, key string, q *GeoSearchLocationQuery) *GeoSearchLocationCmd GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd GeoDist(ctx context.Context, key string, member1, member2, unit string) *FloatCmd GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd }
type GeoLocation ¶
GeoLocation is used with GeoAdd to add geospatial location.
type GeoLocationCmd ¶
type GeoLocationCmd struct {
// contains filtered or unexported fields
}
func NewGeoLocationCmd ¶
func NewGeoLocationCmd(ctx context.Context, q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd
func NewGeoLocationCmdResult ¶
func NewGeoLocationCmdResult(val []GeoLocation, err error) *GeoLocationCmd
NewGeoLocationCmdResult returns a GeoLocationCmd initialised with val and err for testing.
func (*GeoLocationCmd) Result ¶
func (cmd *GeoLocationCmd) Result() ([]GeoLocation, error)
func (*GeoLocationCmd) SetFirstKeyPos ¶
func (cmd *GeoLocationCmd) SetFirstKeyPos(keyPos int8)
func (*GeoLocationCmd) SetVal ¶
func (cmd *GeoLocationCmd) SetVal(locations []GeoLocation)
func (*GeoLocationCmd) String ¶
func (cmd *GeoLocationCmd) String() string
func (*GeoLocationCmd) Val ¶
func (cmd *GeoLocationCmd) Val() []GeoLocation
type GeoPosCmd ¶
type GeoPosCmd struct {
// contains filtered or unexported fields
}
func NewGeoPosCmd ¶
func NewGeoPosCmdResult ¶
NewGeoPosCmdResult returns a GeoPosCmd initialised with val and err for testing.
func (*GeoPosCmd) SetFirstKeyPos ¶
func (cmd *GeoPosCmd) SetFirstKeyPos(keyPos int8)
type GeoRadiusQuery ¶
type GeoRadiusQuery struct { Radius float64 // Can be m, km, ft, or mi. Default is km. Unit string WithCoord bool WithDist bool WithGeoHash bool Count int // Can be ASC or DESC. Default is no sort order. Sort string Store string StoreDist string // contains filtered or unexported fields }
GeoRadiusQuery is used with GeoRadius to query geospatial index.
type GeoSearchLocationCmd ¶
type GeoSearchLocationCmd struct {
// contains filtered or unexported fields
}
func NewGeoSearchLocationCmd ¶
func NewGeoSearchLocationCmd( ctx context.Context, opt *GeoSearchLocationQuery, args ...interface{}, ) *GeoSearchLocationCmd
func (*GeoSearchLocationCmd) Result ¶
func (cmd *GeoSearchLocationCmd) Result() ([]GeoLocation, error)
func (*GeoSearchLocationCmd) SetFirstKeyPos ¶
func (cmd *GeoSearchLocationCmd) SetFirstKeyPos(keyPos int8)
func (*GeoSearchLocationCmd) SetVal ¶
func (cmd *GeoSearchLocationCmd) SetVal(val []GeoLocation)
func (*GeoSearchLocationCmd) String ¶
func (cmd *GeoSearchLocationCmd) String() string
func (*GeoSearchLocationCmd) Val ¶
func (cmd *GeoSearchLocationCmd) Val() []GeoLocation
type GeoSearchLocationQuery ¶
type GeoSearchLocationQuery struct { GeoSearchQuery WithCoord bool WithDist bool WithHash bool }
type GeoSearchQuery ¶
type GeoSearchQuery struct { Member string // Latitude and Longitude when using FromLonLat option. Longitude float64 Latitude float64 // Distance and unit when using ByRadius option. // Can use m, km, ft, or mi. Default is km. Radius float64 RadiusUnit string // Height, width and unit when using ByBox option. // Can be m, km, ft, or mi. Default is km. BoxWidth float64 BoxHeight float64 BoxUnit string // Can be ASC or DESC. Default is no sort order. Sort string Count int CountAny bool }
GeoSearchQuery is used for GEOSearch/GEOSearchStore command query.
type GeoSearchStoreQuery ¶
type GeoSearchStoreQuery struct { GeoSearchQuery // When using the StoreDist option, the command stores the items in a // sorted set populated with their distance from the center of the circle or box, // as a floating-point number, in the same unit specified for that shape. StoreDist bool }
type HashCmdable ¶
type HashCmdable interface { HDel(ctx context.Context, key string, fields ...string) *IntCmd HExists(ctx context.Context, key, field string) *BoolCmd HGet(ctx context.Context, key, field string) *StringCmd HGetAll(ctx context.Context, key string) *MapStringStringCmd HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd HKeys(ctx context.Context, key string) *StringSliceCmd HLen(ctx context.Context, key string) *IntCmd HMGet(ctx context.Context, key string, fields ...string) *SliceCmd HSet(ctx context.Context, key string, values ...interface{}) *IntCmd HMSet(ctx context.Context, key string, values ...interface{}) *BoolCmd HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HScanNoValues(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd HVals(ctx context.Context, key string) *StringSliceCmd HRandField(ctx context.Context, key string, count int) *StringSliceCmd HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd }
type Hook ¶
type Hook interface { DialHook(next DialHook) DialHook ProcessHook(next ProcessHook) ProcessHook ProcessPipelineHook(next ProcessPipelineHook) ProcessPipelineHook }
type HyperLogLogCmdable ¶
type IndexDefinition ¶
type IndexErrors ¶
type InfoCmd ¶
type InfoCmd struct {
// contains filtered or unexported fields
}
func NewInfoCmd ¶
func (*InfoCmd) SetFirstKeyPos ¶
func (cmd *InfoCmd) SetFirstKeyPos(keyPos int8)
type IntCmd ¶
type IntCmd struct {
// contains filtered or unexported fields
}
func NewIntResult ¶
NewIntResult returns an IntCmd initialised with val and err for testing.
func (*IntCmd) SetFirstKeyPos ¶
func (cmd *IntCmd) SetFirstKeyPos(keyPos int8)
type IntPointerSliceCmd ¶
type IntPointerSliceCmd struct {
// contains filtered or unexported fields
}
func NewIntPointerSliceCmd ¶
func NewIntPointerSliceCmd(ctx context.Context, args ...interface{}) *IntPointerSliceCmd
NewIntPointerSliceCmd initialises an IntPointerSliceCmd
func (*IntPointerSliceCmd) Result ¶
func (cmd *IntPointerSliceCmd) Result() ([]*int64, error)
func (*IntPointerSliceCmd) SetFirstKeyPos ¶
func (cmd *IntPointerSliceCmd) SetFirstKeyPos(keyPos int8)
func (*IntPointerSliceCmd) SetVal ¶
func (cmd *IntPointerSliceCmd) SetVal(val []*int64)
func (*IntPointerSliceCmd) String ¶
func (cmd *IntPointerSliceCmd) String() string
func (*IntPointerSliceCmd) Val ¶
func (cmd *IntPointerSliceCmd) Val() []*int64
type IntSliceCmd ¶
type IntSliceCmd struct {
// contains filtered or unexported fields
}
func NewIntSliceCmd ¶
func NewIntSliceCmd(ctx context.Context, args ...interface{}) *IntSliceCmd
func (*IntSliceCmd) Result ¶
func (cmd *IntSliceCmd) Result() ([]int64, error)
func (*IntSliceCmd) SetFirstKeyPos ¶
func (cmd *IntSliceCmd) SetFirstKeyPos(keyPos int8)
func (*IntSliceCmd) SetVal ¶
func (cmd *IntSliceCmd) SetVal(val []int64)
func (*IntSliceCmd) String ¶
func (cmd *IntSliceCmd) String() string
func (*IntSliceCmd) Val ¶
func (cmd *IntSliceCmd) Val() []int64
type JSONArrIndexArgs ¶
type JSONArrTrimArgs ¶
type JSONCmd ¶
type JSONCmd struct {
// contains filtered or unexported fields
}
func (*JSONCmd) SetFirstKeyPos ¶
func (cmd *JSONCmd) SetFirstKeyPos(keyPos int8)
type JSONCmdable ¶
type JSONCmdable interface { JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, value ...interface{}) *IntSliceCmd JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd JSONClear(ctx context.Context, key, path string) *IntCmd JSONDebugMemory(ctx context.Context, key, path string) *IntCmd JSONDel(ctx context.Context, key, path string) *IntCmd JSONForget(ctx context.Context, key, path string) *IntCmd JSONGet(ctx context.Context, key string, paths ...string) *JSONCmd JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd JSONMerge(ctx context.Context, key, path string, value string) *StatusCmd JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd JSONObjKeys(ctx context.Context, key, path string) *SliceCmd JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd JSONSet(ctx context.Context, key, path string, value interface{}) *StatusCmd JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd JSONType(ctx context.Context, key, path string) *JSONSliceCmd }
type JSONGetArgs ¶
type JSONSetArgs ¶
type JSONSliceCmd ¶
type JSONSliceCmd struct {
// contains filtered or unexported fields
}
func NewJSONSliceCmd ¶
func NewJSONSliceCmd(ctx context.Context, args ...interface{}) *JSONSliceCmd
func (*JSONSliceCmd) Result ¶
func (cmd *JSONSliceCmd) Result() ([]interface{}, error)
func (*JSONSliceCmd) SetFirstKeyPos ¶
func (cmd *JSONSliceCmd) SetFirstKeyPos(keyPos int8)
func (*JSONSliceCmd) SetVal ¶
func (cmd *JSONSliceCmd) SetVal(val []interface{})
func (*JSONSliceCmd) String ¶
func (cmd *JSONSliceCmd) String() string
func (*JSONSliceCmd) Val ¶
func (cmd *JSONSliceCmd) Val() []interface{}
type KeyFlagsCmd ¶
type KeyFlagsCmd struct {
// contains filtered or unexported fields
}
func NewKeyFlagsCmd ¶
func NewKeyFlagsCmd(ctx context.Context, args ...interface{}) *KeyFlagsCmd
func (*KeyFlagsCmd) Result ¶
func (cmd *KeyFlagsCmd) Result() ([]KeyFlags, error)
func (*KeyFlagsCmd) SetFirstKeyPos ¶
func (cmd *KeyFlagsCmd) SetFirstKeyPos(keyPos int8)
func (*KeyFlagsCmd) SetVal ¶
func (cmd *KeyFlagsCmd) SetVal(val []KeyFlags)
func (*KeyFlagsCmd) String ¶
func (cmd *KeyFlagsCmd) String() string
func (*KeyFlagsCmd) Val ¶
func (cmd *KeyFlagsCmd) Val() []KeyFlags
type KeyValueSliceCmd ¶
type KeyValueSliceCmd struct {
// contains filtered or unexported fields
}
func NewKeyValueSliceCmd ¶
func NewKeyValueSliceCmd(ctx context.Context, args ...interface{}) *KeyValueSliceCmd
func (*KeyValueSliceCmd) Result ¶
func (cmd *KeyValueSliceCmd) Result() ([]KeyValue, error)
func (*KeyValueSliceCmd) SetFirstKeyPos ¶
func (cmd *KeyValueSliceCmd) SetFirstKeyPos(keyPos int8)
func (*KeyValueSliceCmd) SetVal ¶
func (cmd *KeyValueSliceCmd) SetVal(val []KeyValue)
func (*KeyValueSliceCmd) String ¶
func (cmd *KeyValueSliceCmd) String() string
func (*KeyValueSliceCmd) Val ¶
func (cmd *KeyValueSliceCmd) Val() []KeyValue
type KeyValuesCmd ¶
type KeyValuesCmd struct {
// contains filtered or unexported fields
}
func NewKeyValuesCmd ¶
func NewKeyValuesCmd(ctx context.Context, args ...interface{}) *KeyValuesCmd
func (*KeyValuesCmd) SetFirstKeyPos ¶
func (cmd *KeyValuesCmd) SetFirstKeyPos(keyPos int8)
func (*KeyValuesCmd) SetVal ¶
func (cmd *KeyValuesCmd) SetVal(key string, val []string)
func (*KeyValuesCmd) String ¶
func (cmd *KeyValuesCmd) String() string
func (*KeyValuesCmd) Val ¶
func (cmd *KeyValuesCmd) Val() (string, []string)
type LCSCmd ¶
type LCSCmd struct {
// contains filtered or unexported fields
}
func (*LCSCmd) SetFirstKeyPos ¶
func (cmd *LCSCmd) SetFirstKeyPos(keyPos int8)
type LCSMatch ¶
type LCSMatch struct { MatchString string Matches []LCSMatchedPosition Len int64 }
LCSMatch is the result set of the LCS command.
type LCSMatchedPosition ¶
type LCSMatchedPosition struct { Key1 LCSPosition Key2 LCSPosition // only for withMatchLen is true MatchLen int64 }
type LCSPosition ¶
type LCSQuery ¶
type LCSQuery struct { Key1 string Key2 string Len bool Idx bool MinMatchLen int WithMatchLen bool }
LCSQuery is a parameter used for the LCS command
type LibraryInfo ¶
LibraryInfo holds the library info.
func WithLibraryName ¶
func WithLibraryName(libName string) LibraryInfo
WithLibraryName returns a valid LibraryInfo with library name only.
func WithLibraryVersion ¶
func WithLibraryVersion(libVer string) LibraryInfo
WithLibraryVersion returns a valid LibraryInfo with library version only.
func (LibraryInfo) Validate ¶
func (info LibraryInfo) Validate() error
Validate checks if only one field in the struct is non-nil.
type Limiter ¶
type Limiter interface { // Allow returns nil if operation is allowed or an error otherwise. // If operation is allowed client must ReportResult of the operation // whether it is a success or a failure. Allow() error // ReportResult reports the result of the previously allowed operation. // nil indicates a success, non-nil error usually indicates a failure. ReportResult(result error) }
Limiter is the interface of a rate limiter or a circuit breaker.
type ListCmdable ¶
type ListCmdable interface { BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd BLMPop(ctx context.Context, timeout time.Duration, direction string, count int64, keys ...string) *KeyValuesCmd BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd LIndex(ctx context.Context, key string, index int64) *StringCmd LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *IntCmd LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *IntCmd LLen(ctx context.Context, key string) *IntCmd LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd LPop(ctx context.Context, key string) *StringCmd LPopCount(ctx context.Context, key string, count int) *StringSliceCmd LPos(ctx context.Context, key string, value string, args LPosArgs) *IntCmd LPosCount(ctx context.Context, key string, value string, count int64, args LPosArgs) *IntSliceCmd LPush(ctx context.Context, key string, values ...interface{}) *IntCmd LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd RPop(ctx context.Context, key string) *StringCmd RPopCount(ctx context.Context, key string, count int) *StringSliceCmd RPopLPush(ctx context.Context, source, destination string) *StringCmd RPush(ctx context.Context, key string, values ...interface{}) *IntCmd RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd LMove(ctx context.Context, source, destination, srcpos, destpos string) *StringCmd BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *StringCmd }
type MapMapStringInterfaceCmd ¶
type MapMapStringInterfaceCmd struct {
// contains filtered or unexported fields
}
----------------------------------------------------------------------- MapStringInterfaceCmd represents a command that returns a map of strings to interface{}.
func NewMapMapStringInterfaceCmd ¶
func NewMapMapStringInterfaceCmd(ctx context.Context, args ...interface{}) *MapMapStringInterfaceCmd
func (*MapMapStringInterfaceCmd) Result ¶
func (cmd *MapMapStringInterfaceCmd) Result() (map[string]interface{}, error)
func (*MapMapStringInterfaceCmd) SetFirstKeyPos ¶
func (cmd *MapMapStringInterfaceCmd) SetFirstKeyPos(keyPos int8)
func (*MapMapStringInterfaceCmd) SetVal ¶
func (cmd *MapMapStringInterfaceCmd) SetVal(val map[string]interface{})
func (*MapMapStringInterfaceCmd) String ¶
func (cmd *MapMapStringInterfaceCmd) String() string
func (*MapMapStringInterfaceCmd) Val ¶
func (cmd *MapMapStringInterfaceCmd) Val() map[string]interface{}
type MapStringIntCmd ¶
type MapStringIntCmd struct {
// contains filtered or unexported fields
}
func NewMapStringIntCmd ¶
func NewMapStringIntCmd(ctx context.Context, args ...interface{}) *MapStringIntCmd
func NewMapStringIntCmdResult ¶
func NewMapStringIntCmdResult(val map[string]int64, err error) *MapStringIntCmd
NewMapStringIntCmdResult returns a MapStringIntCmd initialised with val and err for testing.
func (*MapStringIntCmd) SetFirstKeyPos ¶
func (cmd *MapStringIntCmd) SetFirstKeyPos(keyPos int8)
func (*MapStringIntCmd) SetVal ¶
func (cmd *MapStringIntCmd) SetVal(val map[string]int64)
func (*MapStringIntCmd) String ¶
func (cmd *MapStringIntCmd) String() string
func (*MapStringIntCmd) Val ¶
func (cmd *MapStringIntCmd) Val() map[string]int64
type MapStringInterfaceCmd ¶
type MapStringInterfaceCmd struct {
// contains filtered or unexported fields
}
func NewMapStringInterfaceCmd ¶
func NewMapStringInterfaceCmd(ctx context.Context, args ...interface{}) *MapStringInterfaceCmd
func (*MapStringInterfaceCmd) Result ¶
func (cmd *MapStringInterfaceCmd) Result() (map[string]interface{}, error)
func (*MapStringInterfaceCmd) SetFirstKeyPos ¶
func (cmd *MapStringInterfaceCmd) SetFirstKeyPos(keyPos int8)
func (*MapStringInterfaceCmd) SetVal ¶
func (cmd *MapStringInterfaceCmd) SetVal(val map[string]interface{})
func (*MapStringInterfaceCmd) String ¶
func (cmd *MapStringInterfaceCmd) String() string
func (*MapStringInterfaceCmd) Val ¶
func (cmd *MapStringInterfaceCmd) Val() map[string]interface{}
type MapStringInterfaceSliceCmd ¶
type MapStringInterfaceSliceCmd struct {
// contains filtered or unexported fields
}
func NewMapStringInterfaceSliceCmd ¶
func NewMapStringInterfaceSliceCmd(ctx context.Context, args ...interface{}) *MapStringInterfaceSliceCmd
func (*MapStringInterfaceSliceCmd) Args ¶
func (cmd *MapStringInterfaceSliceCmd) Args() []interface{}
func (*MapStringInterfaceSliceCmd) FullName ¶
func (cmd *MapStringInterfaceSliceCmd) FullName() string
func (*MapStringInterfaceSliceCmd) Result ¶
func (cmd *MapStringInterfaceSliceCmd) Result() ([]map[string]interface{}, error)
func (*MapStringInterfaceSliceCmd) SetFirstKeyPos ¶
func (cmd *MapStringInterfaceSliceCmd) SetFirstKeyPos(keyPos int8)
func (*MapStringInterfaceSliceCmd) SetVal ¶
func (cmd *MapStringInterfaceSliceCmd) SetVal(val []map[string]interface{})
func (*MapStringInterfaceSliceCmd) String ¶
func (cmd *MapStringInterfaceSliceCmd) String() string
func (*MapStringInterfaceSliceCmd) Val ¶
func (cmd *MapStringInterfaceSliceCmd) Val() []map[string]interface{}
type MapStringSliceInterfaceCmd ¶
type MapStringSliceInterfaceCmd struct {
// contains filtered or unexported fields
}
------------------------------------------------------------------------------
func NewMapStringSliceInterfaceCmd ¶
func NewMapStringSliceInterfaceCmd(ctx context.Context, args ...interface{}) *MapStringSliceInterfaceCmd
func (*MapStringSliceInterfaceCmd) Args ¶
func (cmd *MapStringSliceInterfaceCmd) Args() []interface{}
func (*MapStringSliceInterfaceCmd) FullName ¶
func (cmd *MapStringSliceInterfaceCmd) FullName() string
func (*MapStringSliceInterfaceCmd) Result ¶
func (cmd *MapStringSliceInterfaceCmd) Result() (map[string][]interface{}, error)
func (*MapStringSliceInterfaceCmd) SetFirstKeyPos ¶
func (cmd *MapStringSliceInterfaceCmd) SetFirstKeyPos(keyPos int8)
func (*MapStringSliceInterfaceCmd) SetVal ¶
func (cmd *MapStringSliceInterfaceCmd) SetVal(val map[string][]interface{})
func (*MapStringSliceInterfaceCmd) String ¶
func (cmd *MapStringSliceInterfaceCmd) String() string
func (*MapStringSliceInterfaceCmd) Val ¶
func (cmd *MapStringSliceInterfaceCmd) Val() map[string][]interface{}
type MapStringStringCmd ¶
type MapStringStringCmd struct {
// contains filtered or unexported fields
}
func NewMapStringStringCmd ¶
func NewMapStringStringCmd(ctx context.Context, args ...interface{}) *MapStringStringCmd
func NewMapStringStringResult ¶
func NewMapStringStringResult(val map[string]string, err error) *MapStringStringCmd
NewMapStringStringResult returns a MapStringStringCmd initialised with val and err for testing.
func (*MapStringStringCmd) Result ¶
func (cmd *MapStringStringCmd) Result() (map[string]string, error)
func (*MapStringStringCmd) Scan ¶
func (cmd *MapStringStringCmd) Scan(dest interface{}) error
Scan scans the results from the map into a destination struct. The map keys are matched in the Redis struct fields by the `redis:"field"` tag.
Example ¶
ExampleMapStringStringCmd_Scan shows how to scan the results of a map fetch into a struct.
rdb.FlushDB(ctx) err := rdb.HMSet(ctx, "map", "name", "hello", "count", 123, "correct", true).Err() if err != nil { panic(err) } // Get the map. The same approach works for HmGet(). res := rdb.HGetAll(ctx, "map") if res.Err() != nil { panic(err) } type data struct { Name string `redis:"name"` Count int `redis:"count"` Correct bool `redis:"correct"` } // Scan the results into the struct. var d data if err := res.Scan(&d); err != nil { panic(err) } fmt.Println(d)
Output: {hello 123 true}
func (*MapStringStringCmd) SetFirstKeyPos ¶
func (cmd *MapStringStringCmd) SetFirstKeyPos(keyPos int8)
func (*MapStringStringCmd) SetVal ¶
func (cmd *MapStringStringCmd) SetVal(val map[string]string)
func (*MapStringStringCmd) String ¶
func (cmd *MapStringStringCmd) String() string
func (*MapStringStringCmd) Val ¶
func (cmd *MapStringStringCmd) Val() map[string]string
type MapStringStringSliceCmd ¶
type MapStringStringSliceCmd struct {
// contains filtered or unexported fields
}
func NewMapStringStringSliceCmd ¶
func NewMapStringStringSliceCmd(ctx context.Context, args ...interface{}) *MapStringStringSliceCmd
func (*MapStringStringSliceCmd) Result ¶
func (cmd *MapStringStringSliceCmd) Result() ([]map[string]string, error)
func (*MapStringStringSliceCmd) SetFirstKeyPos ¶
func (cmd *MapStringStringSliceCmd) SetFirstKeyPos(keyPos int8)
func (*MapStringStringSliceCmd) SetVal ¶
func (cmd *MapStringStringSliceCmd) SetVal(val []map[string]string)
func (*MapStringStringSliceCmd) String ¶
func (cmd *MapStringStringSliceCmd) String() string
func (*MapStringStringSliceCmd) Val ¶
func (cmd *MapStringStringSliceCmd) Val() []map[string]string
type ModuleLoadexConfig ¶
ModuleLoadexConfig struct is used to specify the arguments for the MODULE LOADEX command of redis. `MODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS args [args ...]]`
type MonitorCmd ¶
type MonitorCmd struct {
// contains filtered or unexported fields
}
func (*MonitorCmd) SetFirstKeyPos ¶
func (cmd *MonitorCmd) SetFirstKeyPos(keyPos int8)
func (*MonitorCmd) Start ¶
func (cmd *MonitorCmd) Start()
func (*MonitorCmd) Stop ¶
func (cmd *MonitorCmd) Stop()
func (*MonitorCmd) String ¶
func (cmd *MonitorCmd) String() string
type MonitorStatus ¶
type MonitorStatus int
type Options ¶
type Options struct { // 网络类型,tcp or unix 默认 tcp Network string // host:port 地址. Addr string // 每个连接都会执行 CLIENT SETNAME ClientName 命令为每个连接设置客户端名字 ClientName string // Dialer 会创建网络连接,并且有限Network和Addr,也就是说一旦创建Network和Addr设置的网络连接将失效 Dialer func(ctx context.Context, network, addr string) (net.Conn, error) // Hook 当连接建立成功的时候会回调该函数. OnConnect func(ctx context.Context, cn *Conn) error // Protocol 2 or 3. 用来和redis协商使用哪个协议版本的字段 // Default is 3. Protocol int //ACL(Access Control List):Redis 6.0 引入了 ACL 系统,用于更细粒度地控制客户端对 Redis 服务器的访问权限。 // Username 字段用于在连接到使用 Redis ACL 系统的 Redis 6.0 或更高版本实例时,指定用于身份验证的用户名。 Username string // Redis ACL系统支持通过密码认证,该字段就是密码 Password string // CredentialsProvider 允许更改用户名和密码,当更新之前这里返回原先的用户名和密码 CredentialsProvider func() (username string, password string) // CredentialsProviderContext 是 CredentialsProvider 的增强版本, // CredentialsProviderContext 存在会忽略 CredentialsProvider,后期会合并两个接口只保留一个 CredentialsProviderContext func(ctx context.Context) (username string, password string, err error) // 选择哪个数据库,下支持0-15 DB int // 尝试次数,默认是3次,-1 (not 0)关闭重试,只执行一次 // 因为init接口里面会重新修改值,当为-1时 MaxRetries int // 每次重试之间的最小重试间隔。默认值为8毫秒;-1表示禁用重试间隔 MinRetryBackoff time.Duration // 每次重试之间最大时间间隔,默认为512毫秒,-1表示禁用重试间隔 MaxRetryBackoff time.Duration // 拨号超时时间 默认是5秒 DialTimeout time.Duration // 同步等待回复超时时间,如果超时命令执行失败 // - `0` - 默认 (3 seconds). // - `-1` - 阻塞等待 (block indefinitely). // - `-2` - 完全禁用SetReadDeadline调用 ReadTimeout time.Duration // 写超时时间 // - `0` - 默认 (3 seconds). // - `-1` - 阻塞等待 (block indefinitely). // - `-2` - 完全禁止SetWriteDeadline调用 WriteTimeout time.Duration // ContextTimeoutEnabled 为true的情况下会尊重Context上下文的超时时间,否则会忽略. // See https://redis.uptrace.dev/guide/go-redis-debugging.html#timeouts ContextTimeoutEnabled bool // 连接池类型 // true 是 FIFO 连接池, false 代表 LIFO 连接池. // 请注意,FIFO的开销比LIFO略高, // 但它有助于更快地关闭空闲连接,从而减小池的大小。 PoolFIFO bool // 连接池中基础套接字连接数量 // 默认情况下每个可用的CPU核心会有10个连接 runtime.GOMAXPROCS. // 当连接池中被耗尽时,客户端会被分配额外的连接 // 当然你可以使用MaxActiveConns限制连接池大小。 PoolSize int // 表示当所有连接都忙时,客户端从连接池中获取连接的超时时间默认ReadTimeout + 1 为 6 秒。 // 如果所有连接都在忙,并且客户端在 6 秒内无法获取到连接,则会返回一个错误 PoolTimeout time.Duration // 连接池中最小空闲连接数量 // Default is 0. 空闲连接默认不会被关闭. MinIdleConns int // 连接池中最大空闲连接数量 // Default is 0. 空闲连接默认不会被关闭. MaxIdleConns int // 最大活跃连接数量 // 0表示不设限制 MaxActiveConns int // ConnMaxIdleTime 一个连接最长空闲时间. // 最后比系统超时时间少,否则将不起作用. //过期的连接可能会在重新使用之前被懒惰地关闭。如果d小于或等于0,则由于连接处于空闲状态,不会关闭连接。 //默认值为30分钟。“-1”禁用空闲超时检查。 ConnMaxIdleTime time.Duration // ConnMaxLifetime是一个连接可以被重用的最大时间。 // // 过期的连接可能会在重用之前惰性关闭。 // 如果<= 0,连接不会因为连接的"超期"(age)而关闭。 // // 默认不关闭空闲连接。 ConnMaxLifetime time.Duration // 使用的TLS配置。设置后,TLS将进行协商。 TLSConfig *tls.Config // 限制器接口,用于实现断路器或速率限制器。 Limiter Limiter // 是否禁用客户端设置标识符,默认false. DisableIndentity bool // 为客户端名字添加后缀,默认空. IdentitySuffix string // EnableUnstable 字段用于启用 Redis Search 模块的不稳定模式(Unstable mode), // 并且该模式使用 RESP3 协议. UnstableResp3 bool // contains filtered or unexported fields }
Options keeps the settings to set up redis connection.
func ParseURL ¶
ParseURL parses a URL into Options that can be used to connect to Redis. Scheme is required. There are two connection types: by tcp socket and by unix socket. Tcp connection:
redis://<user>:<password>@<host>:<port>/<db_number>
Unix connection:
unix://<user>:<password>@</path/to/redis.sock>?db=<db_number>
Most Option fields can be set using query parameters, with the following restrictions:
- field names are mapped using snake-case conversion: to set MaxRetries, use max_retries
- only scalar type fields are supported (bool, int, time.Duration)
- for time.Duration fields, values must be a valid input for time.ParseDuration(); additionally a plain integer as value (i.e. without unit) is interpreted as seconds
- to disable a duration field, use value less than or equal to 0; to use the default value, leave the value blank or remove the parameter
- only the last value is interpreted if a parameter is given multiple times
- fields "network", "addr", "username" and "password" can only be set using other URL attributes (scheme, host, userinfo, resp.), query parameters using these names will be treated as unknown parameters
- unknown parameter names will result in an error
Examples:
redis://user:password@localhost:6789/3?dial_timeout=3&db=1&read_timeout=6s&max_retries=2 is equivalent to: &Options{ Network: "tcp", Addr: "localhost:6789", DB: 1, // path "/3" was overridden by "&db=1" DialTimeout: 3 * time.Second, // no time unit = seconds ReadTimeout: 6 * time.Second, MaxRetries: 2, }
Example ¶
opt, err := redis.ParseURL("redis://:qwerty@localhost:6379/1?dial_timeout=5s") if err != nil { panic(err) } fmt.Println("addr is", opt.Addr) fmt.Println("db is", opt.DB) fmt.Println("password is", opt.Password) fmt.Println("dial timeout is", opt.DialTimeout) // Create client as usually. _ = redis.NewClient(opt)
Output: addr is localhost:6379 db is 1 password is qwerty dial timeout is 5s
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline implements pipelining as described in http://redis.io/topics/pipelining. Please note: it is not safe for concurrent use by multiple goroutines.
Example (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 })
Output: pipeline starting processing: [ping: ping: ] dialing tcp :6379 finished dialing tcp :6379 pipeline finished processing: [ping: PONG ping: PONG]
func (Pipeline) ACLLogReset ¶
func (Pipeline) AuthACL ¶
AuthACL Perform an AUTH command, using the given user and pass. Should be used to authenticate the current connection with one of the connections defined in the ACL list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
func (Pipeline) BFAdd ¶
BFAdd adds an item to a Bloom filter. For more information - https://redis.io/commands/bf.add/
func (Pipeline) BFCard ¶
BFCard returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter). For more information - https://redis.io/commands/bf.card/
func (Pipeline) BFExists ¶
BFExists determines whether a given item was added to a Bloom filter. For more information - https://redis.io/commands/bf.exists/
func (Pipeline) BFInfo ¶
Returns information about a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Pipeline) BFInfoArg ¶
BFInfoArg returns information about a specific option of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Pipeline) BFInfoCapacity ¶
BFInfoCapacity returns information about the capacity of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Pipeline) BFInfoExpansion ¶
BFInfoExpansion returns information about the expansion rate of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Pipeline) BFInfoFilters ¶
BFInfoFilters returns information about the filters of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Pipeline) BFInfoItems ¶
BFInfoItems returns information about the items of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Pipeline) BFInfoSize ¶
BFInfoSize returns information about the size of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Pipeline) BFInsert ¶
func (c Pipeline) BFInsert(ctx context.Context, key string, options *BFInsertOptions, elements ...interface{}) *BoolSliceCmd
BFInsert inserts elements into a Bloom filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. For more information - https://redis.io/commands/bf.insert/
func (Pipeline) BFLoadChunk ¶
func (c Pipeline) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
BFLoadChunk restores a Bloom filter previously saved using BF.SCANDUMP. For more information - https://redis.io/commands/bf.loadchunk/
func (Pipeline) BFMAdd ¶
func (c Pipeline) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMAdd adds multiple elements to a Bloom filter. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/bf.madd/
func (Pipeline) BFMExists ¶
func (c Pipeline) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMExists check if multiple elements exist in a Bloom filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/bf.mexists/
func (Pipeline) BFReserve ¶
func (c Pipeline) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserve creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. For more information - https://redis.io/commands/bf.reserve/
func (Pipeline) BFReserveExpansion ¶
func (c Pipeline) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
BFReserveExpansion creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying an expansion rate for the filter. For more information - https://redis.io/commands/bf.reserve/
func (Pipeline) BFReserveNonScaling ¶
func (c Pipeline) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserveNonScaling creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying that the filter should not scale. For more information - https://redis.io/commands/bf.reserve/
func (Pipeline) BFReserveWithArgs ¶
func (c Pipeline) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
BFReserveWithArgs creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying additional options such as expansion rate and non-scaling behavior. For more information - https://redis.io/commands/bf.reserve/
func (Pipeline) BFScanDump ¶
func (c Pipeline) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
Begins an incremental save of the Bloom filter. This command is useful for large Bloom filters that cannot fit into the DUMP and RESTORE model. For more information - https://redis.io/commands/bf.scandump/
func (Pipeline) BRPopLPush ¶
func (Pipeline) BZMPop ¶
func (c Pipeline) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd
BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set")
func (Pipeline) BgRewriteAOF ¶
func (Pipeline) BitField ¶
func (c Pipeline) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitField accepts multiple values:
- BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
- BitField([]string{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
- BitField([]interface{}{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
func (Pipeline) BitFieldRO ¶
func (c Pipeline) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitFieldRO - Read-only variant of the BITFIELD command. It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas. - BitFieldRO(ctx, key, "<Encoding0>", "<Offset0>", "<Encoding1>","<Offset1>")
func (Pipeline) BitPos ¶
BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`.
func (Pipeline) BitPosSpan ¶
func (c Pipeline) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte
func (Pipeline) CFAdd ¶
CFAdd adds an element to a Cuckoo filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.add/
func (Pipeline) CFAddNX ¶
CFAddNX adds an element to a Cuckoo filter only if it does not already exist in the filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.addnx/
func (Pipeline) CFCount ¶
CFCount returns an estimate of the number of times an element may be in a Cuckoo Filter. For more information - https://redis.io/commands/cf.count/
func (Pipeline) CFDel ¶
CFDel deletes an item once from the cuckoo filter. For more information - https://redis.io/commands/cf.del/
func (Pipeline) CFExists ¶
CFExists determines whether an item may exist in the Cuckoo Filter or not. For more information - https://redis.io/commands/cf.exists/
func (Pipeline) CFInfo ¶
CFInfo returns information about a Cuckoo filter. For more information - https://redis.io/commands/cf.info/
func (Pipeline) CFInsert ¶
func (c Pipeline) CFInsert(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *BoolSliceCmd
CFInsert inserts elements into a Cuckoo filter. This function also allows for specifying additional options such as capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insert/
func (Pipeline) CFInsertNX ¶
func (c Pipeline) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *IntSliceCmd
CFInsertNX inserts elements into a Cuckoo filter only if they do not already exist in the filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of integers indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insertnx/
func (Pipeline) CFLoadChunk ¶
func (c Pipeline) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
CFLoadChunk restores a filter previously saved using SCANDUMP. For more information - https://redis.io/commands/cf.loadchunk/
func (Pipeline) CFMExists ¶
func (c Pipeline) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
CFMExists check if multiple elements exist in a Cuckoo filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/cf.mexists/
func (Pipeline) CFReserve ¶
CFReserve creates an empty Cuckoo filter with the specified capacity. For more information - https://redis.io/commands/cf.reserve/
func (Pipeline) CFReserveBucketSize ¶
func (c Pipeline) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
CFReserveBucketSize creates an empty Cuckoo filter with the specified capacity and bucket size. For more information - https://redis.io/commands/cf.reserve/
func (Pipeline) CFReserveExpansion ¶
func (c Pipeline) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
CFReserveExpansion creates an empty Cuckoo filter with the specified capacity and expansion rate. For more information - https://redis.io/commands/cf.reserve/
func (Pipeline) CFReserveMaxIterations ¶
func (c Pipeline) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
CFReserveMaxIterations creates an empty Cuckoo filter with the specified capacity and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Pipeline) CFReserveWithArgs ¶
func (c Pipeline) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
CFReserveWithArgs creates an empty Cuckoo filter with the specified options. This function allows for specifying additional options such as bucket size and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Pipeline) CFScanDump ¶
func (c Pipeline) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
CFScanDump begins an incremental save of the cuckoo filter. For more information - https://redis.io/commands/cf.scandump/
func (Pipeline) CMSIncrBy ¶
func (c Pipeline) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSIncrBy increments the count of one or more items in a Count-Min Sketch filter. Returns an array of integers representing the updated count of each item. For more information - https://redis.io/commands/cms.incrby/
func (Pipeline) CMSInfo ¶
func (c Pipeline) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
CMSInfo returns information about a Count-Min Sketch filter. For more information - https://redis.io/commands/cms.info/
func (Pipeline) CMSInitByDim ¶
CMSInitByDim creates an empty Count-Min Sketch filter with the specified dimensions. For more information - https://redis.io/commands/cms.initbydim/
func (Pipeline) CMSInitByProb ¶
func (c Pipeline) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
CMSInitByProb creates an empty Count-Min Sketch filter with the specified error rate and probability. For more information - https://redis.io/commands/cms.initbyprob/
func (Pipeline) CMSMerge ¶
CMSMerge merges multiple Count-Min Sketch filters into a single filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Pipeline) CMSMergeWithWeight ¶
func (c Pipeline) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
CMSMergeWithWeight merges multiple Count-Min Sketch filters into a single filter with weights for each source filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Pipeline) CMSQuery ¶
func (c Pipeline) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSQuery returns count for item(s). For more information - https://redis.io/commands/cms.query/
func (Pipeline) ClientGetName ¶
ClientGetName returns the name of the connection.
func (Pipeline) ClientInfo ¶
func (c Pipeline) ClientInfo(ctx context.Context) *ClientInfoCmd
func (Pipeline) ClientKill ¶
func (Pipeline) ClientKillByFilter ¶
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
func (Pipeline) ClientList ¶
func (Pipeline) ClientPause ¶
func (Pipeline) ClientSetInfo ¶
func (c Pipeline) ClientSetInfo(ctx context.Context, info LibraryInfo) *StatusCmd
ClientSetInfo sends a CLIENT SETINFO command with the provided info.
func (Pipeline) ClientSetName ¶
ClientSetName assigns a name to the connection.
func (Pipeline) ClientUnblock ¶
func (Pipeline) ClientUnblockWithError ¶
func (Pipeline) ClientUnpause ¶
func (Pipeline) ClusterAddSlots ¶
func (Pipeline) ClusterAddSlotsRange ¶
func (Pipeline) ClusterCountFailureReports ¶
func (Pipeline) ClusterCountKeysInSlot ¶
func (Pipeline) ClusterDelSlots ¶
func (Pipeline) ClusterDelSlotsRange ¶
func (Pipeline) ClusterFailover ¶
func (Pipeline) ClusterForget ¶
func (Pipeline) ClusterGetKeysInSlot ¶
func (c Pipeline) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
func (Pipeline) ClusterInfo ¶
func (Pipeline) ClusterKeySlot ¶
func (Pipeline) ClusterLinks ¶
func (c Pipeline) ClusterLinks(ctx context.Context) *ClusterLinksCmd
func (Pipeline) ClusterMeet ¶
func (Pipeline) ClusterMyShardID ¶
func (Pipeline) ClusterNodes ¶
func (Pipeline) ClusterReplicate ¶
func (Pipeline) ClusterResetHard ¶
func (Pipeline) ClusterResetSoft ¶
func (Pipeline) ClusterSaveConfig ¶
func (Pipeline) ClusterShards ¶
func (c Pipeline) ClusterShards(ctx context.Context) *ClusterShardsCmd
func (Pipeline) ClusterSlaves ¶
func (c Pipeline) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
func (Pipeline) ClusterSlots ¶
func (c Pipeline) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
func (Pipeline) Command ¶
func (c Pipeline) Command(ctx context.Context) *CommandsInfoCmd
func (Pipeline) CommandGetKeys ¶
func (c Pipeline) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
func (Pipeline) CommandGetKeysAndFlags ¶
func (c Pipeline) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
func (Pipeline) CommandList ¶
func (c Pipeline) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
func (Pipeline) ConfigGet ¶
func (c Pipeline) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
func (Pipeline) ConfigResetStat ¶
func (Pipeline) ConfigRewrite ¶
func (Pipeline) DebugObject ¶
func (*Pipeline) Discard ¶
func (c *Pipeline) Discard()
Discard resets the pipeline and discards queued commands.
func (*Pipeline) Exec ¶
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.
func (Pipeline) ExpireTime ¶
func (c Pipeline) ExpireTime(ctx context.Context, key string) *DurationCmd
func (Pipeline) FCallRo ¶
func (c Pipeline) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
FCallRo this function simply calls FCallRO, Deprecated: to maintain convention FCallRO.
func (Pipeline) FTAggregate ¶
func (c Pipeline) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
FTAggregate - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Pipeline) FTAggregateWithArgs ¶
func (c Pipeline) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
FTAggregateWithArgs - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. This function also allows for specifying additional options such as: Verbatim, LoadAll, Load, Timeout, GroupBy, SortBy, SortByMax, Apply, LimitOffset, Limit, Filter, WithCursor, Params, and DialectVersion. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Pipeline) FTAliasAdd ¶
FTAliasAdd - Adds an alias to an index. The 'index' parameter specifies the index to which the alias is added, and the 'alias' parameter specifies the alias. For more information, please refer to the Redis documentation: [FT.ALIASADD]: (https://redis.io/commands/ft.aliasadd/)
func (Pipeline) FTAliasDel ¶
FTAliasDel - Removes an alias from an index. The 'alias' parameter specifies the alias to be removed. For more information, please refer to the Redis documentation: [FT.ALIASDEL]: (https://redis.io/commands/ft.aliasdel/)
func (Pipeline) FTAliasUpdate ¶
FTAliasUpdate - Updates an alias to an index. The 'index' parameter specifies the index to which the alias is updated, and the 'alias' parameter specifies the alias. If the alias already exists for a different index, it updates the alias to point to the specified index instead. For more information, please refer to the Redis documentation: [FT.ALIASUPDATE]: (https://redis.io/commands/ft.aliasupdate/)
func (Pipeline) FTAlter ¶
func (c Pipeline) FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd
FTAlter - Alters the definition of an existing index. The 'index' parameter specifies the index to alter, and the 'skipInitialScan' parameter specifies whether to skip the initial scan. The 'definition' parameter specifies the new definition for the index. For more information, please refer to the Redis documentation: [FT.ALTER]: (https://redis.io/commands/ft.alter/)
func (Pipeline) FTConfigGet ¶
func (c Pipeline) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
FTConfigGet - Retrieves the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to retrieve. For more information, please refer to the Redis documentation: [FT.CONFIG GET]: (https://redis.io/commands/ft.config-get/)
func (Pipeline) FTConfigSet ¶
FTConfigSet - Sets the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to set, and the 'value' parameter specifies the new value. For more information, please refer to the Redis documentation: [FT.CONFIG SET]: (https://redis.io/commands/ft.config-set/)
func (Pipeline) FTCreate ¶
func (c Pipeline) FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd
FTCreate - Creates a new index with the given options and schema. The 'index' parameter specifies the name of the index to create. The 'options' parameter specifies various options for the index, such as: whether to index hashes or JSONs, prefixes, filters, default language, score, score field, payload field, etc. The 'schema' parameter specifies the schema for the index, which includes the field name, field type, etc. For more information, please refer to the Redis documentation: [FT.CREATE]: (https://redis.io/commands/ft.create/)
func (Pipeline) FTCursorDel ¶
FTCursorDel - Deletes a cursor from an existing index. The 'index' parameter specifies the index from which to delete the cursor, and the 'cursorId' parameter specifies the ID of the cursor to delete. For more information, please refer to the Redis documentation: [FT.CURSOR DEL]: (https://redis.io/commands/ft.cursor-del/)
func (Pipeline) FTCursorRead ¶
func (c Pipeline) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
FTCursorRead - Reads the next results from an existing cursor. The 'index' parameter specifies the index from which to read the cursor, the 'cursorId' parameter specifies the ID of the cursor to read, and the 'count' parameter specifies the number of results to read. For more information, please refer to the Redis documentation: [FT.CURSOR READ]: (https://redis.io/commands/ft.cursor-read/)
func (Pipeline) FTDictAdd ¶
FTDictAdd - Adds terms to a dictionary. The 'dict' parameter specifies the dictionary to which to add the terms, and the 'term' parameter specifies the terms to add. For more information, please refer to the Redis documentation: [FT.DICTADD]: (https://redis.io/commands/ft.dictadd/)
func (Pipeline) FTDictDel ¶
FTDictDel - Deletes terms from a dictionary. The 'dict' parameter specifies the dictionary from which to delete the terms, and the 'term' parameter specifies the terms to delete. For more information, please refer to the Redis documentation: [FT.DICTDEL]: (https://redis.io/commands/ft.dictdel/)
func (Pipeline) FTDictDump ¶
func (c Pipeline) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
FTDictDump - Returns all terms in the specified dictionary. The 'dict' parameter specifies the dictionary from which to return the terms. For more information, please refer to the Redis documentation: [FT.DICTDUMP]: (https://redis.io/commands/ft.dictdump/)
func (Pipeline) FTDropIndex ¶
FTDropIndex - Deletes an index. The 'index' parameter specifies the index to delete. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Pipeline) FTDropIndexWithArgs ¶
func (c Pipeline) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
FTDropIndexWithArgs - Deletes an index with options. The 'index' parameter specifies the index to delete, and the 'options' parameter specifies the DeleteDocs option for docs deletion. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Pipeline) FTExplain ¶
FTExplain - Returns the execution plan for a complex query. The 'index' parameter specifies the index to query, and the 'query' parameter specifies the query string. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Pipeline) FTExplainCli ¶
FTExplainCli - Returns the execution plan for a complex query. [Not Implemented] For more information, see https://redis.io/commands/ft.explaincli/
func (Pipeline) FTExplainWithArgs ¶
func (c Pipeline) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
FTExplainWithArgs - Returns the execution plan for a complex query with options. The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Pipeline) FTInfo ¶
FTInfo - Retrieves information about an index. The 'index' parameter specifies the index to retrieve information about. For more information, please refer to the Redis documentation: [FT.INFO]: (https://redis.io/commands/ft.info/)
func (Pipeline) FTSearch ¶
func (c Pipeline) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
FTSearch - Executes a search query on an index. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Pipeline) FTSearchWithArgs ¶
func (c Pipeline) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
FTSearchWithArgs - Executes a search query on an index with additional options. The 'index' parameter specifies the index to search, the 'query' parameter specifies the search query, and the 'options' parameter specifies additional options for the search. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Pipeline) FTSpellCheck ¶
func (c Pipeline) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
FTSpellCheck - Checks a query string for spelling errors. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Pipeline) FTSpellCheckWithArgs ¶
func (c Pipeline) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
FTSpellCheckWithArgs - Checks a query string for spelling errors with additional options. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Pipeline) FTSynDump ¶
func (c Pipeline) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
FTSynDump - Dumps the contents of a synonym group. The 'index' parameter specifies the index to dump. For more information, please refer to the Redis documentation: [FT.SYNDUMP]: (https://redis.io/commands/ft.syndump/)
func (Pipeline) FTSynUpdate ¶
func (c Pipeline) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
FTSynUpdate - Creates or updates a synonym group with additional terms. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Pipeline) FTSynUpdateWithArgs ¶
func (c Pipeline) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd
FTSynUpdateWithArgs - Creates or updates a synonym group with additional terms and options. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, the 'options' parameter specifies additional options for the update, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Pipeline) FTTagVals ¶
func (c Pipeline) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
FTTagVals - Returns all distinct values indexed in a tag field. The 'index' parameter specifies the index to check, and the 'field' parameter specifies the tag field to retrieve values from. For more information, please refer to the Redis documentation: [FT.TAGVALS]: (https://redis.io/commands/ft.tagvals/)
func (Pipeline) FT_List ¶
func (c Pipeline) FT_List(ctx context.Context) *StringSliceCmd
FT_List - Lists all the existing indexes in the database. For more information, please refer to the Redis documentation: [FT._LIST]: (https://redis.io/commands/ft._list/)
func (Pipeline) FlushAllAsync ¶
func (Pipeline) FlushDBAsync ¶
func (Pipeline) FunctionDelete ¶
func (Pipeline) FunctionDump ¶
func (Pipeline) FunctionFlush ¶
func (Pipeline) FunctionFlushAsync ¶
func (Pipeline) FunctionKill ¶
func (Pipeline) FunctionList ¶
func (c Pipeline) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
func (Pipeline) FunctionLoad ¶
func (Pipeline) FunctionLoadReplace ¶
func (Pipeline) FunctionRestore ¶
func (Pipeline) FunctionStats ¶
func (c Pipeline) FunctionStats(ctx context.Context) *FunctionStatsCmd
func (Pipeline) GeoAdd ¶
func (c Pipeline) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
func (Pipeline) GeoHash ¶
func (c Pipeline) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
func (Pipeline) GeoRadius ¶
func (c Pipeline) GeoRadius( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
func (Pipeline) GeoRadiusByMember ¶
func (c Pipeline) GeoRadiusByMember( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
func (Pipeline) GeoRadiusByMemberStore ¶
func (c Pipeline) GeoRadiusByMemberStore( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
func (Pipeline) GeoRadiusStore ¶
func (c Pipeline) GeoRadiusStore( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
func (Pipeline) GeoSearch ¶
func (c Pipeline) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
func (Pipeline) GeoSearchLocation ¶
func (c Pipeline) GeoSearchLocation( ctx context.Context, key string, q *GeoSearchLocationQuery, ) *GeoSearchLocationCmd
func (Pipeline) GeoSearchStore ¶
func (c Pipeline) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
func (Pipeline) Get ¶
Get Redis `GET key` command. It returns redis.Nil error when key does not exist.
func (Pipeline) GetEx ¶
GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0.
func (Pipeline) HExpire ¶
func (c Pipeline) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Pipeline) HExpireAt ¶
func (c Pipeline) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds. Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields. The command sets absolute expiration times based on the UNIX timestamp provided. For more information - https://redis.io/commands/hexpireat/
func (Pipeline) HExpireAtWithArgs ¶
func (c Pipeline) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Pipeline) HExpireTime ¶
func (c Pipeline) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds. Requires a key and the fields themselves to fetch their expiration timestamps. This command returns the expiration times for each field or error/status codes for each field as specified. For more information - https://redis.io/commands/hexpiretime/
func (Pipeline) HExpireWithArgs ¶
func (c Pipeline) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Pipeline) HGetAll ¶
func (c Pipeline) HGetAll(ctx context.Context, key string) *MapStringStringCmd
func (Pipeline) HIncrByFloat ¶
func (Pipeline) HMGet ¶
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.
func (Pipeline) HPExpire ¶
func (c Pipeline) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HPExpire - Sets the expiration time for specified fields in a hash in milliseconds. Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields. The command modifies the standard time.Duration to milliseconds for the Redis command. For more information - https://redis.io/commands/hpexpire/
func (Pipeline) HPExpireAt ¶
func (c Pipeline) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds. Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds. For more information - https://redis.io/commands/hpexpireat/
func (Pipeline) HPExpireAtWithArgs ¶
func (c Pipeline) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Pipeline) HPExpireTime ¶
func (c Pipeline) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds. Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters. Provides the expiration timestamp for each field in milliseconds. For more information - https://redis.io/commands/hexpiretime/
func (Pipeline) HPExpireWithArgs ¶
func (c Pipeline) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Pipeline) HPTTL ¶
func (c Pipeline) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds. Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields. This command provides the TTL in milliseconds for each field or returns error/status codes as needed. For more information - https://redis.io/commands/hpttl/
func (Pipeline) HPersist ¶
func (c Pipeline) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPersist - Removes the expiration time from specified fields in a hash. Accepts a key and the fields themselves. This command ensures that each field specified will have its expiration removed if present. For more information - https://redis.io/commands/hpersist/
func (Pipeline) HRandField ¶
func (c Pipeline) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
func (Pipeline) HRandFieldWithValues ¶
func (c Pipeline) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
func (Pipeline) HScanNoValues ¶
func (Pipeline) HSet ¶
HSet accepts values in following formats:
HSet("myhash", "key1", "value1", "key2", "value2")
HSet("myhash", []string{"key1", "value1", "key2", "value2"})
HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` }
HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface.
Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute.
func (Pipeline) HTTL ¶
func (c Pipeline) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds. Requires a key and the fields themselves. It returns the TTL for each specified field. This command fetches the TTL in seconds for each field or returns error/status codes as appropriate. For more information - https://redis.io/commands/httl/
func (Pipeline) Hello ¶
func (c Pipeline) Hello(ctx context.Context, ver int, username, password, clientName string, ) *MapStringInterfaceCmd
Hello Set the resp protocol used.
func (Pipeline) IncrByFloat ¶
func (Pipeline) JSONArrAppend ¶
func (c Pipeline) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
JSONArrAppend adds the provided JSON values to the end of the array at the given path. For more information, see https://redis.io/commands/json.arrappend
func (Pipeline) JSONArrIndex ¶
func (c Pipeline) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
JSONArrIndex searches for the first occurrence of the provided JSON value in the array at the given path. For more information, see https://redis.io/commands/json.arrindex
func (Pipeline) JSONArrIndexWithArgs ¶
func (c Pipeline) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, value ...interface{}) *IntSliceCmd
JSONArrIndexWithArgs searches for the first occurrence of a JSON value in an array while allowing the start and stop options to be provided. For more information, see https://redis.io/commands/json.arrindex
func (Pipeline) JSONArrInsert ¶
func (c Pipeline) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
JSONArrInsert inserts the JSON values into the array at the specified path before the index (shifts to the right). For more information, see https://redis.io/commands/json.arrinsert
func (Pipeline) JSONArrLen ¶
func (c Pipeline) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
JSONArrLen reports the length of the JSON array at the specified path in the given key. For more information, see https://redis.io/commands/json.arrlen
func (Pipeline) JSONArrPop ¶
func (c Pipeline) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
JSONArrPop removes and returns an element from the specified index in the array. For more information, see https://redis.io/commands/json.arrpop
func (Pipeline) JSONArrTrim ¶
func (c Pipeline) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
JSONArrTrim trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Pipeline) JSONArrTrimWithArgs ¶
func (c Pipeline) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
JSONArrTrimWithArgs trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Pipeline) JSONClear ¶
JSONClear clears container values (arrays/objects) and sets numeric values to 0. For more information, see https://redis.io/commands/json.clear
func (Pipeline) JSONDebugMemory ¶
JSONDebugMemory reports a value's memory usage in bytes (unimplemented) For more information, see https://redis.io/commands/json.debug-memory
func (Pipeline) JSONDel ¶
JSONDel deletes a value. For more information, see https://redis.io/commands/json.del
func (Pipeline) JSONForget ¶
JSONForget deletes a value. For more information, see https://redis.io/commands/json.forget
func (Pipeline) JSONGet ¶
JSONGet returns the value at path in JSON serialized form. JSON.GET returns an array of strings. This function parses out the wrapping array but leaves the internal strings unprocessed by default (see Val()) For more information - https://redis.io/commands/json.get/
func (Pipeline) JSONGetWithArgs ¶
func (c Pipeline) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
JSONGetWithArgs - Retrieves the value of a key from a JSON document. This function also allows for specifying additional options such as: Indention, NewLine and Space For more information - https://redis.io/commands/json.get/
func (Pipeline) JSONMGet ¶
func (c Pipeline) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
JSONMGet returns the values at the specified path from multiple key arguments. Note - the arguments are reversed when compared with `JSON.MGET` as we want to follow the pattern of having the last argument be variable. For more information, see https://redis.io/commands/json.mget
func (Pipeline) JSONMSetArgs ¶
func (c Pipeline) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
JSONMSetArgs sets or updates one or more JSON values according to the specified key-path-value triplets. For more information, see https://redis.io/commands/json.mset
func (Pipeline) JSONMerge ¶
JSONMerge merges a given JSON value into matching paths. For more information, see https://redis.io/commands/json.merge
func (Pipeline) JSONNumIncrBy ¶
JSONNumIncrBy increments the number value stored at the specified path by the provided number. For more information, see https://redis.io/docs/latest/commands/json.numincrby/
func (Pipeline) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by the specified path. For more information, see https://redis.io/commands/json.objkeys
func (Pipeline) JSONObjLen ¶
func (c Pipeline) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONObjLen reports the number of keys in the JSON object at the specified path in the given key. For more information, see https://redis.io/commands/json.objlen
func (Pipeline) JSONSet ¶
JSONSet sets the JSON value at the given path in the given key. The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or a []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Pipeline) JSONSetMode ¶
func (c Pipeline) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
JSONSetMode sets the JSON value at the given path in the given key and allows the mode to be set (the mode value must be "XX" or "NX"). The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Pipeline) JSONStrAppend ¶
func (c Pipeline) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
JSONStrAppend appends the JSON-string values to the string at the specified path. For more information, see https://redis.io/commands/json.strappend
func (Pipeline) JSONStrLen ¶
func (c Pipeline) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONStrLen reports the length of the JSON String at the specified path in the given key. For more information, see https://redis.io/commands/json.strlen
func (Pipeline) JSONToggle ¶
func (c Pipeline) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONToggle toggles a Boolean value stored at the specified path. For more information, see https://redis.io/commands/json.toggle
func (Pipeline) JSONType ¶
func (c Pipeline) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
JSONType reports the type of JSON value at the specified path. For more information, see https://redis.io/commands/json.type
func (Pipeline) LInsertAfter ¶
func (Pipeline) LInsertBefore ¶
func (Pipeline) LMPop ¶
func (c Pipeline) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2")
func (Pipeline) LPopCount ¶
func (c Pipeline) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Pipeline) LRange ¶
func (c Pipeline) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Pipeline) MSet ¶
MSet is like Set but accepts multiple values:
- MSet("key1", "value1", "key2", "value2")
- MSet([]string{"key1", "value1", "key2", "value2"})
- MSet(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSet(struct), For struct types, see HSet description.
func (Pipeline) MSetNX ¶
MSetNX is like SetNX but accepts multiple values:
- MSetNX("key1", "value1", "key2", "value2")
- MSetNX([]string{"key1", "value1", "key2", "value2"})
- MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSetNX(struct), For struct types, see HSet description.
func (Pipeline) MemoryUsage ¶
func (Pipeline) ModuleLoadex ¶
func (c Pipeline) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
ModuleLoadex Redis `MODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS args [args ...]]` command.
func (Pipeline) Monitor ¶
func (c Pipeline) Monitor(ctx context.Context, ch chan string) *MonitorCmd
Monitor - represents a Redis MONITOR command, allowing the user to capture and process all commands sent to a Redis server. This mimics the behavior of MONITOR in the redis-cli.
Notes: - Using MONITOR blocks the connection to the server for itself. It needs a dedicated connection - The user should create a channel of type string - This runs concurrently in the background. Trigger via the Start and Stop functions See further: Redis MONITOR command: https://redis.io/commands/monitor
func (Pipeline) ObjectEncoding ¶
func (Pipeline) ObjectIdleTime ¶
func (c Pipeline) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
func (Pipeline) ObjectRefCount ¶
func (Pipeline) PExpireTime ¶
func (c Pipeline) PExpireTime(ctx context.Context, key string) *DurationCmd
func (Pipeline) PubSubChannels ¶
func (c Pipeline) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Pipeline) PubSubNumPat ¶
func (Pipeline) PubSubNumSub ¶
func (c Pipeline) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Pipeline) PubSubShardChannels ¶
func (c Pipeline) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Pipeline) PubSubShardNumSub ¶
func (c Pipeline) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Pipeline) RPopCount ¶
func (c Pipeline) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Pipeline) RestoreReplace ¶
func (Pipeline) SDiff ¶
func (c Pipeline) SDiff(ctx context.Context, keys ...string) *StringSliceCmd
func (Pipeline) SDiffStore ¶
func (Pipeline) SInter ¶
func (c Pipeline) SInter(ctx context.Context, keys ...string) *StringSliceCmd
func (Pipeline) SInterCard ¶
func (Pipeline) SInterStore ¶
func (Pipeline) SMIsMember ¶
func (c Pipeline) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
func (Pipeline) SMembers ¶
func (c Pipeline) SMembers(ctx context.Context, key string) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
func (Pipeline) SMembersMap ¶
func (c Pipeline) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
func (Pipeline) SPopN ¶
func (c Pipeline) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
SPopN Redis `SPOP key count` command.
func (Pipeline) SRandMember ¶
SRandMember Redis `SRANDMEMBER key` command.
func (Pipeline) SRandMemberN ¶
func (c Pipeline) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
SRandMemberN Redis `SRANDMEMBER key count` command.
func (Pipeline) SUnion ¶
func (c Pipeline) SUnion(ctx context.Context, keys ...string) *StringSliceCmd
func (Pipeline) SUnionStore ¶
func (Pipeline) ScriptExists ¶
func (c Pipeline) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
func (Pipeline) ScriptFlush ¶
func (Pipeline) ScriptKill ¶
func (Pipeline) ScriptLoad ¶
func (Pipeline) Set ¶
func (c Pipeline) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Pipeline) SetArgs ¶
SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options.
func (Pipeline) SetEx ¶
func (c Pipeline) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
func (Pipeline) SetNX ¶
func (c Pipeline) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetNX Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Pipeline) SetXX ¶
func (c Pipeline) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetXX Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Pipeline) ShutdownNoSave ¶
func (Pipeline) ShutdownSave ¶
func (Pipeline) SlowLogGet ¶
func (c Pipeline) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
func (Pipeline) Sort ¶
func (c Pipeline) Sort(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (Pipeline) SortInterfaces ¶
func (Pipeline) SortRO ¶
func (c Pipeline) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (Pipeline) TDigestAdd ¶
TDigestAdd adds one or more elements to a t-Digest data structure. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.add/
func (Pipeline) TDigestByRank ¶
func (c Pipeline) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRank returns an array of values from a t-Digest data structure based on their rank. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrank/
func (Pipeline) TDigestByRevRank ¶
func (c Pipeline) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRevRank returns an array of values from a t-Digest data structure based on their reverse rank. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrevrank/
func (Pipeline) TDigestCDF ¶
func (c Pipeline) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestCDF returns an array of cumulative distribution function (CDF) values for one or more elements in a t-Digest data structure. The CDF value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the CDF values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.cdf/
func (Pipeline) TDigestCreate ¶
TDigestCreate creates an empty t-Digest data structure with default parameters. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Pipeline) TDigestCreateWithCompression ¶
func (c Pipeline) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
TDigestCreateWithCompression creates an empty t-Digest data structure with a specified compression parameter. The compression parameter controls the accuracy and memory usage of the t-Digest. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Pipeline) TDigestInfo ¶
func (c Pipeline) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
TDigestInfo returns information about a t-Digest data structure. For more information - https://redis.io/commands/tdigest.info/
func (Pipeline) TDigestMax ¶
TDigestMax returns the maximum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.max/
func (Pipeline) TDigestMerge ¶
func (c Pipeline) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, sourceKeys ...string) *StatusCmd
TDigestMerge merges multiple t-Digest data structures into a single t-Digest. This function also allows for specifying additional options such as compression and override behavior. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.merge/
func (Pipeline) TDigestMin ¶
TDigestMin returns the minimum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.min/
func (Pipeline) TDigestQuantile ¶
func (c Pipeline) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestQuantile returns an array of quantile values for one or more elements in a t-Digest data structure. The quantile value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the quantile values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.quantile/
func (Pipeline) TDigestRank ¶
func (c Pipeline) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRank returns an array of rank values for one or more elements in a t-Digest data structure. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of integers representing the rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.rank/
func (Pipeline) TDigestReset ¶
TDigestReset resets a t-Digest data structure to its initial state. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.reset/
func (Pipeline) TDigestRevRank ¶
func (c Pipeline) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRevRank returns an array of reverse rank values for one or more elements in a t-Digest data structure. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of integers representing the reverse rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.revrank/
func (Pipeline) TDigestTrimmedMean ¶
func (c Pipeline) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
TDigestTrimmedMean returns the trimmed mean value from a t-Digest data structure. The trimmed mean is calculated by removing a specified fraction of the highest and lowest values from the t-Digest and then calculating the mean of the remaining values. Returns a float representing the trimmed mean value or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.trimmed_mean/
func (Pipeline) TFCall ¶
TFCall - invoke a function. For more information - https://redis.io/commands/tfcall/
func (Pipeline) TFCallASYNC ¶
func (c Pipeline) TFCallASYNC(ctx context.Context, libName string, funcName string, numKeys int) *Cmd
TFCallASYNC - invoke an asynchronous JavaScript function (coroutine). For more information - https://redis.io/commands/TFCallASYNC/
func (Pipeline) TFCallASYNCArgs ¶
func (Pipeline) TFCallArgs ¶
func (Pipeline) TFunctionDelete ¶
TFunctionDelete - delete a JavaScript library from Redis. For more information - https://redis.io/commands/tfunction-delete/
func (Pipeline) TFunctionList ¶
func (c Pipeline) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
TFunctionList - list the functions with additional information about each function. For more information - https://redis.io/commands/tfunction-list/
func (Pipeline) TFunctionListArgs ¶
func (c Pipeline) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
func (Pipeline) TFunctionLoad ¶
TFunctionLoad - load a new JavaScript library into Redis. For more information - https://redis.io/commands/tfunction-load/
func (Pipeline) TFunctionLoadArgs ¶
func (c Pipeline) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
func (Pipeline) TSAdd ¶
func (c Pipeline) TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd
TSAdd - Adds one or more observations to a t-digest sketch. For more information - https://redis.io/commands/ts.add/
func (Pipeline) TSAddWithArgs ¶
func (c Pipeline) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, options *TSOptions) *IntCmd
TSAddWithArgs - Adds one or more observations to a t-digest sketch. This function also allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.add/
func (Pipeline) TSAlter ¶
func (c Pipeline) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
TSAlter - Alters an existing time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize and DuplicatePolicy. For more information - https://redis.io/commands/ts.alter/
func (Pipeline) TSCreate ¶
TSCreate - Creates a new time-series key. For more information - https://redis.io/commands/ts.create/
func (Pipeline) TSCreateRule ¶
func (c Pipeline) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int) *StatusCmd
TSCreateRule - Creates a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.createrule/
func (Pipeline) TSCreateRuleWithArgs ¶
func (c Pipeline) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd
TSCreateRuleWithArgs - Creates a compaction rule from sourceKey to destKey with additional option. This function allows for specifying additional option such as: alignTimestamp. For more information - https://redis.io/commands/ts.createrule/
func (Pipeline) TSCreateWithArgs ¶
TSCreateWithArgs - Creates a new time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.create/
func (Pipeline) TSDecrBy ¶
TSDecrBy - Decrements the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.decrby/
func (Pipeline) TSDecrByWithArgs ¶
func (c Pipeline) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSDecrByWithArgs - Decrements the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.decrby/
func (Pipeline) TSDel ¶
func (c Pipeline) TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd
TSDel - Deletes a range of samples from a time-series key. For more information - https://redis.io/commands/ts.del/
func (Pipeline) TSDeleteRule ¶
TSDeleteRule - Deletes a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.deleterule/
func (Pipeline) TSGet ¶
func (c Pipeline) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
TSGet - Gets the last sample of a time-series key. For more information - https://redis.io/commands/ts.get/
func (Pipeline) TSGetWithArgs ¶
func (c Pipeline) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
TSGetWithArgs - Gets the last sample of a time-series key with additional option. This function allows for specifying additional option such as: Latest. For more information - https://redis.io/commands/ts.get/
func (Pipeline) TSIncrBy ¶
TSIncrBy - Increments the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.incrby/
func (Pipeline) TSIncrByWithArgs ¶
func (c Pipeline) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSIncrByWithArgs - Increments the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.incrby/
func (Pipeline) TSInfo ¶
func (c Pipeline) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
TSInfo - Returns information about a time-series key. For more information - https://redis.io/commands/ts.info/
func (Pipeline) TSInfoWithArgs ¶
func (c Pipeline) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
TSInfoWithArgs - Returns information about a time-series key with additional option. This function allows for specifying additional option such as: Debug. For more information - https://redis.io/commands/ts.info/
func (Pipeline) TSMAdd ¶
func (c Pipeline) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
TSMAdd - Adds multiple samples to multiple time-series keys. It accepts a slice of 'ktv' slices, each containing exactly three elements: key, timestamp, and value. This struct must be provided for this command to work. For more information - https://redis.io/commands/ts.madd/
func (Pipeline) TSMGet ¶
func (c Pipeline) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
TSMGet - Returns the last sample of multiple time-series keys. For more information - https://redis.io/commands/ts.mget/
func (Pipeline) TSMGetWithArgs ¶
func (c Pipeline) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
TSMGetWithArgs - Returns the last sample of multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, WithLabels and SelectedLabels. For more information - https://redis.io/commands/ts.mget/
func (Pipeline) TSMRange ¶
func (c Pipeline) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRange - Returns a range of samples from multiple time-series keys. For more information - https://redis.io/commands/ts.mrange/
func (Pipeline) TSMRangeWithArgs ¶
func (c Pipeline) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRangeOptions) *MapStringSliceInterfaceCmd
TSMRangeWithArgs - Returns a range of samples from multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrange/
func (Pipeline) TSMRevRange ¶
func (c Pipeline) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRevRange - Returns a range of samples from multiple time-series keys in reverse order. For more information - https://redis.io/commands/ts.mrevrange/
func (Pipeline) TSMRevRangeWithArgs ¶
func (c Pipeline) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRevRangeOptions) *MapStringSliceInterfaceCmd
TSMRevRangeWithArgs - Returns a range of samples from multiple time-series keys in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrevrange/
func (Pipeline) TSQueryIndex ¶
func (c Pipeline) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
TSQueryIndex - Returns all the keys matching the filter expression. For more information - https://redis.io/commands/ts.queryindex/
func (Pipeline) TSRange ¶
func (c Pipeline) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRange - Returns a range of samples from a time-series key. For more information - https://redis.io/commands/ts.range/
func (Pipeline) TSRangeWithArgs ¶
func (c Pipeline) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRangeOptions) *TSTimestampValueSliceCmd
TSRangeWithArgs - Returns a range of samples from a time-series key with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.range/
func (Pipeline) TSRevRange ¶
func (c Pipeline) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRevRange - Returns a range of samples from a time-series key in reverse order. For more information - https://redis.io/commands/ts.revrange/
func (Pipeline) TSRevRangeWithArgs ¶
func (c Pipeline) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRevRangeOptions) *TSTimestampValueSliceCmd
TSRevRangeWithArgs - Returns a range of samples from a time-series key in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.revrange/
func (Pipeline) TopKAdd ¶
func (c Pipeline) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKAdd adds one or more elements to a Top-K filter. Returns an array of strings representing the items that were removed from the filter, if any. For more information - https://redis.io/commands/topk.add/
func (Pipeline) TopKCount ¶
func (c Pipeline) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
TopKCount returns an estimate of the number of times an item may be in a Top-K filter. For more information - https://redis.io/commands/topk.count/
func (Pipeline) TopKIncrBy ¶
func (c Pipeline) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKIncrBy increases the count of one or more items in a Top-K filter. For more information - https://redis.io/commands/topk.incrby/
func (Pipeline) TopKInfo ¶
func (c Pipeline) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
TopKInfo returns information about a Top-K filter. For more information - https://redis.io/commands/topk.info/
func (Pipeline) TopKList ¶
func (c Pipeline) TopKList(ctx context.Context, key string) *StringSliceCmd
TopKList returns all items in Top-K list. For more information - https://redis.io/commands/topk.list/
func (Pipeline) TopKListWithCount ¶
func (c Pipeline) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
TopKListWithCount returns all items in Top-K list with their respective count. For more information - https://redis.io/commands/topk.list/
func (Pipeline) TopKQuery ¶
func (c Pipeline) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
TopKQuery check if multiple elements exist in a Top-K filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/topk.query/
func (Pipeline) TopKReserve ¶
TopKReserve creates an empty Top-K filter with the specified number of top items to keep. For more information - https://redis.io/commands/topk.reserve/
func (Pipeline) TopKReserveWithOptions ¶
func (c Pipeline) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
TopKReserveWithOptions creates an empty Top-K filter with the specified number of top items to keep and additional options. This function allows for specifying additional options such as width, depth and decay. For more information - https://redis.io/commands/topk.reserve/
func (*Pipeline) TxPipeline ¶
func (*Pipeline) TxPipelined ¶
func (Pipeline) XAutoClaim ¶
func (c Pipeline) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
func (Pipeline) XAutoClaimJustID ¶
func (c Pipeline) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
func (Pipeline) XClaim ¶
func (c Pipeline) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
func (Pipeline) XClaimJustID ¶
func (c Pipeline) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
func (Pipeline) XGroupCreate ¶
func (Pipeline) XGroupCreateConsumer ¶
func (Pipeline) XGroupCreateMkStream ¶
func (Pipeline) XGroupDelConsumer ¶
func (Pipeline) XGroupDestroy ¶
func (Pipeline) XGroupSetID ¶
func (Pipeline) XInfoConsumers ¶
func (c Pipeline) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
func (Pipeline) XInfoGroups ¶
func (c Pipeline) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
func (Pipeline) XInfoStream ¶
func (c Pipeline) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
func (Pipeline) XInfoStreamFull ¶
func (c Pipeline) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0.
func (Pipeline) XPending ¶
func (c Pipeline) XPending(ctx context.Context, stream, group string) *XPendingCmd
func (Pipeline) XPendingExt ¶
func (c Pipeline) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
func (Pipeline) XRange ¶
func (c Pipeline) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Pipeline) XRangeN ¶
func (c Pipeline) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Pipeline) XReadGroup ¶
func (c Pipeline) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
func (Pipeline) XReadStreams ¶
func (c Pipeline) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
func (Pipeline) XRevRange ¶
func (c Pipeline) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Pipeline) XRevRangeN ¶
func (c Pipeline) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Pipeline) XTrimMaxLen ¶
XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen
func (Pipeline) XTrimMaxLenApprox ¶
func (Pipeline) XTrimMinID ¶
func (Pipeline) XTrimMinIDApprox ¶
func (Pipeline) ZAddArgsIncr ¶
func (Pipeline) ZDiff ¶
func (c Pipeline) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
func (Pipeline) ZDiffStore ¶
ZDiffStore redis-server version >=6.2.0.
func (Pipeline) ZDiffWithScores ¶
ZDiffWithScores redis-server version >= 6.2.0.
func (Pipeline) ZInter ¶
func (c Pipeline) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd
func (Pipeline) ZInterCard ¶
func (Pipeline) ZInterStore ¶
func (Pipeline) ZInterWithScores ¶
func (Pipeline) ZMPop ¶
func (c Pipeline) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2")
func (Pipeline) ZMScore ¶
func (c Pipeline) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
func (Pipeline) ZRandMember ¶
func (c Pipeline) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
func (Pipeline) ZRandMemberWithScores ¶
ZRandMemberWithScores redis-server version >= 6.2.0.
func (Pipeline) ZRange ¶
func (c Pipeline) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Pipeline) ZRangeArgs ¶
func (c Pipeline) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
func (Pipeline) ZRangeArgsWithScores ¶
func (c Pipeline) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
func (Pipeline) ZRangeByLex ¶
func (c Pipeline) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Pipeline) ZRangeByScore ¶
func (c Pipeline) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Pipeline) ZRangeByScoreWithScores ¶
func (Pipeline) ZRangeStore ¶
func (c Pipeline) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
func (Pipeline) ZRangeWithScores ¶
func (Pipeline) ZRankWithScore ¶
func (c Pipeline) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
ZRankWithScore according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Pipeline) ZRemRangeByLex ¶
func (Pipeline) ZRemRangeByRank ¶
func (Pipeline) ZRemRangeByScore ¶
func (Pipeline) ZRevRange ¶
func (c Pipeline) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Pipeline) ZRevRangeByLex ¶
func (c Pipeline) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Pipeline) ZRevRangeByScore ¶
func (c Pipeline) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Pipeline) ZRevRangeByScoreWithScores ¶
func (Pipeline) ZRevRangeWithScores ¶
func (c Pipeline) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
ZRevRangeWithScores according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Pipeline) ZRevRankWithScore ¶
func (c Pipeline) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
func (Pipeline) ZUnion ¶
func (c Pipeline) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd
func (Pipeline) ZUnionStore ¶
type Pipeliner ¶
type Pipeliner interface { StatefulCmdable // Len is to obtain the number of commands in the pipeline that have not yet been executed. Len() int // Do is an API for executing any command. // If a certain Redis command is not yet supported, you can use Do to execute it. Do(ctx context.Context, args ...interface{}) *Cmd // Process is to put the commands to be executed into the pipeline buffer. Process(ctx context.Context, cmd Cmder) error // Discard is to discard all commands in the cache that have not yet been executed. Discard() // Exec is to send all the commands buffered in the pipeline to the redis-server. Exec(ctx context.Context) ([]Cmder, error) }
Pipeliner is an mechanism to realise Redis Pipeline technique.
Pipelining is a technique to extremely speed up processing by packing operations to batches, send them at once to Redis and read a replies in a single step. See https://redis.io/topics/pipelining
Pay attention, that Pipeline is not a transaction, so you can get unexpected results in case of big pipelines and small read/write timeouts. Redis client has retransmission logic in case of timeouts, pipeline can be retransmitted and commands can be executed more then once. To avoid this: it is good idea to use reasonable bigger read/write timeouts depends of your batch size and/or use TxPipeline.
type Pong ¶
type Pong struct {
Payload string
}
Pong received as result of a PING command issued by another client.
type ProbabilisticCmdable ¶
type ProbabilisticCmdable interface { BFAdd(ctx context.Context, key string, element interface{}) *BoolCmd BFCard(ctx context.Context, key string) *IntCmd BFExists(ctx context.Context, key string, element interface{}) *BoolCmd BFInfo(ctx context.Context, key string) *BFInfoCmd BFInfoArg(ctx context.Context, key, option string) *BFInfoCmd BFInfoCapacity(ctx context.Context, key string) *BFInfoCmd BFInfoSize(ctx context.Context, key string) *BFInfoCmd BFInfoFilters(ctx context.Context, key string) *BFInfoCmd BFInfoItems(ctx context.Context, key string) *BFInfoCmd BFInfoExpansion(ctx context.Context, key string) *BFInfoCmd BFInsert(ctx context.Context, key string, options *BFInsertOptions, elements ...interface{}) *BoolSliceCmd BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd CFAdd(ctx context.Context, key string, element interface{}) *BoolCmd CFAddNX(ctx context.Context, key string, element interface{}) *BoolCmd CFCount(ctx context.Context, key string, element interface{}) *IntCmd CFDel(ctx context.Context, key string, element interface{}) *BoolCmd CFExists(ctx context.Context, key string, element interface{}) *BoolCmd CFInfo(ctx context.Context, key string) *CFInfoCmd CFInsert(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *BoolSliceCmd CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *IntSliceCmd CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd CFReserve(ctx context.Context, key string, capacity int64) *StatusCmd CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd CMSInfo(ctx context.Context, key string) *CMSInfoCmd CMSInitByDim(ctx context.Context, key string, width, height int64) *StatusCmd CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd CMSMerge(ctx context.Context, destKey string, sourceKeys ...string) *StatusCmd CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd TopKInfo(ctx context.Context, key string) *TopKInfoCmd TopKList(ctx context.Context, key string) *StringSliceCmd TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd TopKReserve(ctx context.Context, key string, k int64) *StatusCmd TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd TDigestAdd(ctx context.Context, key string, elements ...float64) *StatusCmd TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd TDigestCreate(ctx context.Context, key string) *StatusCmd TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd TDigestMax(ctx context.Context, key string) *FloatCmd TDigestMin(ctx context.Context, key string) *FloatCmd TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, sourceKeys ...string) *StatusCmd TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd TDigestReset(ctx context.Context, key string) *StatusCmd TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd }
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
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.
Example ¶
pubsub := rdb.Subscribe(ctx, "mychannel1") // Wait for confirmation that subscription is created before publishing anything. _, err := pubsub.Receive(ctx) if err != nil { panic(err) } // Go channel which receives messages. ch := pubsub.Channel() // Publish a message. err = rdb.Publish(ctx, "mychannel1", "hello").Err() if err != nil { panic(err) } time.AfterFunc(time.Second, func() { // When pubsub is closed channel is closed too. _ = pubsub.Close() }) // Consume messages. for msg := range ch { fmt.Println(msg.Channel, msg.Payload) }
Output: mychannel1 hello
func (*PubSub) Channel ¶
func (c *PubSub) Channel(opts ...ChannelOption) <-chan *Message
Channel returns a Go channel for concurrently receiving messages. The channel is closed together with the PubSub. If the Go channel is blocked full for 1 minute 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 received for 1 minute.
func (*PubSub) ChannelSize
deprecated
func (*PubSub) ChannelWithSubscriptions ¶
func (c *PubSub) ChannelWithSubscriptions(opts ...ChannelOption) <-chan interface{}
ChannelWithSubscriptions is like Channel, but message type can be either *Subscription or *Message. Subscription messages can be used to detect reconnections.
ChannelWithSubscriptions can not be used together with Channel or ChannelSize.
func (*PubSub) PSubscribe ¶
PSubscribe the client to the given patterns. It returns empty subscription if there are no patterns.
func (*PubSub) PUnsubscribe ¶
PUnsubscribe the client from the given patterns, or from all of them if none is given.
func (*PubSub) Receive ¶
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.
Example ¶
pubsub := rdb.Subscribe(ctx, "mychannel2") defer pubsub.Close() for i := 0; i < 2; i++ { // ReceiveTimeout is a low level API. Use ReceiveMessage instead. 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") } } // sent message to 1 rdb // received hello from mychannel2
Output:
func (*PubSub) ReceiveMessage ¶
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.
func (*PubSub) ReceiveTimeout ¶
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.
func (*PubSub) SSubscribe ¶
SSubscribe Subscribes the client to the specified shard channels.
func (*PubSub) SUnsubscribe ¶
SUnsubscribe unsubscribes the client from the given shard channels, or from all of them if none is given.
type PubSubCmdable ¶
type PubSubCmdable interface { Publish(ctx context.Context, channel string, message interface{}) *IntCmd SPublish(ctx context.Context, channel string, message interface{}) *IntCmd PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd PubSubNumPat(ctx context.Context) *IntCmd PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd }
type RankWithScoreCmd ¶
type RankWithScoreCmd struct {
// contains filtered or unexported fields
}
func NewRankWithScoreCmd ¶
func NewRankWithScoreCmd(ctx context.Context, args ...interface{}) *RankWithScoreCmd
func (*RankWithScoreCmd) Result ¶
func (cmd *RankWithScoreCmd) Result() (RankScore, error)
func (*RankWithScoreCmd) SetFirstKeyPos ¶
func (cmd *RankWithScoreCmd) SetFirstKeyPos(keyPos int8)
func (*RankWithScoreCmd) SetVal ¶
func (cmd *RankWithScoreCmd) SetVal(val RankScore)
func (*RankWithScoreCmd) String ¶
func (cmd *RankWithScoreCmd) String() string
func (*RankWithScoreCmd) Val ¶
func (cmd *RankWithScoreCmd) Val() RankScore
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
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.
func NewRing ¶
func NewRing(opt *RingOptions) *Ring
Example ¶
rdb := redis.NewRing(&redis.RingOptions{ Addrs: map[string]string{ "shard1": ":7000", "shard2": ":7001", "shard3": ":7002", }, }) rdb.Ping(ctx)
Output:
func (Ring) ACLLogReset ¶
func (*Ring) AddHook ¶
func (hs *Ring) AddHook(hook Hook)
AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2:
client.AddHook(hook-1, hook-2)
hook-1:
func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } }
hook-2:
func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } }
The execution sequence is:
hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end
Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed.
func (Ring) BFAdd ¶
BFAdd adds an item to a Bloom filter. For more information - https://redis.io/commands/bf.add/
func (Ring) BFCard ¶
BFCard returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter). For more information - https://redis.io/commands/bf.card/
func (Ring) BFExists ¶
BFExists determines whether a given item was added to a Bloom filter. For more information - https://redis.io/commands/bf.exists/
func (Ring) BFInfo ¶
Returns information about a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Ring) BFInfoArg ¶
BFInfoArg returns information about a specific option of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Ring) BFInfoCapacity ¶
BFInfoCapacity returns information about the capacity of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Ring) BFInfoExpansion ¶
BFInfoExpansion returns information about the expansion rate of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Ring) BFInfoFilters ¶
BFInfoFilters returns information about the filters of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Ring) BFInfoItems ¶
BFInfoItems returns information about the items of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Ring) BFInfoSize ¶
BFInfoSize returns information about the size of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Ring) BFInsert ¶
func (c Ring) BFInsert(ctx context.Context, key string, options *BFInsertOptions, elements ...interface{}) *BoolSliceCmd
BFInsert inserts elements into a Bloom filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. For more information - https://redis.io/commands/bf.insert/
func (Ring) BFLoadChunk ¶
func (c Ring) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
BFLoadChunk restores a Bloom filter previously saved using BF.SCANDUMP. For more information - https://redis.io/commands/bf.loadchunk/
func (Ring) BFMAdd ¶
func (c Ring) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMAdd adds multiple elements to a Bloom filter. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/bf.madd/
func (Ring) BFMExists ¶
func (c Ring) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMExists check if multiple elements exist in a Bloom filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/bf.mexists/
func (Ring) BFReserve ¶
func (c Ring) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserve creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. For more information - https://redis.io/commands/bf.reserve/
func (Ring) BFReserveExpansion ¶
func (c Ring) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
BFReserveExpansion creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying an expansion rate for the filter. For more information - https://redis.io/commands/bf.reserve/
func (Ring) BFReserveNonScaling ¶
func (c Ring) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserveNonScaling creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying that the filter should not scale. For more information - https://redis.io/commands/bf.reserve/
func (Ring) BFReserveWithArgs ¶
func (c Ring) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
BFReserveWithArgs creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying additional options such as expansion rate and non-scaling behavior. For more information - https://redis.io/commands/bf.reserve/
func (Ring) BFScanDump ¶
func (c Ring) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
Begins an incremental save of the Bloom filter. This command is useful for large Bloom filters that cannot fit into the DUMP and RESTORE model. For more information - https://redis.io/commands/bf.scandump/
func (Ring) BRPopLPush ¶
func (Ring) BZMPop ¶
func (c Ring) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd
BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set")
func (Ring) BgRewriteAOF ¶
func (Ring) BitField ¶
func (c Ring) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitField accepts multiple values:
- BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
- BitField([]string{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
- BitField([]interface{}{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
func (Ring) BitFieldRO ¶
func (c Ring) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitFieldRO - Read-only variant of the BITFIELD command. It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas. - BitFieldRO(ctx, key, "<Encoding0>", "<Offset0>", "<Encoding1>","<Offset1>")
func (Ring) BitPos ¶
BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`.
func (Ring) BitPosSpan ¶
func (c Ring) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte
func (Ring) CFAdd ¶
CFAdd adds an element to a Cuckoo filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.add/
func (Ring) CFAddNX ¶
CFAddNX adds an element to a Cuckoo filter only if it does not already exist in the filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.addnx/
func (Ring) CFCount ¶
CFCount returns an estimate of the number of times an element may be in a Cuckoo Filter. For more information - https://redis.io/commands/cf.count/
func (Ring) CFDel ¶
CFDel deletes an item once from the cuckoo filter. For more information - https://redis.io/commands/cf.del/
func (Ring) CFExists ¶
CFExists determines whether an item may exist in the Cuckoo Filter or not. For more information - https://redis.io/commands/cf.exists/
func (Ring) CFInfo ¶
CFInfo returns information about a Cuckoo filter. For more information - https://redis.io/commands/cf.info/
func (Ring) CFInsert ¶
func (c Ring) CFInsert(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *BoolSliceCmd
CFInsert inserts elements into a Cuckoo filter. This function also allows for specifying additional options such as capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insert/
func (Ring) CFInsertNX ¶
func (c Ring) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *IntSliceCmd
CFInsertNX inserts elements into a Cuckoo filter only if they do not already exist in the filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of integers indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insertnx/
func (Ring) CFLoadChunk ¶
func (c Ring) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
CFLoadChunk restores a filter previously saved using SCANDUMP. For more information - https://redis.io/commands/cf.loadchunk/
func (Ring) CFMExists ¶
func (c Ring) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
CFMExists check if multiple elements exist in a Cuckoo filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/cf.mexists/
func (Ring) CFReserve ¶
CFReserve creates an empty Cuckoo filter with the specified capacity. For more information - https://redis.io/commands/cf.reserve/
func (Ring) CFReserveBucketSize ¶
func (c Ring) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
CFReserveBucketSize creates an empty Cuckoo filter with the specified capacity and bucket size. For more information - https://redis.io/commands/cf.reserve/
func (Ring) CFReserveExpansion ¶
func (c Ring) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
CFReserveExpansion creates an empty Cuckoo filter with the specified capacity and expansion rate. For more information - https://redis.io/commands/cf.reserve/
func (Ring) CFReserveMaxIterations ¶
func (c Ring) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
CFReserveMaxIterations creates an empty Cuckoo filter with the specified capacity and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Ring) CFReserveWithArgs ¶
func (c Ring) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
CFReserveWithArgs creates an empty Cuckoo filter with the specified options. This function allows for specifying additional options such as bucket size and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Ring) CFScanDump ¶
func (c Ring) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
CFScanDump begins an incremental save of the cuckoo filter. For more information - https://redis.io/commands/cf.scandump/
func (Ring) CMSIncrBy ¶
func (c Ring) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSIncrBy increments the count of one or more items in a Count-Min Sketch filter. Returns an array of integers representing the updated count of each item. For more information - https://redis.io/commands/cms.incrby/
func (Ring) CMSInfo ¶
func (c Ring) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
CMSInfo returns information about a Count-Min Sketch filter. For more information - https://redis.io/commands/cms.info/
func (Ring) CMSInitByDim ¶
CMSInitByDim creates an empty Count-Min Sketch filter with the specified dimensions. For more information - https://redis.io/commands/cms.initbydim/
func (Ring) CMSInitByProb ¶
func (c Ring) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
CMSInitByProb creates an empty Count-Min Sketch filter with the specified error rate and probability. For more information - https://redis.io/commands/cms.initbyprob/
func (Ring) CMSMerge ¶
CMSMerge merges multiple Count-Min Sketch filters into a single filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Ring) CMSMergeWithWeight ¶
func (c Ring) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
CMSMergeWithWeight merges multiple Count-Min Sketch filters into a single filter with weights for each source filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Ring) CMSQuery ¶
func (c Ring) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSQuery returns count for item(s). For more information - https://redis.io/commands/cms.query/
func (Ring) ClientGetName ¶
ClientGetName returns the name of the connection.
func (Ring) ClientInfo ¶
func (c Ring) ClientInfo(ctx context.Context) *ClientInfoCmd
func (Ring) ClientKillByFilter ¶
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
func (Ring) ClientList ¶
func (Ring) ClientPause ¶
func (Ring) ClientUnblockWithError ¶
func (Ring) ClientUnpause ¶
func (*Ring) Close ¶
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.
func (Ring) ClusterAddSlots ¶
func (Ring) ClusterAddSlotsRange ¶
func (Ring) ClusterCountFailureReports ¶
func (Ring) ClusterCountKeysInSlot ¶
func (Ring) ClusterDelSlots ¶
func (Ring) ClusterDelSlotsRange ¶
func (Ring) ClusterFailover ¶
func (Ring) ClusterForget ¶
func (Ring) ClusterGetKeysInSlot ¶
func (c Ring) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
func (Ring) ClusterInfo ¶
func (Ring) ClusterLinks ¶
func (c Ring) ClusterLinks(ctx context.Context) *ClusterLinksCmd
func (Ring) ClusterMeet ¶
func (Ring) ClusterMyShardID ¶
func (Ring) ClusterNodes ¶
func (Ring) ClusterReplicate ¶
func (Ring) ClusterResetHard ¶
func (Ring) ClusterResetSoft ¶
func (Ring) ClusterSaveConfig ¶
func (Ring) ClusterShards ¶
func (c Ring) ClusterShards(ctx context.Context) *ClusterShardsCmd
func (Ring) ClusterSlaves ¶
func (c Ring) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
func (Ring) ClusterSlots ¶
func (c Ring) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
func (Ring) Command ¶
func (c Ring) Command(ctx context.Context) *CommandsInfoCmd
func (Ring) CommandGetKeys ¶
func (c Ring) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
func (Ring) CommandGetKeysAndFlags ¶
func (c Ring) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
func (Ring) CommandList ¶
func (c Ring) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
func (Ring) ConfigGet ¶
func (c Ring) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
func (Ring) ConfigResetStat ¶
func (Ring) ConfigRewrite ¶
func (Ring) ExpireTime ¶
func (c Ring) ExpireTime(ctx context.Context, key string) *DurationCmd
func (Ring) FCallRo ¶
func (c Ring) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd
FCallRo this function simply calls FCallRO, Deprecated: to maintain convention FCallRO.
func (Ring) FTAggregate ¶
func (c Ring) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
FTAggregate - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Ring) FTAggregateWithArgs ¶
func (c Ring) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
FTAggregateWithArgs - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. This function also allows for specifying additional options such as: Verbatim, LoadAll, Load, Timeout, GroupBy, SortBy, SortByMax, Apply, LimitOffset, Limit, Filter, WithCursor, Params, and DialectVersion. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Ring) FTAliasAdd ¶
FTAliasAdd - Adds an alias to an index. The 'index' parameter specifies the index to which the alias is added, and the 'alias' parameter specifies the alias. For more information, please refer to the Redis documentation: [FT.ALIASADD]: (https://redis.io/commands/ft.aliasadd/)
func (Ring) FTAliasDel ¶
FTAliasDel - Removes an alias from an index. The 'alias' parameter specifies the alias to be removed. For more information, please refer to the Redis documentation: [FT.ALIASDEL]: (https://redis.io/commands/ft.aliasdel/)
func (Ring) FTAliasUpdate ¶
FTAliasUpdate - Updates an alias to an index. The 'index' parameter specifies the index to which the alias is updated, and the 'alias' parameter specifies the alias. If the alias already exists for a different index, it updates the alias to point to the specified index instead. For more information, please refer to the Redis documentation: [FT.ALIASUPDATE]: (https://redis.io/commands/ft.aliasupdate/)
func (Ring) FTAlter ¶
func (c Ring) FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd
FTAlter - Alters the definition of an existing index. The 'index' parameter specifies the index to alter, and the 'skipInitialScan' parameter specifies whether to skip the initial scan. The 'definition' parameter specifies the new definition for the index. For more information, please refer to the Redis documentation: [FT.ALTER]: (https://redis.io/commands/ft.alter/)
func (Ring) FTConfigGet ¶
func (c Ring) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
FTConfigGet - Retrieves the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to retrieve. For more information, please refer to the Redis documentation: [FT.CONFIG GET]: (https://redis.io/commands/ft.config-get/)
func (Ring) FTConfigSet ¶
FTConfigSet - Sets the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to set, and the 'value' parameter specifies the new value. For more information, please refer to the Redis documentation: [FT.CONFIG SET]: (https://redis.io/commands/ft.config-set/)
func (Ring) FTCreate ¶
func (c Ring) FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd
FTCreate - Creates a new index with the given options and schema. The 'index' parameter specifies the name of the index to create. The 'options' parameter specifies various options for the index, such as: whether to index hashes or JSONs, prefixes, filters, default language, score, score field, payload field, etc. The 'schema' parameter specifies the schema for the index, which includes the field name, field type, etc. For more information, please refer to the Redis documentation: [FT.CREATE]: (https://redis.io/commands/ft.create/)
func (Ring) FTCursorDel ¶
FTCursorDel - Deletes a cursor from an existing index. The 'index' parameter specifies the index from which to delete the cursor, and the 'cursorId' parameter specifies the ID of the cursor to delete. For more information, please refer to the Redis documentation: [FT.CURSOR DEL]: (https://redis.io/commands/ft.cursor-del/)
func (Ring) FTCursorRead ¶
func (c Ring) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
FTCursorRead - Reads the next results from an existing cursor. The 'index' parameter specifies the index from which to read the cursor, the 'cursorId' parameter specifies the ID of the cursor to read, and the 'count' parameter specifies the number of results to read. For more information, please refer to the Redis documentation: [FT.CURSOR READ]: (https://redis.io/commands/ft.cursor-read/)
func (Ring) FTDictAdd ¶
FTDictAdd - Adds terms to a dictionary. The 'dict' parameter specifies the dictionary to which to add the terms, and the 'term' parameter specifies the terms to add. For more information, please refer to the Redis documentation: [FT.DICTADD]: (https://redis.io/commands/ft.dictadd/)
func (Ring) FTDictDel ¶
FTDictDel - Deletes terms from a dictionary. The 'dict' parameter specifies the dictionary from which to delete the terms, and the 'term' parameter specifies the terms to delete. For more information, please refer to the Redis documentation: [FT.DICTDEL]: (https://redis.io/commands/ft.dictdel/)
func (Ring) FTDictDump ¶
func (c Ring) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
FTDictDump - Returns all terms in the specified dictionary. The 'dict' parameter specifies the dictionary from which to return the terms. For more information, please refer to the Redis documentation: [FT.DICTDUMP]: (https://redis.io/commands/ft.dictdump/)
func (Ring) FTDropIndex ¶
FTDropIndex - Deletes an index. The 'index' parameter specifies the index to delete. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Ring) FTDropIndexWithArgs ¶
func (c Ring) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
FTDropIndexWithArgs - Deletes an index with options. The 'index' parameter specifies the index to delete, and the 'options' parameter specifies the DeleteDocs option for docs deletion. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Ring) FTExplain ¶
FTExplain - Returns the execution plan for a complex query. The 'index' parameter specifies the index to query, and the 'query' parameter specifies the query string. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Ring) FTExplainCli ¶
FTExplainCli - Returns the execution plan for a complex query. [Not Implemented] For more information, see https://redis.io/commands/ft.explaincli/
func (Ring) FTExplainWithArgs ¶
func (c Ring) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
FTExplainWithArgs - Returns the execution plan for a complex query with options. The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Ring) FTInfo ¶
FTInfo - Retrieves information about an index. The 'index' parameter specifies the index to retrieve information about. For more information, please refer to the Redis documentation: [FT.INFO]: (https://redis.io/commands/ft.info/)
func (Ring) FTSearch ¶
func (c Ring) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
FTSearch - Executes a search query on an index. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Ring) FTSearchWithArgs ¶
func (c Ring) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
FTSearchWithArgs - Executes a search query on an index with additional options. The 'index' parameter specifies the index to search, the 'query' parameter specifies the search query, and the 'options' parameter specifies additional options for the search. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Ring) FTSpellCheck ¶
func (c Ring) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
FTSpellCheck - Checks a query string for spelling errors. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Ring) FTSpellCheckWithArgs ¶
func (c Ring) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
FTSpellCheckWithArgs - Checks a query string for spelling errors with additional options. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Ring) FTSynDump ¶
func (c Ring) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
FTSynDump - Dumps the contents of a synonym group. The 'index' parameter specifies the index to dump. For more information, please refer to the Redis documentation: [FT.SYNDUMP]: (https://redis.io/commands/ft.syndump/)
func (Ring) FTSynUpdate ¶
func (c Ring) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
FTSynUpdate - Creates or updates a synonym group with additional terms. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Ring) FTSynUpdateWithArgs ¶
func (c Ring) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd
FTSynUpdateWithArgs - Creates or updates a synonym group with additional terms and options. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, the 'options' parameter specifies additional options for the update, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Ring) FTTagVals ¶
func (c Ring) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
FTTagVals - Returns all distinct values indexed in a tag field. The 'index' parameter specifies the index to check, and the 'field' parameter specifies the tag field to retrieve values from. For more information, please refer to the Redis documentation: [FT.TAGVALS]: (https://redis.io/commands/ft.tagvals/)
func (Ring) FT_List ¶
func (c Ring) FT_List(ctx context.Context) *StringSliceCmd
FT_List - Lists all the existing indexes in the database. For more information, please refer to the Redis documentation: [FT._LIST]: (https://redis.io/commands/ft._list/)
func (Ring) FlushAllAsync ¶
func (Ring) FlushDBAsync ¶
func (*Ring) ForEachShard ¶
func (c *Ring) ForEachShard( ctx context.Context, fn func(ctx context.Context, client *Client) error, ) error
ForEachShard concurrently calls the fn on each live shard in the ring. It returns the first error if any.
func (Ring) FunctionDelete ¶
func (Ring) FunctionDump ¶
func (Ring) FunctionFlush ¶
func (Ring) FunctionFlushAsync ¶
func (Ring) FunctionKill ¶
func (Ring) FunctionList ¶
func (c Ring) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
func (Ring) FunctionLoadReplace ¶
func (Ring) FunctionRestore ¶
func (Ring) FunctionStats ¶
func (c Ring) FunctionStats(ctx context.Context) *FunctionStatsCmd
func (Ring) GeoAdd ¶
func (c Ring) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
func (Ring) GeoHash ¶
func (c Ring) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
func (Ring) GeoRadius ¶
func (c Ring) GeoRadius( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
func (Ring) GeoRadiusByMember ¶
func (c Ring) GeoRadiusByMember( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
func (Ring) GeoRadiusByMemberStore ¶
func (c Ring) GeoRadiusByMemberStore( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
func (Ring) GeoRadiusStore ¶
func (c Ring) GeoRadiusStore( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
func (Ring) GeoSearch ¶
func (c Ring) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
func (Ring) GeoSearchLocation ¶
func (c Ring) GeoSearchLocation( ctx context.Context, key string, q *GeoSearchLocationQuery, ) *GeoSearchLocationCmd
func (Ring) GeoSearchStore ¶
func (c Ring) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
func (Ring) GetEx ¶
GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0.
func (Ring) HExpire ¶
func (c Ring) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Ring) HExpireAt ¶
func (c Ring) HExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds. Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields. The command sets absolute expiration times based on the UNIX timestamp provided. For more information - https://redis.io/commands/hexpireat/
func (Ring) HExpireAtWithArgs ¶
func (c Ring) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Ring) HExpireTime ¶
func (c Ring) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds. Requires a key and the fields themselves to fetch their expiration timestamps. This command returns the expiration times for each field or error/status codes for each field as specified. For more information - https://redis.io/commands/hexpiretime/
func (Ring) HExpireWithArgs ¶
func (c Ring) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Ring) HIncrByFloat ¶
func (Ring) HMGet ¶
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.
func (Ring) HPExpire ¶
func (c Ring) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HPExpire - Sets the expiration time for specified fields in a hash in milliseconds. Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields. The command modifies the standard time.Duration to milliseconds for the Redis command. For more information - https://redis.io/commands/hpexpire/
func (Ring) HPExpireAt ¶
func (c Ring) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds. Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds. For more information - https://redis.io/commands/hpexpireat/
func (Ring) HPExpireAtWithArgs ¶
func (c Ring) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Ring) HPExpireTime ¶
func (c Ring) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds. Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters. Provides the expiration timestamp for each field in milliseconds. For more information - https://redis.io/commands/hexpiretime/
func (Ring) HPExpireWithArgs ¶
func (c Ring) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Ring) HPTTL ¶
func (c Ring) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds. Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields. This command provides the TTL in milliseconds for each field or returns error/status codes as needed. For more information - https://redis.io/commands/hpttl/
func (Ring) HPersist ¶
func (c Ring) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPersist - Removes the expiration time from specified fields in a hash. Accepts a key and the fields themselves. This command ensures that each field specified will have its expiration removed if present. For more information - https://redis.io/commands/hpersist/
func (Ring) HRandField ¶
func (c Ring) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
func (Ring) HRandFieldWithValues ¶
func (c Ring) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
func (Ring) HScanNoValues ¶
func (Ring) HSet ¶
HSet accepts values in following formats:
HSet("myhash", "key1", "value1", "key2", "value2")
HSet("myhash", []string{"key1", "value1", "key2", "value2"})
HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` }
HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface.
Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute.
func (Ring) HTTL ¶
func (c Ring) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds. Requires a key and the fields themselves. It returns the TTL for each specified field. This command fetches the TTL in seconds for each field or returns error/status codes as appropriate. For more information - https://redis.io/commands/httl/
func (Ring) IncrByFloat ¶
func (Ring) JSONArrAppend ¶
func (c Ring) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
JSONArrAppend adds the provided JSON values to the end of the array at the given path. For more information, see https://redis.io/commands/json.arrappend
func (Ring) JSONArrIndex ¶
func (c Ring) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
JSONArrIndex searches for the first occurrence of the provided JSON value in the array at the given path. For more information, see https://redis.io/commands/json.arrindex
func (Ring) JSONArrIndexWithArgs ¶
func (c Ring) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, value ...interface{}) *IntSliceCmd
JSONArrIndexWithArgs searches for the first occurrence of a JSON value in an array while allowing the start and stop options to be provided. For more information, see https://redis.io/commands/json.arrindex
func (Ring) JSONArrInsert ¶
func (c Ring) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
JSONArrInsert inserts the JSON values into the array at the specified path before the index (shifts to the right). For more information, see https://redis.io/commands/json.arrinsert
func (Ring) JSONArrLen ¶
func (c Ring) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
JSONArrLen reports the length of the JSON array at the specified path in the given key. For more information, see https://redis.io/commands/json.arrlen
func (Ring) JSONArrPop ¶
func (c Ring) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
JSONArrPop removes and returns an element from the specified index in the array. For more information, see https://redis.io/commands/json.arrpop
func (Ring) JSONArrTrim ¶
func (c Ring) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
JSONArrTrim trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Ring) JSONArrTrimWithArgs ¶
func (c Ring) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
JSONArrTrimWithArgs trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Ring) JSONClear ¶
JSONClear clears container values (arrays/objects) and sets numeric values to 0. For more information, see https://redis.io/commands/json.clear
func (Ring) JSONDebugMemory ¶
JSONDebugMemory reports a value's memory usage in bytes (unimplemented) For more information, see https://redis.io/commands/json.debug-memory
func (Ring) JSONDel ¶
JSONDel deletes a value. For more information, see https://redis.io/commands/json.del
func (Ring) JSONForget ¶
JSONForget deletes a value. For more information, see https://redis.io/commands/json.forget
func (Ring) JSONGet ¶
JSONGet returns the value at path in JSON serialized form. JSON.GET returns an array of strings. This function parses out the wrapping array but leaves the internal strings unprocessed by default (see Val()) For more information - https://redis.io/commands/json.get/
func (Ring) JSONGetWithArgs ¶
func (c Ring) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
JSONGetWithArgs - Retrieves the value of a key from a JSON document. This function also allows for specifying additional options such as: Indention, NewLine and Space For more information - https://redis.io/commands/json.get/
func (Ring) JSONMGet ¶
func (c Ring) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
JSONMGet returns the values at the specified path from multiple key arguments. Note - the arguments are reversed when compared with `JSON.MGET` as we want to follow the pattern of having the last argument be variable. For more information, see https://redis.io/commands/json.mget
func (Ring) JSONMSetArgs ¶
func (c Ring) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
JSONMSetArgs sets or updates one or more JSON values according to the specified key-path-value triplets. For more information, see https://redis.io/commands/json.mset
func (Ring) JSONMerge ¶
JSONMerge merges a given JSON value into matching paths. For more information, see https://redis.io/commands/json.merge
func (Ring) JSONNumIncrBy ¶
JSONNumIncrBy increments the number value stored at the specified path by the provided number. For more information, see https://redis.io/docs/latest/commands/json.numincrby/
func (Ring) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by the specified path. For more information, see https://redis.io/commands/json.objkeys
func (Ring) JSONObjLen ¶
func (c Ring) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONObjLen reports the number of keys in the JSON object at the specified path in the given key. For more information, see https://redis.io/commands/json.objlen
func (Ring) JSONSet ¶
JSONSet sets the JSON value at the given path in the given key. The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or a []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Ring) JSONSetMode ¶
func (c Ring) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
JSONSetMode sets the JSON value at the given path in the given key and allows the mode to be set (the mode value must be "XX" or "NX"). The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Ring) JSONStrAppend ¶
func (c Ring) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
JSONStrAppend appends the JSON-string values to the string at the specified path. For more information, see https://redis.io/commands/json.strappend
func (Ring) JSONStrLen ¶
func (c Ring) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONStrLen reports the length of the JSON String at the specified path in the given key. For more information, see https://redis.io/commands/json.strlen
func (Ring) JSONToggle ¶
func (c Ring) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONToggle toggles a Boolean value stored at the specified path. For more information, see https://redis.io/commands/json.toggle
func (Ring) JSONType ¶
func (c Ring) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
JSONType reports the type of JSON value at the specified path. For more information, see https://redis.io/commands/json.type
func (Ring) LInsertAfter ¶
func (Ring) LInsertBefore ¶
func (Ring) LMPop ¶
func (c Ring) LMPop(ctx context.Context, direction string, count int64, keys ...string) *KeyValuesCmd
LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2")
func (Ring) LPopCount ¶
func (c Ring) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Ring) LRange ¶
func (c Ring) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Ring) MSet ¶
MSet is like Set but accepts multiple values:
- MSet("key1", "value1", "key2", "value2")
- MSet([]string{"key1", "value1", "key2", "value2"})
- MSet(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSet(struct), For struct types, see HSet description.
func (Ring) MSetNX ¶
MSetNX is like SetNX but accepts multiple values:
- MSetNX("key1", "value1", "key2", "value2")
- MSetNX([]string{"key1", "value1", "key2", "value2"})
- MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSetNX(struct), For struct types, see HSet description.
func (Ring) MemoryUsage ¶
func (Ring) ModuleLoadex ¶
func (c Ring) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
ModuleLoadex Redis `MODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS args [args ...]]` command.
func (Ring) Monitor ¶
func (c Ring) Monitor(ctx context.Context, ch chan string) *MonitorCmd
Monitor - represents a Redis MONITOR command, allowing the user to capture and process all commands sent to a Redis server. This mimics the behavior of MONITOR in the redis-cli.
Notes: - Using MONITOR blocks the connection to the server for itself. It needs a dedicated connection - The user should create a channel of type string - This runs concurrently in the background. Trigger via the Start and Stop functions See further: Redis MONITOR command: https://redis.io/commands/monitor
func (Ring) ObjectEncoding ¶
func (Ring) ObjectIdleTime ¶
func (c Ring) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
func (*Ring) Options ¶
func (c *Ring) Options() *RingOptions
Options returns read-only Options that were used to create the client.
func (Ring) PExpireTime ¶
func (c Ring) PExpireTime(ctx context.Context, key string) *DurationCmd
func (*Ring) PSubscribe ¶
PSubscribe subscribes the client to the given patterns.
func (Ring) PubSubChannels ¶
func (c Ring) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Ring) PubSubNumPat ¶
func (Ring) PubSubNumSub ¶
func (c Ring) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Ring) PubSubShardChannels ¶
func (c Ring) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Ring) PubSubShardNumSub ¶
func (c Ring) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Ring) RPopCount ¶
func (c Ring) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Ring) RestoreReplace ¶
func (Ring) SDiffStore ¶
func (Ring) SInterCard ¶
func (Ring) SInterStore ¶
func (Ring) SMIsMember ¶
func (c Ring) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
func (Ring) SMembers ¶
func (c Ring) SMembers(ctx context.Context, key string) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
func (Ring) SMembersMap ¶
func (c Ring) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
func (Ring) SPopN ¶
func (c Ring) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
SPopN Redis `SPOP key count` command.
func (Ring) SRandMember ¶
SRandMember Redis `SRANDMEMBER key` command.
func (Ring) SRandMemberN ¶
func (c Ring) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
SRandMemberN Redis `SRANDMEMBER key count` command.
func (*Ring) SSubscribe ¶
SSubscribe Subscribes the client to the specified shard channels.
func (Ring) SUnionStore ¶
func (Ring) ScriptExists ¶
func (c Ring) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
func (Ring) ScriptFlush ¶
func (Ring) ScriptKill ¶
func (Ring) Set ¶
func (c Ring) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Ring) SetArgs ¶
SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options.
func (Ring) SetEx ¶
func (c Ring) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
func (Ring) SetNX ¶
func (c Ring) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetNX Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Ring) SetXX ¶
func (c Ring) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetXX Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Ring) ShutdownNoSave ¶
func (Ring) ShutdownSave ¶
func (Ring) SlowLogGet ¶
func (c Ring) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
func (Ring) SortInterfaces ¶
func (Ring) SortRO ¶
func (c Ring) SortRO(ctx context.Context, key string, sort *Sort) *StringSliceCmd
func (Ring) TDigestAdd ¶
TDigestAdd adds one or more elements to a t-Digest data structure. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.add/
func (Ring) TDigestByRank ¶
func (c Ring) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRank returns an array of values from a t-Digest data structure based on their rank. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrank/
func (Ring) TDigestByRevRank ¶
func (c Ring) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRevRank returns an array of values from a t-Digest data structure based on their reverse rank. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrevrank/
func (Ring) TDigestCDF ¶
func (c Ring) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestCDF returns an array of cumulative distribution function (CDF) values for one or more elements in a t-Digest data structure. The CDF value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the CDF values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.cdf/
func (Ring) TDigestCreate ¶
TDigestCreate creates an empty t-Digest data structure with default parameters. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Ring) TDigestCreateWithCompression ¶
func (c Ring) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
TDigestCreateWithCompression creates an empty t-Digest data structure with a specified compression parameter. The compression parameter controls the accuracy and memory usage of the t-Digest. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Ring) TDigestInfo ¶
func (c Ring) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
TDigestInfo returns information about a t-Digest data structure. For more information - https://redis.io/commands/tdigest.info/
func (Ring) TDigestMax ¶
TDigestMax returns the maximum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.max/
func (Ring) TDigestMerge ¶
func (c Ring) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, sourceKeys ...string) *StatusCmd
TDigestMerge merges multiple t-Digest data structures into a single t-Digest. This function also allows for specifying additional options such as compression and override behavior. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.merge/
func (Ring) TDigestMin ¶
TDigestMin returns the minimum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.min/
func (Ring) TDigestQuantile ¶
func (c Ring) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestQuantile returns an array of quantile values for one or more elements in a t-Digest data structure. The quantile value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the quantile values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.quantile/
func (Ring) TDigestRank ¶
func (c Ring) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRank returns an array of rank values for one or more elements in a t-Digest data structure. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of integers representing the rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.rank/
func (Ring) TDigestReset ¶
TDigestReset resets a t-Digest data structure to its initial state. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.reset/
func (Ring) TDigestRevRank ¶
func (c Ring) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRevRank returns an array of reverse rank values for one or more elements in a t-Digest data structure. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of integers representing the reverse rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.revrank/
func (Ring) TDigestTrimmedMean ¶
func (c Ring) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
TDigestTrimmedMean returns the trimmed mean value from a t-Digest data structure. The trimmed mean is calculated by removing a specified fraction of the highest and lowest values from the t-Digest and then calculating the mean of the remaining values. Returns a float representing the trimmed mean value or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.trimmed_mean/
func (Ring) TFCall ¶
TFCall - invoke a function. For more information - https://redis.io/commands/tfcall/
func (Ring) TFCallASYNC ¶
TFCallASYNC - invoke an asynchronous JavaScript function (coroutine). For more information - https://redis.io/commands/TFCallASYNC/
func (Ring) TFCallASYNCArgs ¶
func (Ring) TFCallArgs ¶
func (Ring) TFunctionDelete ¶
TFunctionDelete - delete a JavaScript library from Redis. For more information - https://redis.io/commands/tfunction-delete/
func (Ring) TFunctionList ¶
func (c Ring) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
TFunctionList - list the functions with additional information about each function. For more information - https://redis.io/commands/tfunction-list/
func (Ring) TFunctionListArgs ¶
func (c Ring) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
func (Ring) TFunctionLoad ¶
TFunctionLoad - load a new JavaScript library into Redis. For more information - https://redis.io/commands/tfunction-load/
func (Ring) TFunctionLoadArgs ¶
func (c Ring) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
func (Ring) TSAdd ¶
TSAdd - Adds one or more observations to a t-digest sketch. For more information - https://redis.io/commands/ts.add/
func (Ring) TSAddWithArgs ¶
func (c Ring) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, options *TSOptions) *IntCmd
TSAddWithArgs - Adds one or more observations to a t-digest sketch. This function also allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.add/
func (Ring) TSAlter ¶
func (c Ring) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
TSAlter - Alters an existing time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize and DuplicatePolicy. For more information - https://redis.io/commands/ts.alter/
func (Ring) TSCreate ¶
TSCreate - Creates a new time-series key. For more information - https://redis.io/commands/ts.create/
func (Ring) TSCreateRule ¶
func (c Ring) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int) *StatusCmd
TSCreateRule - Creates a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.createrule/
func (Ring) TSCreateRuleWithArgs ¶
func (c Ring) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd
TSCreateRuleWithArgs - Creates a compaction rule from sourceKey to destKey with additional option. This function allows for specifying additional option such as: alignTimestamp. For more information - https://redis.io/commands/ts.createrule/
func (Ring) TSCreateWithArgs ¶
TSCreateWithArgs - Creates a new time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.create/
func (Ring) TSDecrBy ¶
TSDecrBy - Decrements the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.decrby/
func (Ring) TSDecrByWithArgs ¶
func (c Ring) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSDecrByWithArgs - Decrements the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.decrby/
func (Ring) TSDel ¶
TSDel - Deletes a range of samples from a time-series key. For more information - https://redis.io/commands/ts.del/
func (Ring) TSDeleteRule ¶
TSDeleteRule - Deletes a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.deleterule/
func (Ring) TSGet ¶
func (c Ring) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
TSGet - Gets the last sample of a time-series key. For more information - https://redis.io/commands/ts.get/
func (Ring) TSGetWithArgs ¶
func (c Ring) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
TSGetWithArgs - Gets the last sample of a time-series key with additional option. This function allows for specifying additional option such as: Latest. For more information - https://redis.io/commands/ts.get/
func (Ring) TSIncrBy ¶
TSIncrBy - Increments the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.incrby/
func (Ring) TSIncrByWithArgs ¶
func (c Ring) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSIncrByWithArgs - Increments the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.incrby/
func (Ring) TSInfo ¶
func (c Ring) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
TSInfo - Returns information about a time-series key. For more information - https://redis.io/commands/ts.info/
func (Ring) TSInfoWithArgs ¶
func (c Ring) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
TSInfoWithArgs - Returns information about a time-series key with additional option. This function allows for specifying additional option such as: Debug. For more information - https://redis.io/commands/ts.info/
func (Ring) TSMAdd ¶
func (c Ring) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
TSMAdd - Adds multiple samples to multiple time-series keys. It accepts a slice of 'ktv' slices, each containing exactly three elements: key, timestamp, and value. This struct must be provided for this command to work. For more information - https://redis.io/commands/ts.madd/
func (Ring) TSMGet ¶
func (c Ring) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
TSMGet - Returns the last sample of multiple time-series keys. For more information - https://redis.io/commands/ts.mget/
func (Ring) TSMGetWithArgs ¶
func (c Ring) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
TSMGetWithArgs - Returns the last sample of multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, WithLabels and SelectedLabels. For more information - https://redis.io/commands/ts.mget/
func (Ring) TSMRange ¶
func (c Ring) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRange - Returns a range of samples from multiple time-series keys. For more information - https://redis.io/commands/ts.mrange/
func (Ring) TSMRangeWithArgs ¶
func (c Ring) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRangeOptions) *MapStringSliceInterfaceCmd
TSMRangeWithArgs - Returns a range of samples from multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrange/
func (Ring) TSMRevRange ¶
func (c Ring) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRevRange - Returns a range of samples from multiple time-series keys in reverse order. For more information - https://redis.io/commands/ts.mrevrange/
func (Ring) TSMRevRangeWithArgs ¶
func (c Ring) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRevRangeOptions) *MapStringSliceInterfaceCmd
TSMRevRangeWithArgs - Returns a range of samples from multiple time-series keys in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrevrange/
func (Ring) TSQueryIndex ¶
func (c Ring) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
TSQueryIndex - Returns all the keys matching the filter expression. For more information - https://redis.io/commands/ts.queryindex/
func (Ring) TSRange ¶
func (c Ring) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRange - Returns a range of samples from a time-series key. For more information - https://redis.io/commands/ts.range/
func (Ring) TSRangeWithArgs ¶
func (c Ring) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRangeOptions) *TSTimestampValueSliceCmd
TSRangeWithArgs - Returns a range of samples from a time-series key with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.range/
func (Ring) TSRevRange ¶
func (c Ring) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRevRange - Returns a range of samples from a time-series key in reverse order. For more information - https://redis.io/commands/ts.revrange/
func (Ring) TSRevRangeWithArgs ¶
func (c Ring) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRevRangeOptions) *TSTimestampValueSliceCmd
TSRevRangeWithArgs - Returns a range of samples from a time-series key in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.revrange/
func (Ring) TopKAdd ¶
func (c Ring) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKAdd adds one or more elements to a Top-K filter. Returns an array of strings representing the items that were removed from the filter, if any. For more information - https://redis.io/commands/topk.add/
func (Ring) TopKCount ¶
func (c Ring) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
TopKCount returns an estimate of the number of times an item may be in a Top-K filter. For more information - https://redis.io/commands/topk.count/
func (Ring) TopKIncrBy ¶
func (c Ring) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKIncrBy increases the count of one or more items in a Top-K filter. For more information - https://redis.io/commands/topk.incrby/
func (Ring) TopKInfo ¶
func (c Ring) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
TopKInfo returns information about a Top-K filter. For more information - https://redis.io/commands/topk.info/
func (Ring) TopKList ¶
func (c Ring) TopKList(ctx context.Context, key string) *StringSliceCmd
TopKList returns all items in Top-K list. For more information - https://redis.io/commands/topk.list/
func (Ring) TopKListWithCount ¶
func (c Ring) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
TopKListWithCount returns all items in Top-K list with their respective count. For more information - https://redis.io/commands/topk.list/
func (Ring) TopKQuery ¶
func (c Ring) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
TopKQuery check if multiple elements exist in a Top-K filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/topk.query/
func (Ring) TopKReserve ¶
TopKReserve creates an empty Top-K filter with the specified number of top items to keep. For more information - https://redis.io/commands/topk.reserve/
func (Ring) TopKReserveWithOptions ¶
func (c Ring) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
TopKReserveWithOptions creates an empty Top-K filter with the specified number of top items to keep and additional options. This function allows for specifying additional options such as width, depth and decay. For more information - https://redis.io/commands/topk.reserve/
func (*Ring) TxPipeline ¶
func (*Ring) TxPipelined ¶
func (Ring) XAutoClaim ¶
func (c Ring) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
func (Ring) XAutoClaimJustID ¶
func (c Ring) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
func (Ring) XClaim ¶
func (c Ring) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
func (Ring) XClaimJustID ¶
func (c Ring) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
func (Ring) XGroupCreate ¶
func (Ring) XGroupCreateConsumer ¶
func (Ring) XGroupCreateMkStream ¶
func (Ring) XGroupDelConsumer ¶
func (Ring) XGroupDestroy ¶
func (Ring) XGroupSetID ¶
func (Ring) XInfoConsumers ¶
func (c Ring) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
func (Ring) XInfoGroups ¶
func (c Ring) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
func (Ring) XInfoStream ¶
func (c Ring) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
func (Ring) XInfoStreamFull ¶
func (c Ring) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0.
func (Ring) XPending ¶
func (c Ring) XPending(ctx context.Context, stream, group string) *XPendingCmd
func (Ring) XPendingExt ¶
func (c Ring) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
func (Ring) XRange ¶
func (c Ring) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Ring) XRangeN ¶
func (c Ring) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Ring) XReadGroup ¶
func (c Ring) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
func (Ring) XReadStreams ¶
func (c Ring) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
func (Ring) XRevRange ¶
func (c Ring) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Ring) XRevRangeN ¶
func (c Ring) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Ring) XTrimMaxLen ¶
XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen
func (Ring) XTrimMaxLenApprox ¶
func (Ring) XTrimMinID ¶
func (Ring) XTrimMinIDApprox ¶
func (Ring) ZAddArgsIncr ¶
func (Ring) ZDiff ¶
func (c Ring) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
func (Ring) ZDiffStore ¶
ZDiffStore redis-server version >=6.2.0.
func (Ring) ZDiffWithScores ¶
ZDiffWithScores redis-server version >= 6.2.0.
func (Ring) ZInterCard ¶
func (Ring) ZInterStore ¶
func (Ring) ZInterWithScores ¶
func (Ring) ZMPop ¶
func (c Ring) ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd
ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2")
func (Ring) ZMScore ¶
func (c Ring) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
func (Ring) ZRandMember ¶
func (c Ring) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
func (Ring) ZRandMemberWithScores ¶
ZRandMemberWithScores redis-server version >= 6.2.0.
func (Ring) ZRange ¶
func (c Ring) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Ring) ZRangeArgs ¶
func (c Ring) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
func (Ring) ZRangeArgsWithScores ¶
func (c Ring) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
func (Ring) ZRangeByLex ¶
func (c Ring) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Ring) ZRangeByScore ¶
func (c Ring) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Ring) ZRangeByScoreWithScores ¶
func (Ring) ZRangeStore ¶
func (c Ring) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
func (Ring) ZRangeWithScores ¶
func (Ring) ZRankWithScore ¶
func (c Ring) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
ZRankWithScore according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Ring) ZRemRangeByLex ¶
func (Ring) ZRemRangeByRank ¶
func (Ring) ZRemRangeByScore ¶
func (Ring) ZRevRange ¶
func (c Ring) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Ring) ZRevRangeByLex ¶
func (c Ring) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Ring) ZRevRangeByScore ¶
func (c Ring) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Ring) ZRevRangeByScoreWithScores ¶
func (Ring) ZRevRangeWithScores ¶
ZRevRangeWithScores according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Ring) ZRevRankWithScore ¶
func (c Ring) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
func (Ring) ZUnionStore ¶
type RingOptions ¶
type RingOptions struct { // Map of name => host:port addresses of ring shards. Addrs map[string]string // NewClient creates a shard client with provided options. NewClient func(opt *Options) *Client // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. ClientName string // Frequency of PING commands sent to check shards availability. // Shard is considered down after 3 subsequent failed checks. HeartbeatFrequency time.Duration // 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. NewConsistentHash func(shards []string) ConsistentHash Dialer func(ctx context.Context, network, addr string) (net.Conn, error) OnConnect func(ctx context.Context, cn *Conn) error Protocol int Username string Password string DB int MaxRetries int MinRetryBackoff time.Duration MaxRetryBackoff time.Duration DialTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration ContextTimeoutEnabled bool // PoolFIFO uses FIFO mode for each node connection pool GET/PUT (default LIFO). PoolFIFO bool PoolSize int PoolTimeout time.Duration MinIdleConns int MaxIdleConns int MaxActiveConns int ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration TLSConfig *tls.Config Limiter Limiter DisableIndentity bool IdentitySuffix string UnstableResp3 bool }
RingOptions are used to configure a ring client and should be passed to NewRing.
type RunningScript ¶
type ScanCmd ¶
type ScanCmd struct {
// contains filtered or unexported fields
}
func NewScanCmd ¶
func NewScanCmdResult ¶
NewScanCmdResult returns a ScanCmd initialised with val and err for testing.
func (*ScanCmd) Iterator ¶
func (cmd *ScanCmd) Iterator() *ScanIterator
Iterator creates a new ScanIterator.
Example ¶
iter := rdb.Scan(ctx, 0, "", 0).Iterator() for iter.Next(ctx) { fmt.Println(iter.Val()) } if err := iter.Err(); err != nil { panic(err) }
Output:
func (*ScanCmd) SetFirstKeyPos ¶
func (cmd *ScanCmd) SetFirstKeyPos(keyPos int8)
type ScanDumpCmd ¶
type ScanDumpCmd struct {
// contains filtered or unexported fields
}
func (*ScanDumpCmd) Result ¶
func (cmd *ScanDumpCmd) Result() (ScanDump, error)
func (*ScanDumpCmd) SetFirstKeyPos ¶
func (cmd *ScanDumpCmd) SetFirstKeyPos(keyPos int8)
func (*ScanDumpCmd) SetVal ¶
func (cmd *ScanDumpCmd) SetVal(val ScanDump)
func (*ScanDumpCmd) String ¶
func (cmd *ScanDumpCmd) String() string
func (*ScanDumpCmd) Val ¶
func (cmd *ScanDumpCmd) Val() ScanDump
type ScanIterator ¶
type ScanIterator struct {
// contains filtered or unexported fields
}
ScanIterator is used to incrementally iterate over a collection of elements.
Example ¶
iter := rdb.Scan(ctx, 0, "", 0).Iterator() for iter.Next(ctx) { fmt.Println(iter.Val()) } if err := iter.Err(); err != nil { panic(err) }
Output:
func (*ScanIterator) Err ¶
func (it *ScanIterator) Err() error
Err returns the last iterator error, if any.
func (*ScanIterator) Next ¶
func (it *ScanIterator) Next(ctx context.Context) bool
Next advances the cursor and returns true if more values can be read.
func (*ScanIterator) Val ¶
func (it *ScanIterator) Val() string
Val returns the key/field at the current cursor position.
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
Example ¶
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)
Output: <nil> redis: nil 42 <nil>
type Scripter ¶
type Scripter interface { Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ScriptLoad(ctx context.Context, script string) *StringCmd }
type ScriptingFunctionsCmdable ¶
type ScriptingFunctionsCmdable interface { Eval(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd EvalSha(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *Cmd EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd ScriptFlush(ctx context.Context) *StatusCmd ScriptKill(ctx context.Context) *StatusCmd ScriptLoad(ctx context.Context, script string) *StringCmd FunctionLoad(ctx context.Context, code string) *StringCmd FunctionLoadReplace(ctx context.Context, code string) *StringCmd FunctionDelete(ctx context.Context, libName string) *StringCmd FunctionFlush(ctx context.Context) *StringCmd FunctionKill(ctx context.Context) *StringCmd FunctionFlushAsync(ctx context.Context) *StringCmd FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd FunctionDump(ctx context.Context) *StringCmd FunctionRestore(ctx context.Context, libDump string) *StringCmd FunctionStats(ctx context.Context) *FunctionStatsCmd FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd }
type SearchAggregator ¶
type SearchAggregator int
func (SearchAggregator) String ¶
func (a SearchAggregator) String() string
type SearchCmdable ¶
type SearchCmdable interface { FT_List(ctx context.Context) *StringSliceCmd FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd FTAliasDel(ctx context.Context, alias string) *StatusCmd FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd FTDictDump(ctx context.Context, dict string) *StringSliceCmd FTDropIndex(ctx context.Context, index string) *StatusCmd FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd FTExplain(ctx context.Context, index string, query string) *StringCmd FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd FTInfo(ctx context.Context, index string) *FTInfoCmd FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd FTSearch(ctx context.Context, index string, query string) *FTSearchCmd FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd FTSynDump(ctx context.Context, index string) *FTSynDumpCmd FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd }
type SearchFieldType ¶
type SearchFieldType int
func (SearchFieldType) String ¶
func (t SearchFieldType) String() string
type SearchQuery ¶
type SearchQuery []interface{}
func FTSearchQuery ¶
func FTSearchQuery(query string, options *FTSearchOptions) SearchQuery
type SentinelClient ¶
type SentinelClient struct {
// contains filtered or unexported fields
}
SentinelClient is a client for a Redis Sentinel.
func NewSentinelClient ¶
func NewSentinelClient(opt *Options) *SentinelClient
func (*SentinelClient) AddHook ¶
func (hs *SentinelClient) AddHook(hook Hook)
AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2:
client.AddHook(hook-1, hook-2)
hook-1:
func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } }
hook-2:
func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } }
The execution sequence is:
hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end
Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed.
func (*SentinelClient) CkQuorum ¶
func (c *SentinelClient) CkQuorum(ctx context.Context, name string) *StringCmd
CkQuorum checks if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover. This command should be used in monitoring systems to check if a Sentinel deployment is ok.
func (SentinelClient) Close ¶
func (c SentinelClient) Close() error
Close closes the client, releasing any open resources.
It is rare to Close a Client, as the Client is meant to be long-lived and shared between many goroutines.
func (*SentinelClient) Failover ¶
func (c *SentinelClient) Failover(ctx context.Context, name string) *StatusCmd
Failover forces a failover as if the master was not reachable, and without asking for agreement to other Sentinels.
func (*SentinelClient) FlushConfig ¶
func (c *SentinelClient) FlushConfig(ctx context.Context) *StatusCmd
FlushConfig forces Sentinel to rewrite its configuration on disk, including the current Sentinel state.
func (*SentinelClient) GetMasterAddrByName ¶
func (c *SentinelClient) GetMasterAddrByName(ctx context.Context, name string) *StringSliceCmd
func (*SentinelClient) Master ¶
func (c *SentinelClient) Master(ctx context.Context, name string) *MapStringStringCmd
Master shows the state and info of the specified master.
func (*SentinelClient) Masters ¶
func (c *SentinelClient) Masters(ctx context.Context) *SliceCmd
Masters shows a list of monitored masters and their state.
func (*SentinelClient) Monitor ¶
func (c *SentinelClient) Monitor(ctx context.Context, name, ip, port, quorum string) *StringCmd
Monitor tells the Sentinel to start monitoring a new master with the specified name, ip, port, and quorum.
func (*SentinelClient) PSubscribe ¶
func (c *SentinelClient) PSubscribe(ctx context.Context, channels ...string) *PubSub
PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription.
func (*SentinelClient) Ping ¶
func (c *SentinelClient) Ping(ctx context.Context) *StringCmd
Ping is used to test if a connection is still alive, or to measure latency.
func (*SentinelClient) Process ¶
func (c *SentinelClient) Process(ctx context.Context, cmd Cmder) error
func (*SentinelClient) Remove ¶
func (c *SentinelClient) Remove(ctx context.Context, name string) *StringCmd
Remove is used in order to remove the specified master: the master will no longer be monitored, and will totally be removed from the internal state of the Sentinel.
func (*SentinelClient) Replicas ¶
func (c *SentinelClient) Replicas(ctx context.Context, name string) *MapStringStringSliceCmd
Replicas shows a list of replicas for the specified master and their state.
func (*SentinelClient) Reset ¶
func (c *SentinelClient) Reset(ctx context.Context, pattern string) *IntCmd
Reset resets all the masters with matching name. The pattern argument is a glob-style pattern. The reset process clears any previous state in a master (including a failover in progress), and removes every replica and sentinel already discovered and associated with the master.
func (*SentinelClient) Sentinels ¶
func (c *SentinelClient) Sentinels(ctx context.Context, name string) *MapStringStringSliceCmd
type SetArgs ¶
type SetArgs struct { // Mode can be `NX` or `XX` or empty. Mode string // Zero `TTL` or `Expiration` means that the key has no expiration time. TTL time.Duration ExpireAt time.Time // When Get is true, the command returns the old value stored at key, or nil when key did not exist. Get bool // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, // otherwise you will receive an error: (error) ERR syntax error. KeepTTL bool }
SetArgs provides arguments for the SetArgs function.
type SetCmdable ¶
type SetCmdable interface { SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd SCard(ctx context.Context, key string) *IntCmd SDiff(ctx context.Context, keys ...string) *StringSliceCmd SDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd SInter(ctx context.Context, keys ...string) *StringSliceCmd SInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd SInterStore(ctx context.Context, destination string, keys ...string) *IntCmd SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd SMembers(ctx context.Context, key string) *StringSliceCmd SMembersMap(ctx context.Context, key string) *StringStructMapCmd SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd SPop(ctx context.Context, key string) *StringCmd SPopN(ctx context.Context, key string, count int64) *StringSliceCmd SRandMember(ctx context.Context, key string) *StringCmd SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd SRem(ctx context.Context, key string, members ...interface{}) *IntCmd SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd SUnion(ctx context.Context, keys ...string) *StringSliceCmd SUnionStore(ctx context.Context, destination string, keys ...string) *IntCmd }
type SliceCmd ¶
type SliceCmd struct {
// contains filtered or unexported fields
}
func NewSliceCmd ¶
func NewSliceResult ¶
NewSliceResult returns a SliceCmd initialised with val and err for testing.
func (*SliceCmd) Scan ¶
Scan scans the results from the map into a destination struct. The map keys are matched in the Redis struct fields by the `redis:"field"` tag.
Example ¶
ExampleSliceCmd_Scan shows how to scan the results of a multi key fetch into a struct.
rdb.FlushDB(ctx) err := rdb.MSet(ctx, "name", "hello", "count", 123, "correct", true).Err() if err != nil { panic(err) } res := rdb.MGet(ctx, "name", "count", "empty", "correct") if res.Err() != nil { panic(err) } type data struct { Name string `redis:"name"` Count int `redis:"count"` Correct bool `redis:"correct"` } // Scan the results into the struct. var d data if err := res.Scan(&d); err != nil { panic(err) } fmt.Println(d)
Output: {hello 123 true}
func (*SliceCmd) SetFirstKeyPos ¶
func (cmd *SliceCmd) SetFirstKeyPos(keyPos int8)
type SlowLogCmd ¶
type SlowLogCmd struct {
// contains filtered or unexported fields
}
func NewSlowLogCmd ¶
func NewSlowLogCmd(ctx context.Context, args ...interface{}) *SlowLogCmd
func (*SlowLogCmd) Result ¶
func (cmd *SlowLogCmd) Result() ([]SlowLog, error)
func (*SlowLogCmd) SetFirstKeyPos ¶
func (cmd *SlowLogCmd) SetFirstKeyPos(keyPos int8)
func (*SlowLogCmd) SetVal ¶
func (cmd *SlowLogCmd) SetVal(val []SlowLog)
func (*SlowLogCmd) String ¶
func (cmd *SlowLogCmd) String() string
func (*SlowLogCmd) Val ¶
func (cmd *SlowLogCmd) Val() []SlowLog
type SortedSetCmdable ¶
type SortedSetCmdable interface { BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd ZAdd(ctx context.Context, key string, members ...Z) *IntCmd ZAddLT(ctx context.Context, key string, members ...Z) *IntCmd ZAddGT(ctx context.Context, key string, members ...Z) *IntCmd ZAddNX(ctx context.Context, key string, members ...Z) *IntCmd ZAddXX(ctx context.Context, key string, members ...Z) *IntCmd ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZCard(ctx context.Context, key string) *IntCmd ZCount(ctx context.Context, key, min, max string) *IntCmd ZLexCount(ctx context.Context, key, min, max string) *IntCmd ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd ZInter(ctx context.Context, store *ZStore) *StringSliceCmd ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd ZInterCard(ctx context.Context, limit int64, keys ...string) *IntCmd ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd ZMPop(ctx context.Context, order string, count int64, keys ...string) *ZSliceWithKeyCmd ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd ZPopMax(ctx context.Context, key string, count ...int64) *ZSliceCmd ZPopMin(ctx context.Context, key string, count ...int64) *ZSliceCmd ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ZRank(ctx context.Context, key, member string) *IntCmd ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd ZRemRangeByLex(ctx context.Context, key, min, max string) *IntCmd ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd ZRevRank(ctx context.Context, key, member string) *IntCmd ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd ZScore(ctx context.Context, key, member string) *FloatCmd ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd ZRandMemberWithScores(ctx context.Context, key string, count int) *ZSliceCmd ZUnion(ctx context.Context, store ZStore) *StringSliceCmd ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd ZDiff(ctx context.Context, keys ...string) *StringSliceCmd ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *ScanCmd }
type SpellCheckResult ¶
type SpellCheckResult struct { Term string Suggestions []SpellCheckSuggestion }
type SpellCheckSuggestion ¶
type SpellCheckTerms ¶
type StatefulCmdable ¶
type StatefulCmdable interface { Cmdable Auth(ctx context.Context, password string) *StatusCmd AuthACL(ctx context.Context, username, password string) *StatusCmd Select(ctx context.Context, index int) *StatusCmd SwapDB(ctx context.Context, index1, index2 int) *StatusCmd ClientSetName(ctx context.Context, name string) *BoolCmd ClientSetInfo(ctx context.Context, info LibraryInfo) *StatusCmd Hello(ctx context.Context, ver int, username, password, clientName string) *MapStringInterfaceCmd }
type StatusCmd ¶
type StatusCmd struct {
// contains filtered or unexported fields
}
func NewStatusCmd ¶
func NewStatusResult ¶
NewStatusResult returns a StatusCmd initialised with val and err for testing.
func (*StatusCmd) SetFirstKeyPos ¶
func (cmd *StatusCmd) SetFirstKeyPos(keyPos int8)
type StreamCmdable ¶
type StreamCmdable interface { XAdd(ctx context.Context, a *XAddArgs) *StringCmd XDel(ctx context.Context, stream string, ids ...string) *IntCmd XLen(ctx context.Context, stream string) *IntCmd XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd XRevRange(ctx context.Context, stream string, start, stop string) *XMessageSliceCmd XRevRangeN(ctx context.Context, stream string, start, stop string, count int64) *XMessageSliceCmd XRead(ctx context.Context, a *XReadArgs) *XStreamSliceCmd XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd XGroupCreate(ctx context.Context, stream, group, start string) *StatusCmd XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd XGroupDestroy(ctx context.Context, stream, group string) *IntCmd XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd XPending(ctx context.Context, stream, group string) *XPendingCmd XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd XTrimMinID(ctx context.Context, key string, minID string) *IntCmd XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd }
type StringCmd ¶
type StringCmd struct {
// contains filtered or unexported fields
}
func NewStringCmd ¶
func NewStringResult ¶
NewStringResult returns a StringCmd initialised with val and err for testing.
func (*StringCmd) SetFirstKeyPos ¶
func (cmd *StringCmd) SetFirstKeyPos(keyPos int8)
type StringCmdable ¶
type StringCmdable interface { Append(ctx context.Context, key, value string) *IntCmd Decr(ctx context.Context, key string) *IntCmd DecrBy(ctx context.Context, key string, decrement int64) *IntCmd Get(ctx context.Context, key string) *StringCmd GetRange(ctx context.Context, key string, start, end int64) *StringCmd GetSet(ctx context.Context, key string, value interface{}) *StringCmd GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd GetDel(ctx context.Context, key string) *StringCmd Incr(ctx context.Context, key string) *IntCmd IncrBy(ctx context.Context, key string, value int64) *IntCmd IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd LCS(ctx context.Context, q *LCSQuery) *LCSCmd MGet(ctx context.Context, keys ...string) *SliceCmd MSet(ctx context.Context, values ...interface{}) *StatusCmd MSetNX(ctx context.Context, values ...interface{}) *BoolCmd Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd SetArgs(ctx context.Context, key string, value interface{}, a SetArgs) *StatusCmd SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd StrLen(ctx context.Context, key string) *IntCmd }
type StringSliceCmd ¶
type StringSliceCmd struct {
// contains filtered or unexported fields
}
func NewStringSliceCmd ¶
func NewStringSliceCmd(ctx context.Context, args ...interface{}) *StringSliceCmd
func NewStringSliceResult ¶
func NewStringSliceResult(val []string, err error) *StringSliceCmd
NewStringSliceResult returns a StringSliceCmd initialised with val and err for testing.
func (*StringSliceCmd) Result ¶
func (cmd *StringSliceCmd) Result() ([]string, error)
func (*StringSliceCmd) ScanSlice ¶
func (cmd *StringSliceCmd) ScanSlice(container interface{}) error
func (*StringSliceCmd) SetFirstKeyPos ¶
func (cmd *StringSliceCmd) SetFirstKeyPos(keyPos int8)
func (*StringSliceCmd) SetVal ¶
func (cmd *StringSliceCmd) SetVal(val []string)
func (*StringSliceCmd) String ¶
func (cmd *StringSliceCmd) String() string
func (*StringSliceCmd) Val ¶
func (cmd *StringSliceCmd) Val() []string
type StringStructMapCmd ¶
type StringStructMapCmd struct {
// contains filtered or unexported fields
}
func NewStringStructMapCmd ¶
func NewStringStructMapCmd(ctx context.Context, args ...interface{}) *StringStructMapCmd
func (*StringStructMapCmd) Result ¶
func (cmd *StringStructMapCmd) Result() (map[string]struct{}, error)
func (*StringStructMapCmd) SetFirstKeyPos ¶
func (cmd *StringStructMapCmd) SetFirstKeyPos(keyPos int8)
func (*StringStructMapCmd) SetVal ¶
func (cmd *StringStructMapCmd) SetVal(val map[string]struct{})
func (*StringStructMapCmd) String ¶
func (cmd *StringStructMapCmd) String() string
func (*StringStructMapCmd) Val ¶
func (cmd *StringStructMapCmd) Val() map[string]struct{}
type Subscription ¶
type Subscription struct { // Can be "subscribe", "unsubscribe", "psubscribe" or "punsubscribe". Kind string // Channel name we have subscribed to. Channel string // Number of channels we are currently subscribed to. Count int }
Subscription received after a successful subscription to channel.
func (*Subscription) String ¶
func (m *Subscription) String() string
type TDigestInfo ¶
type TDigestInfoCmd ¶
type TDigestInfoCmd struct {
// contains filtered or unexported fields
}
func NewTDigestInfoCmd ¶
func NewTDigestInfoCmd(ctx context.Context, args ...interface{}) *TDigestInfoCmd
func (*TDigestInfoCmd) Result ¶
func (cmd *TDigestInfoCmd) Result() (TDigestInfo, error)
func (*TDigestInfoCmd) SetFirstKeyPos ¶
func (cmd *TDigestInfoCmd) SetFirstKeyPos(keyPos int8)
func (*TDigestInfoCmd) SetVal ¶
func (cmd *TDigestInfoCmd) SetVal(val TDigestInfo)
func (*TDigestInfoCmd) String ¶
func (cmd *TDigestInfoCmd) String() string
func (*TDigestInfoCmd) Val ¶
func (cmd *TDigestInfoCmd) Val() TDigestInfo
type TDigestMergeOptions ¶
type TFCallOptions ¶
type TFunctionListOptions ¶
type TFunctionLoadOptions ¶
type TSAlterOptions ¶
type TSCreateRuleOptions ¶
type TSCreateRuleOptions struct {
// contains filtered or unexported fields
}
type TSGetOptions ¶
type TSGetOptions struct {
Latest bool
}
type TSIncrDecrOptions ¶
type TSInfoOptions ¶
type TSInfoOptions struct {
Debug bool
}
type TSMGetOptions ¶
type TSMRangeOptions ¶
type TSMRevRangeOptions ¶
type TSRangeOptions ¶
type TSRevRangeOptions ¶
type TSTimestampValue ¶
type TSTimestampValueCmd ¶
type TSTimestampValueCmd struct {
// contains filtered or unexported fields
}
func (*TSTimestampValueCmd) Result ¶
func (cmd *TSTimestampValueCmd) Result() (TSTimestampValue, error)
func (*TSTimestampValueCmd) SetFirstKeyPos ¶
func (cmd *TSTimestampValueCmd) SetFirstKeyPos(keyPos int8)
func (*TSTimestampValueCmd) SetVal ¶
func (cmd *TSTimestampValueCmd) SetVal(val TSTimestampValue)
func (*TSTimestampValueCmd) String ¶
func (cmd *TSTimestampValueCmd) String() string
func (*TSTimestampValueCmd) Val ¶
func (cmd *TSTimestampValueCmd) Val() TSTimestampValue
type TSTimestampValueSliceCmd ¶
type TSTimestampValueSliceCmd struct {
// contains filtered or unexported fields
}
func (*TSTimestampValueSliceCmd) Result ¶
func (cmd *TSTimestampValueSliceCmd) Result() ([]TSTimestampValue, error)
func (*TSTimestampValueSliceCmd) SetFirstKeyPos ¶
func (cmd *TSTimestampValueSliceCmd) SetFirstKeyPos(keyPos int8)
func (*TSTimestampValueSliceCmd) SetVal ¶
func (cmd *TSTimestampValueSliceCmd) SetVal(val []TSTimestampValue)
func (*TSTimestampValueSliceCmd) String ¶
func (cmd *TSTimestampValueSliceCmd) String() string
func (*TSTimestampValueSliceCmd) Val ¶
func (cmd *TSTimestampValueSliceCmd) Val() []TSTimestampValue
type TimeCmd ¶
type TimeCmd struct {
// contains filtered or unexported fields
}
func NewTimeCmd ¶
func NewTimeCmdResult ¶
NewTimeCmdResult returns a TimeCmd initialised with val and err for testing.
func (*TimeCmd) SetFirstKeyPos ¶
func (cmd *TimeCmd) SetFirstKeyPos(keyPos int8)
type TimeseriesCmdable ¶
type TimeseriesCmdable interface { TSAdd(ctx context.Context, key string, timestamp interface{}, value float64) *IntCmd TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, options *TSOptions) *IntCmd TSCreate(ctx context.Context, key string) *StatusCmd TSCreateWithArgs(ctx context.Context, key string, options *TSOptions) *StatusCmd TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int) *StatusCmd TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd TSIncrBy(ctx context.Context, Key string, timestamp float64) *IntCmd TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd TSDecrBy(ctx context.Context, Key string, timestamp float64) *IntCmd TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd TSDel(ctx context.Context, Key string, fromTimestamp int, toTimestamp int) *IntCmd TSDeleteRule(ctx context.Context, sourceKey string, destKey string) *StatusCmd TSGet(ctx context.Context, key string) *TSTimestampValueCmd TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRevRangeOptions) *TSTimestampValueSliceCmd TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRangeOptions) *TSTimestampValueSliceCmd TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRangeOptions) *MapStringSliceInterfaceCmd TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRevRangeOptions) *MapStringSliceInterfaceCmd TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd }
type TopKInfoCmd ¶
type TopKInfoCmd struct {
// contains filtered or unexported fields
}
func NewTopKInfoCmd ¶
func NewTopKInfoCmd(ctx context.Context, args ...interface{}) *TopKInfoCmd
func (*TopKInfoCmd) Result ¶
func (cmd *TopKInfoCmd) Result() (TopKInfo, error)
func (*TopKInfoCmd) SetFirstKeyPos ¶
func (cmd *TopKInfoCmd) SetFirstKeyPos(keyPos int8)
func (*TopKInfoCmd) SetVal ¶
func (cmd *TopKInfoCmd) SetVal(val TopKInfo)
func (*TopKInfoCmd) String ¶
func (cmd *TopKInfoCmd) String() string
func (*TopKInfoCmd) Val ¶
func (cmd *TopKInfoCmd) Val() TopKInfo
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
Tx implements Redis transactions as described in http://redis.io/topics/transactions. It's NOT safe for concurrent use by multiple goroutines, because Exec resets list of watched keys.
If you don't need WATCH, use Pipeline instead.
func (Tx) ACLLogReset ¶
func (*Tx) AddHook ¶
func (hs *Tx) AddHook(hook Hook)
AddHook is to add a hook to the queue. Hook is a function executed during network connection, command execution, and pipeline, it is a first-in-first-out stack queue (FIFO). You need to execute the next hook in each hook, unless you want to terminate the execution of the command. For example, you added hook-1, hook-2:
client.AddHook(hook-1, hook-2)
hook-1:
func (Hook1) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd Cmder) error { print("hook-1 start") next(ctx, cmd) print("hook-1 end") return nil } }
hook-2:
func (Hook2) ProcessHook(next redis.ProcessHook) redis.ProcessHook { return func(ctx context.Context, cmd redis.Cmder) error { print("hook-2 start") next(ctx, cmd) print("hook-2 end") return nil } }
The execution sequence is:
hook-1 start -> hook-2 start -> exec redis cmd -> hook-2 end -> hook-1 end
Please note: "next(ctx, cmd)" is very important, it will call the next hook, if "next(ctx, cmd)" is not executed, the redis command will not be executed.
func (Tx) AuthACL ¶
AuthACL Perform an AUTH command, using the given user and pass. Should be used to authenticate the current connection with one of the connections defined in the ACL list when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
func (Tx) BFAdd ¶
BFAdd adds an item to a Bloom filter. For more information - https://redis.io/commands/bf.add/
func (Tx) BFCard ¶
BFCard returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter). For more information - https://redis.io/commands/bf.card/
func (Tx) BFExists ¶
BFExists determines whether a given item was added to a Bloom filter. For more information - https://redis.io/commands/bf.exists/
func (Tx) BFInfo ¶
Returns information about a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Tx) BFInfoArg ¶
BFInfoArg returns information about a specific option of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Tx) BFInfoCapacity ¶
BFInfoCapacity returns information about the capacity of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Tx) BFInfoExpansion ¶
BFInfoExpansion returns information about the expansion rate of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Tx) BFInfoFilters ¶
BFInfoFilters returns information about the filters of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Tx) BFInfoItems ¶
BFInfoItems returns information about the items of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Tx) BFInfoSize ¶
BFInfoSize returns information about the size of a Bloom filter. For more information - https://redis.io/commands/bf.info/
func (Tx) BFInsert ¶
func (c Tx) BFInsert(ctx context.Context, key string, options *BFInsertOptions, elements ...interface{}) *BoolSliceCmd
BFInsert inserts elements into a Bloom filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. For more information - https://redis.io/commands/bf.insert/
func (Tx) BFLoadChunk ¶
func (c Tx) BFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
BFLoadChunk restores a Bloom filter previously saved using BF.SCANDUMP. For more information - https://redis.io/commands/bf.loadchunk/
func (Tx) BFMAdd ¶
func (c Tx) BFMAdd(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMAdd adds multiple elements to a Bloom filter. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/bf.madd/
func (Tx) BFMExists ¶
func (c Tx) BFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
BFMExists check if multiple elements exist in a Bloom filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/bf.mexists/
func (Tx) BFReserve ¶
func (c Tx) BFReserve(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserve creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. For more information - https://redis.io/commands/bf.reserve/
func (Tx) BFReserveExpansion ¶
func (c Tx) BFReserveExpansion(ctx context.Context, key string, errorRate float64, capacity, expansion int64) *StatusCmd
BFReserveExpansion creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying an expansion rate for the filter. For more information - https://redis.io/commands/bf.reserve/
func (Tx) BFReserveNonScaling ¶
func (c Tx) BFReserveNonScaling(ctx context.Context, key string, errorRate float64, capacity int64) *StatusCmd
BFReserveNonScaling creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying that the filter should not scale. For more information - https://redis.io/commands/bf.reserve/
func (Tx) BFReserveWithArgs ¶
func (c Tx) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd
BFReserveWithArgs creates an empty Bloom filter with a single sub-filter for the initial specified capacity and with an upper bound error_rate. This function also allows for specifying additional options such as expansion rate and non-scaling behavior. For more information - https://redis.io/commands/bf.reserve/
func (Tx) BFScanDump ¶
func (c Tx) BFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
Begins an incremental save of the Bloom filter. This command is useful for large Bloom filters that cannot fit into the DUMP and RESTORE model. For more information - https://redis.io/commands/bf.scandump/
func (Tx) BRPopLPush ¶
func (Tx) BZMPop ¶
func (c Tx) BZMPop(ctx context.Context, timeout time.Duration, order string, count int64, keys ...string) *ZSliceWithKeyCmd
BZMPop is the blocking variant of ZMPOP. When any of the sorted sets contains elements, this command behaves exactly like ZMPOP. When all sorted sets are empty, Redis will block the connection until another client adds members to one of the keys or until the timeout elapses. A timeout of zero can be used to block indefinitely. example: client.BZMPop(ctx, 0,"max", 1, "set")
func (Tx) BgRewriteAOF ¶
func (Tx) BitField ¶
func (c Tx) BitField(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitField accepts multiple values:
- BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
- BitField([]string{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
- BitField([]interface{}{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
func (Tx) BitFieldRO ¶
func (c Tx) BitFieldRO(ctx context.Context, key string, values ...interface{}) *IntSliceCmd
BitFieldRO - Read-only variant of the BITFIELD command. It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas. - BitFieldRO(ctx, key, "<Encoding0>", "<Offset0>", "<Encoding1>","<Offset1>")
func (Tx) BitPos ¶
BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end if you need the `byte | bit` parameter, please use `BitPosSpan`.
func (Tx) BitPosSpan ¶
func (c Tx) BitPosSpan(ctx context.Context, key string, bit int8, start, end int64, span string) *IntCmd
BitPosSpan supports the `byte | bit` parameters in redis version 7.0, the bitpos command defaults to using byte type for the `start-end` range, which means it counts in bytes from start to end. you can set the value of "span" to determine the type of `start-end`. span = "bit", cmd: bitpos key bit start end bit span = "byte", cmd: bitpos key bit start end byte
func (Tx) CFAdd ¶
CFAdd adds an element to a Cuckoo filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.add/
func (Tx) CFAddNX ¶
CFAddNX adds an element to a Cuckoo filter only if it does not already exist in the filter. Returns true if the element was added to the filter or false if it already exists in the filter. For more information - https://redis.io/commands/cf.addnx/
func (Tx) CFCount ¶
CFCount returns an estimate of the number of times an element may be in a Cuckoo Filter. For more information - https://redis.io/commands/cf.count/
func (Tx) CFDel ¶
CFDel deletes an item once from the cuckoo filter. For more information - https://redis.io/commands/cf.del/
func (Tx) CFExists ¶
CFExists determines whether an item may exist in the Cuckoo Filter or not. For more information - https://redis.io/commands/cf.exists/
func (Tx) CFInfo ¶
CFInfo returns information about a Cuckoo filter. For more information - https://redis.io/commands/cf.info/
func (Tx) CFInsert ¶
func (c Tx) CFInsert(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *BoolSliceCmd
CFInsert inserts elements into a Cuckoo filter. This function also allows for specifying additional options such as capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of booleans indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insert/
func (Tx) CFInsertNX ¶
func (c Tx) CFInsertNX(ctx context.Context, key string, options *CFInsertOptions, elements ...interface{}) *IntSliceCmd
CFInsertNX inserts elements into a Cuckoo filter only if they do not already exist in the filter. This function also allows for specifying additional options such as: capacity, error rate, expansion rate, and non-scaling behavior. Returns an array of integers indicating whether each element was added to the filter or not. For more information - https://redis.io/commands/cf.insertnx/
func (Tx) CFLoadChunk ¶
func (c Tx) CFLoadChunk(ctx context.Context, key string, iterator int64, data interface{}) *StatusCmd
CFLoadChunk restores a filter previously saved using SCANDUMP. For more information - https://redis.io/commands/cf.loadchunk/
func (Tx) CFMExists ¶
func (c Tx) CFMExists(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
CFMExists check if multiple elements exist in a Cuckoo filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/cf.mexists/
func (Tx) CFReserve ¶
CFReserve creates an empty Cuckoo filter with the specified capacity. For more information - https://redis.io/commands/cf.reserve/
func (Tx) CFReserveBucketSize ¶
func (c Tx) CFReserveBucketSize(ctx context.Context, key string, capacity int64, bucketsize int64) *StatusCmd
CFReserveBucketSize creates an empty Cuckoo filter with the specified capacity and bucket size. For more information - https://redis.io/commands/cf.reserve/
func (Tx) CFReserveExpansion ¶
func (c Tx) CFReserveExpansion(ctx context.Context, key string, capacity int64, expansion int64) *StatusCmd
CFReserveExpansion creates an empty Cuckoo filter with the specified capacity and expansion rate. For more information - https://redis.io/commands/cf.reserve/
func (Tx) CFReserveMaxIterations ¶
func (c Tx) CFReserveMaxIterations(ctx context.Context, key string, capacity int64, maxiterations int64) *StatusCmd
CFReserveMaxIterations creates an empty Cuckoo filter with the specified capacity and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Tx) CFReserveWithArgs ¶
func (c Tx) CFReserveWithArgs(ctx context.Context, key string, options *CFReserveOptions) *StatusCmd
CFReserveWithArgs creates an empty Cuckoo filter with the specified options. This function allows for specifying additional options such as bucket size and maximum number of iterations. For more information - https://redis.io/commands/cf.reserve/
func (Tx) CFScanDump ¶
func (c Tx) CFScanDump(ctx context.Context, key string, iterator int64) *ScanDumpCmd
CFScanDump begins an incremental save of the cuckoo filter. For more information - https://redis.io/commands/cf.scandump/
func (Tx) CMSIncrBy ¶
func (c Tx) CMSIncrBy(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSIncrBy increments the count of one or more items in a Count-Min Sketch filter. Returns an array of integers representing the updated count of each item. For more information - https://redis.io/commands/cms.incrby/
func (Tx) CMSInfo ¶
func (c Tx) CMSInfo(ctx context.Context, key string) *CMSInfoCmd
CMSInfo returns information about a Count-Min Sketch filter. For more information - https://redis.io/commands/cms.info/
func (Tx) CMSInitByDim ¶
CMSInitByDim creates an empty Count-Min Sketch filter with the specified dimensions. For more information - https://redis.io/commands/cms.initbydim/
func (Tx) CMSInitByProb ¶
func (c Tx) CMSInitByProb(ctx context.Context, key string, errorRate, probability float64) *StatusCmd
CMSInitByProb creates an empty Count-Min Sketch filter with the specified error rate and probability. For more information - https://redis.io/commands/cms.initbyprob/
func (Tx) CMSMerge ¶
CMSMerge merges multiple Count-Min Sketch filters into a single filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Tx) CMSMergeWithWeight ¶
func (c Tx) CMSMergeWithWeight(ctx context.Context, destKey string, sourceKeys map[string]int64) *StatusCmd
CMSMergeWithWeight merges multiple Count-Min Sketch filters into a single filter with weights for each source filter. The destination filter must not exist and will be created with the dimensions of the first source filter. The number of items in each source filter must be equal. Returns OK on success or an error if the filters could not be merged. For more information - https://redis.io/commands/cms.merge/
func (Tx) CMSQuery ¶
func (c Tx) CMSQuery(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
CMSQuery returns count for item(s). For more information - https://redis.io/commands/cms.query/
func (Tx) ClientGetName ¶
ClientGetName returns the name of the connection.
func (Tx) ClientInfo ¶
func (c Tx) ClientInfo(ctx context.Context) *ClientInfoCmd
func (Tx) ClientKillByFilter ¶
ClientKillByFilter is new style syntax, while the ClientKill is old
CLIENT KILL <option> [value] ... <option> [value]
func (Tx) ClientList ¶
func (Tx) ClientSetInfo ¶
func (c Tx) ClientSetInfo(ctx context.Context, info LibraryInfo) *StatusCmd
ClientSetInfo sends a CLIENT SETINFO command with the provided info.
func (Tx) ClientSetName ¶
ClientSetName assigns a name to the connection.
func (Tx) ClientUnblockWithError ¶
func (Tx) ClientUnpause ¶
func (Tx) ClusterAddSlots ¶
func (Tx) ClusterAddSlotsRange ¶
func (Tx) ClusterCountFailureReports ¶
func (Tx) ClusterCountKeysInSlot ¶
func (Tx) ClusterDelSlots ¶
func (Tx) ClusterDelSlotsRange ¶
func (Tx) ClusterFailover ¶
func (Tx) ClusterGetKeysInSlot ¶
func (c Tx) ClusterGetKeysInSlot(ctx context.Context, slot int, count int) *StringSliceCmd
func (Tx) ClusterInfo ¶
func (Tx) ClusterLinks ¶
func (c Tx) ClusterLinks(ctx context.Context) *ClusterLinksCmd
func (Tx) ClusterMyShardID ¶
func (Tx) ClusterNodes ¶
func (Tx) ClusterReplicate ¶
func (Tx) ClusterResetHard ¶
func (Tx) ClusterResetSoft ¶
func (Tx) ClusterSaveConfig ¶
func (Tx) ClusterShards ¶
func (c Tx) ClusterShards(ctx context.Context) *ClusterShardsCmd
func (Tx) ClusterSlaves ¶
func (c Tx) ClusterSlaves(ctx context.Context, nodeID string) *StringSliceCmd
func (Tx) ClusterSlots ¶
func (c Tx) ClusterSlots(ctx context.Context) *ClusterSlotsCmd
func (Tx) Command ¶
func (c Tx) Command(ctx context.Context) *CommandsInfoCmd
func (Tx) CommandGetKeys ¶
func (c Tx) CommandGetKeys(ctx context.Context, commands ...interface{}) *StringSliceCmd
func (Tx) CommandGetKeysAndFlags ¶
func (c Tx) CommandGetKeysAndFlags(ctx context.Context, commands ...interface{}) *KeyFlagsCmd
func (Tx) CommandList ¶
func (c Tx) CommandList(ctx context.Context, filter *FilterBy) *StringSliceCmd
func (Tx) ConfigGet ¶
func (c Tx) ConfigGet(ctx context.Context, parameter string) *MapStringStringCmd
func (Tx) ConfigResetStat ¶
func (Tx) ConfigRewrite ¶
func (Tx) ExpireTime ¶
func (c Tx) ExpireTime(ctx context.Context, key string) *DurationCmd
func (Tx) FCallRo ¶
FCallRo this function simply calls FCallRO, Deprecated: to maintain convention FCallRO.
func (Tx) FTAggregate ¶
func (c Tx) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd
FTAggregate - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Tx) FTAggregateWithArgs ¶
func (c Tx) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd
FTAggregateWithArgs - Performs a search query on an index and applies a series of aggregate transformations to the result. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. This function also allows for specifying additional options such as: Verbatim, LoadAll, Load, Timeout, GroupBy, SortBy, SortByMax, Apply, LimitOffset, Limit, Filter, WithCursor, Params, and DialectVersion. For more information, please refer to the Redis documentation: [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/)
func (Tx) FTAliasAdd ¶
FTAliasAdd - Adds an alias to an index. The 'index' parameter specifies the index to which the alias is added, and the 'alias' parameter specifies the alias. For more information, please refer to the Redis documentation: [FT.ALIASADD]: (https://redis.io/commands/ft.aliasadd/)
func (Tx) FTAliasDel ¶
FTAliasDel - Removes an alias from an index. The 'alias' parameter specifies the alias to be removed. For more information, please refer to the Redis documentation: [FT.ALIASDEL]: (https://redis.io/commands/ft.aliasdel/)
func (Tx) FTAliasUpdate ¶
FTAliasUpdate - Updates an alias to an index. The 'index' parameter specifies the index to which the alias is updated, and the 'alias' parameter specifies the alias. If the alias already exists for a different index, it updates the alias to point to the specified index instead. For more information, please refer to the Redis documentation: [FT.ALIASUPDATE]: (https://redis.io/commands/ft.aliasupdate/)
func (Tx) FTAlter ¶
func (c Tx) FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd
FTAlter - Alters the definition of an existing index. The 'index' parameter specifies the index to alter, and the 'skipInitialScan' parameter specifies whether to skip the initial scan. The 'definition' parameter specifies the new definition for the index. For more information, please refer to the Redis documentation: [FT.ALTER]: (https://redis.io/commands/ft.alter/)
func (Tx) FTConfigGet ¶
func (c Tx) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd
FTConfigGet - Retrieves the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to retrieve. For more information, please refer to the Redis documentation: [FT.CONFIG GET]: (https://redis.io/commands/ft.config-get/)
func (Tx) FTConfigSet ¶
FTConfigSet - Sets the value of a RediSearch configuration parameter. The 'option' parameter specifies the configuration parameter to set, and the 'value' parameter specifies the new value. For more information, please refer to the Redis documentation: [FT.CONFIG SET]: (https://redis.io/commands/ft.config-set/)
func (Tx) FTCreate ¶
func (c Tx) FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd
FTCreate - Creates a new index with the given options and schema. The 'index' parameter specifies the name of the index to create. The 'options' parameter specifies various options for the index, such as: whether to index hashes or JSONs, prefixes, filters, default language, score, score field, payload field, etc. The 'schema' parameter specifies the schema for the index, which includes the field name, field type, etc. For more information, please refer to the Redis documentation: [FT.CREATE]: (https://redis.io/commands/ft.create/)
func (Tx) FTCursorDel ¶
FTCursorDel - Deletes a cursor from an existing index. The 'index' parameter specifies the index from which to delete the cursor, and the 'cursorId' parameter specifies the ID of the cursor to delete. For more information, please refer to the Redis documentation: [FT.CURSOR DEL]: (https://redis.io/commands/ft.cursor-del/)
func (Tx) FTCursorRead ¶
func (c Tx) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd
FTCursorRead - Reads the next results from an existing cursor. The 'index' parameter specifies the index from which to read the cursor, the 'cursorId' parameter specifies the ID of the cursor to read, and the 'count' parameter specifies the number of results to read. For more information, please refer to the Redis documentation: [FT.CURSOR READ]: (https://redis.io/commands/ft.cursor-read/)
func (Tx) FTDictAdd ¶
FTDictAdd - Adds terms to a dictionary. The 'dict' parameter specifies the dictionary to which to add the terms, and the 'term' parameter specifies the terms to add. For more information, please refer to the Redis documentation: [FT.DICTADD]: (https://redis.io/commands/ft.dictadd/)
func (Tx) FTDictDel ¶
FTDictDel - Deletes terms from a dictionary. The 'dict' parameter specifies the dictionary from which to delete the terms, and the 'term' parameter specifies the terms to delete. For more information, please refer to the Redis documentation: [FT.DICTDEL]: (https://redis.io/commands/ft.dictdel/)
func (Tx) FTDictDump ¶
func (c Tx) FTDictDump(ctx context.Context, dict string) *StringSliceCmd
FTDictDump - Returns all terms in the specified dictionary. The 'dict' parameter specifies the dictionary from which to return the terms. For more information, please refer to the Redis documentation: [FT.DICTDUMP]: (https://redis.io/commands/ft.dictdump/)
func (Tx) FTDropIndex ¶
FTDropIndex - Deletes an index. The 'index' parameter specifies the index to delete. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Tx) FTDropIndexWithArgs ¶
func (c Tx) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd
FTDropIndexWithArgs - Deletes an index with options. The 'index' parameter specifies the index to delete, and the 'options' parameter specifies the DeleteDocs option for docs deletion. For more information, please refer to the Redis documentation: [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/)
func (Tx) FTExplain ¶
FTExplain - Returns the execution plan for a complex query. The 'index' parameter specifies the index to query, and the 'query' parameter specifies the query string. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Tx) FTExplainCli ¶
FTExplainCli - Returns the execution plan for a complex query. [Not Implemented] For more information, see https://redis.io/commands/ft.explaincli/
func (Tx) FTExplainWithArgs ¶
func (c Tx) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd
FTExplainWithArgs - Returns the execution plan for a complex query with options. The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query. For more information, please refer to the Redis documentation: [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (Tx) FTInfo ¶
FTInfo - Retrieves information about an index. The 'index' parameter specifies the index to retrieve information about. For more information, please refer to the Redis documentation: [FT.INFO]: (https://redis.io/commands/ft.info/)
func (Tx) FTSearch ¶
func (c Tx) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd
FTSearch - Executes a search query on an index. The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Tx) FTSearchWithArgs ¶
func (c Tx) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd
FTSearchWithArgs - Executes a search query on an index with additional options. The 'index' parameter specifies the index to search, the 'query' parameter specifies the search query, and the 'options' parameter specifies additional options for the search. For more information, please refer to the Redis documentation: [FT.SEARCH]: (https://redis.io/commands/ft.search/)
func (Tx) FTSpellCheck ¶
func (c Tx) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd
FTSpellCheck - Checks a query string for spelling errors. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Tx) FTSpellCheckWithArgs ¶
func (c Tx) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd
FTSpellCheckWithArgs - Checks a query string for spelling errors with additional options. For more details about spellcheck query please follow: https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ For more information, please refer to the Redis documentation: [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/)
func (Tx) FTSynDump ¶
func (c Tx) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd
FTSynDump - Dumps the contents of a synonym group. The 'index' parameter specifies the index to dump. For more information, please refer to the Redis documentation: [FT.SYNDUMP]: (https://redis.io/commands/ft.syndump/)
func (Tx) FTSynUpdate ¶
func (c Tx) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd
FTSynUpdate - Creates or updates a synonym group with additional terms. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Tx) FTSynUpdateWithArgs ¶
func (c Tx) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd
FTSynUpdateWithArgs - Creates or updates a synonym group with additional terms and options. The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, the 'options' parameter specifies additional options for the update, and the 'terms' parameter specifies the additional terms. For more information, please refer to the Redis documentation: [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/)
func (Tx) FTTagVals ¶
func (c Tx) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd
FTTagVals - Returns all distinct values indexed in a tag field. The 'index' parameter specifies the index to check, and the 'field' parameter specifies the tag field to retrieve values from. For more information, please refer to the Redis documentation: [FT.TAGVALS]: (https://redis.io/commands/ft.tagvals/)
func (Tx) FT_List ¶
func (c Tx) FT_List(ctx context.Context) *StringSliceCmd
FT_List - Lists all the existing indexes in the database. For more information, please refer to the Redis documentation: [FT._LIST]: (https://redis.io/commands/ft._list/)
func (Tx) FlushAllAsync ¶
func (Tx) FlushDBAsync ¶
func (Tx) FunctionDelete ¶
func (Tx) FunctionDump ¶
func (Tx) FunctionFlush ¶
func (Tx) FunctionFlushAsync ¶
func (Tx) FunctionKill ¶
func (Tx) FunctionList ¶
func (c Tx) FunctionList(ctx context.Context, q FunctionListQuery) *FunctionListCmd
func (Tx) FunctionLoadReplace ¶
func (Tx) FunctionRestore ¶
func (Tx) FunctionStats ¶
func (c Tx) FunctionStats(ctx context.Context) *FunctionStatsCmd
func (Tx) GeoAdd ¶
func (c Tx) GeoAdd(ctx context.Context, key string, geoLocation ...*GeoLocation) *IntCmd
func (Tx) GeoHash ¶
func (c Tx) GeoHash(ctx context.Context, key string, members ...string) *StringSliceCmd
func (Tx) GeoRadius ¶
func (c Tx) GeoRadius( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadius is a read-only GEORADIUS_RO command.
func (Tx) GeoRadiusByMember ¶
func (c Tx) GeoRadiusByMember( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *GeoLocationCmd
GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command.
func (Tx) GeoRadiusByMemberStore ¶
func (c Tx) GeoRadiusByMemberStore( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusByMemberStore is a writing GEORADIUSBYMEMBER command.
func (Tx) GeoRadiusStore ¶
func (c Tx) GeoRadiusStore( ctx context.Context, key string, longitude, latitude float64, query *GeoRadiusQuery, ) *IntCmd
GeoRadiusStore is a writing GEORADIUS command.
func (Tx) GeoSearch ¶
func (c Tx) GeoSearch(ctx context.Context, key string, q *GeoSearchQuery) *StringSliceCmd
func (Tx) GeoSearchLocation ¶
func (c Tx) GeoSearchLocation( ctx context.Context, key string, q *GeoSearchLocationQuery, ) *GeoSearchLocationCmd
func (Tx) GeoSearchStore ¶
func (c Tx) GeoSearchStore(ctx context.Context, key, store string, q *GeoSearchStoreQuery) *IntCmd
func (Tx) GetEx ¶
GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). Requires Redis >= 6.2.0.
func (Tx) HExpire ¶
func (c Tx) HExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Tx) HExpireAt ¶
HExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in seconds. Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields. The command sets absolute expiration times based on the UNIX timestamp provided. For more information - https://redis.io/commands/hexpireat/
func (Tx) HExpireAtWithArgs ¶
func (c Tx) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Tx) HExpireTime ¶
func (c Tx) HExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in seconds. Requires a key and the fields themselves to fetch their expiration timestamps. This command returns the expiration times for each field or error/status codes for each field as specified. For more information - https://redis.io/commands/hexpiretime/
func (Tx) HExpireWithArgs ¶
func (c Tx) HExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
HExpire - Sets the expiration time for specified fields in a hash in seconds. It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields. The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields. For more information - https://redis.io/commands/hexpire/
func (Tx) HIncrByFloat ¶
func (Tx) HMGet ¶
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.
func (Tx) HPExpire ¶
func (c Tx) HPExpire(ctx context.Context, key string, expiration time.Duration, fields ...string) *IntSliceCmd
HPExpire - Sets the expiration time for specified fields in a hash in milliseconds. Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields. The command modifies the standard time.Duration to milliseconds for the Redis command. For more information - https://redis.io/commands/hpexpire/
func (Tx) HPExpireAt ¶
func (c Tx) HPExpireAt(ctx context.Context, key string, tm time.Time, fields ...string) *IntSliceCmd
HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds. Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds. For more information - https://redis.io/commands/hpexpireat/
func (Tx) HPExpireAtWithArgs ¶
func (c Tx) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Time, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Tx) HPExpireTime ¶
func (c Tx) HPExpireTime(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPExpireTime - Retrieves the expiration time for specified fields in a hash as a UNIX timestamp in milliseconds. Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters. Provides the expiration timestamp for each field in milliseconds. For more information - https://redis.io/commands/hexpiretime/
func (Tx) HPExpireWithArgs ¶
func (c Tx) HPExpireWithArgs(ctx context.Context, key string, expiration time.Duration, expirationArgs HExpireArgs, fields ...string) *IntSliceCmd
func (Tx) HPTTL ¶
func (c Tx) HPTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPTTL - Retrieves the remaining time to live for specified fields in a hash in milliseconds. Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields. This command provides the TTL in milliseconds for each field or returns error/status codes as needed. For more information - https://redis.io/commands/hpttl/
func (Tx) HPersist ¶
func (c Tx) HPersist(ctx context.Context, key string, fields ...string) *IntSliceCmd
HPersist - Removes the expiration time from specified fields in a hash. Accepts a key and the fields themselves. This command ensures that each field specified will have its expiration removed if present. For more information - https://redis.io/commands/hpersist/
func (Tx) HRandField ¶
func (c Tx) HRandField(ctx context.Context, key string, count int) *StringSliceCmd
HRandField redis-server version >= 6.2.0.
func (Tx) HRandFieldWithValues ¶
func (c Tx) HRandFieldWithValues(ctx context.Context, key string, count int) *KeyValueSliceCmd
HRandFieldWithValues redis-server version >= 6.2.0.
func (Tx) HScanNoValues ¶
func (Tx) HSet ¶
HSet accepts values in following formats:
HSet("myhash", "key1", "value1", "key2", "value2")
HSet("myhash", []string{"key1", "value1", "key2", "value2"})
HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
Playing struct With "redis" tag. type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` }
HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
For struct, can be a structure pointer type, we only parse the field whose tag is redis. if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it, or you don't need to set the redis tag. For the type of structure field, we only support simple data types: string, int/uint(8,16,32,64), float(32,64), time.Time(to RFC3339Nano), time.Duration(to Nanoseconds ), if you are other more complex or custom data types, please implement the encoding.BinaryMarshaler interface.
Note that in older versions of Redis server(redis-server < 4.0), HSet only supports a single key-value pair. redis-docs: https://redis.io/commands/hset (Starting with Redis version 4.0.0: Accepts multiple field and value arguments.) If you are using a Struct type and the number of fields is greater than one, you will receive an error similar to "ERR wrong number of arguments", you can use HMSet as a substitute.
func (Tx) HTTL ¶
func (c Tx) HTTL(ctx context.Context, key string, fields ...string) *IntSliceCmd
HTTL - Retrieves the remaining time to live for specified fields in a hash in seconds. Requires a key and the fields themselves. It returns the TTL for each specified field. This command fetches the TTL in seconds for each field or returns error/status codes as appropriate. For more information - https://redis.io/commands/httl/
func (Tx) Hello ¶
func (c Tx) Hello(ctx context.Context, ver int, username, password, clientName string, ) *MapStringInterfaceCmd
Hello Set the resp protocol used.
func (Tx) IncrByFloat ¶
func (Tx) JSONArrAppend ¶
func (c Tx) JSONArrAppend(ctx context.Context, key, path string, values ...interface{}) *IntSliceCmd
JSONArrAppend adds the provided JSON values to the end of the array at the given path. For more information, see https://redis.io/commands/json.arrappend
func (Tx) JSONArrIndex ¶
func (c Tx) JSONArrIndex(ctx context.Context, key, path string, value ...interface{}) *IntSliceCmd
JSONArrIndex searches for the first occurrence of the provided JSON value in the array at the given path. For more information, see https://redis.io/commands/json.arrindex
func (Tx) JSONArrIndexWithArgs ¶
func (c Tx) JSONArrIndexWithArgs(ctx context.Context, key, path string, options *JSONArrIndexArgs, value ...interface{}) *IntSliceCmd
JSONArrIndexWithArgs searches for the first occurrence of a JSON value in an array while allowing the start and stop options to be provided. For more information, see https://redis.io/commands/json.arrindex
func (Tx) JSONArrInsert ¶
func (c Tx) JSONArrInsert(ctx context.Context, key, path string, index int64, values ...interface{}) *IntSliceCmd
JSONArrInsert inserts the JSON values into the array at the specified path before the index (shifts to the right). For more information, see https://redis.io/commands/json.arrinsert
func (Tx) JSONArrLen ¶
func (c Tx) JSONArrLen(ctx context.Context, key, path string) *IntSliceCmd
JSONArrLen reports the length of the JSON array at the specified path in the given key. For more information, see https://redis.io/commands/json.arrlen
func (Tx) JSONArrPop ¶
func (c Tx) JSONArrPop(ctx context.Context, key, path string, index int) *StringSliceCmd
JSONArrPop removes and returns an element from the specified index in the array. For more information, see https://redis.io/commands/json.arrpop
func (Tx) JSONArrTrim ¶
func (c Tx) JSONArrTrim(ctx context.Context, key, path string) *IntSliceCmd
JSONArrTrim trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Tx) JSONArrTrimWithArgs ¶
func (c Tx) JSONArrTrimWithArgs(ctx context.Context, key, path string, options *JSONArrTrimArgs) *IntSliceCmd
JSONArrTrimWithArgs trims an array to contain only the specified inclusive range of elements. For more information, see https://redis.io/commands/json.arrtrim
func (Tx) JSONClear ¶
JSONClear clears container values (arrays/objects) and sets numeric values to 0. For more information, see https://redis.io/commands/json.clear
func (Tx) JSONDebugMemory ¶
JSONDebugMemory reports a value's memory usage in bytes (unimplemented) For more information, see https://redis.io/commands/json.debug-memory
func (Tx) JSONDel ¶
JSONDel deletes a value. For more information, see https://redis.io/commands/json.del
func (Tx) JSONForget ¶
JSONForget deletes a value. For more information, see https://redis.io/commands/json.forget
func (Tx) JSONGet ¶
JSONGet returns the value at path in JSON serialized form. JSON.GET returns an array of strings. This function parses out the wrapping array but leaves the internal strings unprocessed by default (see Val()) For more information - https://redis.io/commands/json.get/
func (Tx) JSONGetWithArgs ¶
func (c Tx) JSONGetWithArgs(ctx context.Context, key string, options *JSONGetArgs, paths ...string) *JSONCmd
JSONGetWithArgs - Retrieves the value of a key from a JSON document. This function also allows for specifying additional options such as: Indention, NewLine and Space For more information - https://redis.io/commands/json.get/
func (Tx) JSONMGet ¶
func (c Tx) JSONMGet(ctx context.Context, path string, keys ...string) *JSONSliceCmd
JSONMGet returns the values at the specified path from multiple key arguments. Note - the arguments are reversed when compared with `JSON.MGET` as we want to follow the pattern of having the last argument be variable. For more information, see https://redis.io/commands/json.mget
func (Tx) JSONMSetArgs ¶
func (c Tx) JSONMSetArgs(ctx context.Context, docs []JSONSetArgs) *StatusCmd
JSONMSetArgs sets or updates one or more JSON values according to the specified key-path-value triplets. For more information, see https://redis.io/commands/json.mset
func (Tx) JSONMerge ¶
JSONMerge merges a given JSON value into matching paths. For more information, see https://redis.io/commands/json.merge
func (Tx) JSONNumIncrBy ¶
JSONNumIncrBy increments the number value stored at the specified path by the provided number. For more information, see https://redis.io/docs/latest/commands/json.numincrby/
func (Tx) JSONObjKeys ¶
JSONObjKeys returns the keys in the object that's referenced by the specified path. For more information, see https://redis.io/commands/json.objkeys
func (Tx) JSONObjLen ¶
func (c Tx) JSONObjLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONObjLen reports the number of keys in the JSON object at the specified path in the given key. For more information, see https://redis.io/commands/json.objlen
func (Tx) JSONSet ¶
JSONSet sets the JSON value at the given path in the given key. The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or a []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Tx) JSONSetMode ¶
func (c Tx) JSONSetMode(ctx context.Context, key, path string, value interface{}, mode string) *StatusCmd
JSONSetMode sets the JSON value at the given path in the given key and allows the mode to be set (the mode value must be "XX" or "NX"). The value must be something that can be marshaled to JSON (using encoding/JSON) unless the argument is a string or []byte when we assume that it can be passed directly as JSON. For more information, see https://redis.io/commands/json.set
func (Tx) JSONStrAppend ¶
func (c Tx) JSONStrAppend(ctx context.Context, key, path, value string) *IntPointerSliceCmd
JSONStrAppend appends the JSON-string values to the string at the specified path. For more information, see https://redis.io/commands/json.strappend
func (Tx) JSONStrLen ¶
func (c Tx) JSONStrLen(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONStrLen reports the length of the JSON String at the specified path in the given key. For more information, see https://redis.io/commands/json.strlen
func (Tx) JSONToggle ¶
func (c Tx) JSONToggle(ctx context.Context, key, path string) *IntPointerSliceCmd
JSONToggle toggles a Boolean value stored at the specified path. For more information, see https://redis.io/commands/json.toggle
func (Tx) JSONType ¶
func (c Tx) JSONType(ctx context.Context, key, path string) *JSONSliceCmd
JSONType reports the type of JSON value at the specified path. For more information, see https://redis.io/commands/json.type
func (Tx) LInsertAfter ¶
func (Tx) LInsertBefore ¶
func (Tx) LMPop ¶
LMPop Pops one or more elements from the first non-empty list key from the list of provided key names. direction: left or right, count: > 0 example: client.LMPop(ctx, "left", 3, "key1", "key2")
func (Tx) LPopCount ¶
func (c Tx) LPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Tx) LRange ¶
func (c Tx) LRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Tx) MSet ¶
MSet is like Set but accepts multiple values:
- MSet("key1", "value1", "key2", "value2")
- MSet([]string{"key1", "value1", "key2", "value2"})
- MSet(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSet(struct), For struct types, see HSet description.
func (Tx) MSetNX ¶
MSetNX is like SetNX but accepts multiple values:
- MSetNX("key1", "value1", "key2", "value2")
- MSetNX([]string{"key1", "value1", "key2", "value2"})
- MSetNX(map[string]interface{}{"key1": "value1", "key2": "value2"})
- MSetNX(struct), For struct types, see HSet description.
func (Tx) MemoryUsage ¶
func (Tx) ModuleLoadex ¶
func (c Tx) ModuleLoadex(ctx context.Context, conf *ModuleLoadexConfig) *StringCmd
ModuleLoadex Redis `MODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS args [args ...]]` command.
func (Tx) Monitor ¶
func (c Tx) Monitor(ctx context.Context, ch chan string) *MonitorCmd
Monitor - represents a Redis MONITOR command, allowing the user to capture and process all commands sent to a Redis server. This mimics the behavior of MONITOR in the redis-cli.
Notes: - Using MONITOR blocks the connection to the server for itself. It needs a dedicated connection - The user should create a channel of type string - This runs concurrently in the background. Trigger via the Start and Stop functions See further: Redis MONITOR command: https://redis.io/commands/monitor
func (Tx) ObjectIdleTime ¶
func (c Tx) ObjectIdleTime(ctx context.Context, key string) *DurationCmd
func (Tx) PExpireTime ¶
func (c Tx) PExpireTime(ctx context.Context, key string) *DurationCmd
func (*Tx) Pipelined ¶
Pipelined executes commands queued in the fn outside of the transaction. Use TxPipelined if you need transactional behavior.
func (Tx) PubSubChannels ¶
func (c Tx) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Tx) PubSubNumPat ¶
func (Tx) PubSubNumSub ¶
func (c Tx) PubSubNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Tx) PubSubShardChannels ¶
func (c Tx) PubSubShardChannels(ctx context.Context, pattern string) *StringSliceCmd
func (Tx) PubSubShardNumSub ¶
func (c Tx) PubSubShardNumSub(ctx context.Context, channels ...string) *MapStringIntCmd
func (Tx) RPopCount ¶
func (c Tx) RPopCount(ctx context.Context, key string, count int) *StringSliceCmd
func (Tx) RestoreReplace ¶
func (Tx) SDiffStore ¶
func (Tx) SInterCard ¶
func (Tx) SInterStore ¶
func (Tx) SMIsMember ¶
func (c Tx) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd
SMIsMember Redis `SMISMEMBER key member [member ...]` command.
func (Tx) SMembers ¶
func (c Tx) SMembers(ctx context.Context, key string) *StringSliceCmd
SMembers Redis `SMEMBERS key` command output as a slice.
func (Tx) SMembersMap ¶
func (c Tx) SMembersMap(ctx context.Context, key string) *StringStructMapCmd
SMembersMap Redis `SMEMBERS key` command output as a map.
func (Tx) SPopN ¶
func (c Tx) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd
SPopN Redis `SPOP key count` command.
func (Tx) SRandMember ¶
SRandMember Redis `SRANDMEMBER key` command.
func (Tx) SRandMemberN ¶
func (c Tx) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd
SRandMemberN Redis `SRANDMEMBER key count` command.
func (Tx) SUnionStore ¶
func (Tx) ScriptExists ¶
func (c Tx) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd
func (Tx) ScriptFlush ¶
func (Tx) ScriptKill ¶
func (Tx) Set ¶
func (c Tx) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
Set Redis `SET key value [expiration]` command. Use expiration for `SETEx`-like behavior.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Tx) SetArgs ¶
SetArgs supports all the options that the SET command supports. It is the alternative to the Set function when you want to have more control over the options.
func (Tx) SetEx ¶
func (c Tx) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
SetEx Redis `SETEx key expiration value` command.
func (Tx) SetNX ¶
func (c Tx) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetNX Redis `SET key value [expiration] NX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Tx) SetXX ¶
func (c Tx) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
SetXX Redis `SET key value [expiration] XX` command.
Zero expiration means the key has no expiration time. KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, otherwise you will receive an error: (error) ERR syntax error.
func (Tx) ShutdownNoSave ¶
func (Tx) ShutdownSave ¶
func (Tx) SlowLogGet ¶
func (c Tx) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd
func (Tx) SortInterfaces ¶
func (Tx) TDigestAdd ¶
TDigestAdd adds one or more elements to a t-Digest data structure. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.add/
func (Tx) TDigestByRank ¶
func (c Tx) TDigestByRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRank returns an array of values from a t-Digest data structure based on their rank. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrank/
func (Tx) TDigestByRevRank ¶
func (c Tx) TDigestByRevRank(ctx context.Context, key string, rank ...uint64) *FloatSliceCmd
TDigestByRevRank returns an array of values from a t-Digest data structure based on their reverse rank. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of floats representing the values at the specified ranks or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.byrevrank/
func (Tx) TDigestCDF ¶
func (c Tx) TDigestCDF(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestCDF returns an array of cumulative distribution function (CDF) values for one or more elements in a t-Digest data structure. The CDF value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the CDF values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.cdf/
func (Tx) TDigestCreate ¶
TDigestCreate creates an empty t-Digest data structure with default parameters. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Tx) TDigestCreateWithCompression ¶
func (c Tx) TDigestCreateWithCompression(ctx context.Context, key string, compression int64) *StatusCmd
TDigestCreateWithCompression creates an empty t-Digest data structure with a specified compression parameter. The compression parameter controls the accuracy and memory usage of the t-Digest. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.create/
func (Tx) TDigestInfo ¶
func (c Tx) TDigestInfo(ctx context.Context, key string) *TDigestInfoCmd
TDigestInfo returns information about a t-Digest data structure. For more information - https://redis.io/commands/tdigest.info/
func (Tx) TDigestMax ¶
TDigestMax returns the maximum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.max/
func (Tx) TDigestMerge ¶
func (c Tx) TDigestMerge(ctx context.Context, destKey string, options *TDigestMergeOptions, sourceKeys ...string) *StatusCmd
TDigestMerge merges multiple t-Digest data structures into a single t-Digest. This function also allows for specifying additional options such as compression and override behavior. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.merge/
func (Tx) TDigestMin ¶
TDigestMin returns the minimum value from a t-Digest data structure. For more information - https://redis.io/commands/tdigest.min/
func (Tx) TDigestQuantile ¶
func (c Tx) TDigestQuantile(ctx context.Context, key string, elements ...float64) *FloatSliceCmd
TDigestQuantile returns an array of quantile values for one or more elements in a t-Digest data structure. The quantile value for an element is the fraction of all elements in the t-Digest that are less than or equal to it. Returns an array of floats representing the quantile values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.quantile/
func (Tx) TDigestRank ¶
func (c Tx) TDigestRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRank returns an array of rank values for one or more elements in a t-Digest data structure. The rank of an element is its position in the sorted list of all elements in the t-Digest. Returns an array of integers representing the rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.rank/
func (Tx) TDigestReset ¶
TDigestReset resets a t-Digest data structure to its initial state. Returns OK on success or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.reset/
func (Tx) TDigestRevRank ¶
func (c Tx) TDigestRevRank(ctx context.Context, key string, values ...float64) *IntSliceCmd
TDigestRevRank returns an array of reverse rank values for one or more elements in a t-Digest data structure. The reverse rank of an element is its position in the sorted list of all elements in the t-Digest when sorted in descending order. Returns an array of integers representing the reverse rank values for each element or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.revrank/
func (Tx) TDigestTrimmedMean ¶
func (c Tx) TDigestTrimmedMean(ctx context.Context, key string, lowCutQuantile, highCutQuantile float64) *FloatCmd
TDigestTrimmedMean returns the trimmed mean value from a t-Digest data structure. The trimmed mean is calculated by removing a specified fraction of the highest and lowest values from the t-Digest and then calculating the mean of the remaining values. Returns a float representing the trimmed mean value or an error if the operation could not be completed. For more information - https://redis.io/commands/tdigest.trimmed_mean/
func (Tx) TFCall ¶
TFCall - invoke a function. For more information - https://redis.io/commands/tfcall/
func (Tx) TFCallASYNC ¶
TFCallASYNC - invoke an asynchronous JavaScript function (coroutine). For more information - https://redis.io/commands/TFCallASYNC/
func (Tx) TFCallASYNCArgs ¶
func (Tx) TFCallArgs ¶
func (Tx) TFunctionDelete ¶
TFunctionDelete - delete a JavaScript library from Redis. For more information - https://redis.io/commands/tfunction-delete/
func (Tx) TFunctionList ¶
func (c Tx) TFunctionList(ctx context.Context) *MapStringInterfaceSliceCmd
TFunctionList - list the functions with additional information about each function. For more information - https://redis.io/commands/tfunction-list/
func (Tx) TFunctionListArgs ¶
func (c Tx) TFunctionListArgs(ctx context.Context, options *TFunctionListOptions) *MapStringInterfaceSliceCmd
func (Tx) TFunctionLoad ¶
TFunctionLoad - load a new JavaScript library into Redis. For more information - https://redis.io/commands/tfunction-load/
func (Tx) TFunctionLoadArgs ¶
func (c Tx) TFunctionLoadArgs(ctx context.Context, lib string, options *TFunctionLoadOptions) *StatusCmd
func (Tx) TSAdd ¶
TSAdd - Adds one or more observations to a t-digest sketch. For more information - https://redis.io/commands/ts.add/
func (Tx) TSAddWithArgs ¶
func (c Tx) TSAddWithArgs(ctx context.Context, key string, timestamp interface{}, value float64, options *TSOptions) *IntCmd
TSAddWithArgs - Adds one or more observations to a t-digest sketch. This function also allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.add/
func (Tx) TSAlter ¶
func (c Tx) TSAlter(ctx context.Context, key string, options *TSAlterOptions) *StatusCmd
TSAlter - Alters an existing time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize and DuplicatePolicy. For more information - https://redis.io/commands/ts.alter/
func (Tx) TSCreate ¶
TSCreate - Creates a new time-series key. For more information - https://redis.io/commands/ts.create/
func (Tx) TSCreateRule ¶
func (c Tx) TSCreateRule(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int) *StatusCmd
TSCreateRule - Creates a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.createrule/
func (Tx) TSCreateRuleWithArgs ¶
func (c Tx) TSCreateRuleWithArgs(ctx context.Context, sourceKey string, destKey string, aggregator Aggregator, bucketDuration int, options *TSCreateRuleOptions) *StatusCmd
TSCreateRuleWithArgs - Creates a compaction rule from sourceKey to destKey with additional option. This function allows for specifying additional option such as: alignTimestamp. For more information - https://redis.io/commands/ts.createrule/
func (Tx) TSCreateWithArgs ¶
TSCreateWithArgs - Creates a new time-series key with additional options. This function allows for specifying additional options such as: Retention, ChunkSize, Encoding, DuplicatePolicy and Labels. For more information - https://redis.io/commands/ts.create/
func (Tx) TSDecrBy ¶
TSDecrBy - Decrements the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.decrby/
func (Tx) TSDecrByWithArgs ¶
func (c Tx) TSDecrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSDecrByWithArgs - Decrements the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.decrby/
func (Tx) TSDel ¶
TSDel - Deletes a range of samples from a time-series key. For more information - https://redis.io/commands/ts.del/
func (Tx) TSDeleteRule ¶
TSDeleteRule - Deletes a compaction rule from sourceKey to destKey. For more information - https://redis.io/commands/ts.deleterule/
func (Tx) TSGet ¶
func (c Tx) TSGet(ctx context.Context, key string) *TSTimestampValueCmd
TSGet - Gets the last sample of a time-series key. For more information - https://redis.io/commands/ts.get/
func (Tx) TSGetWithArgs ¶
func (c Tx) TSGetWithArgs(ctx context.Context, key string, options *TSGetOptions) *TSTimestampValueCmd
TSGetWithArgs - Gets the last sample of a time-series key with additional option. This function allows for specifying additional option such as: Latest. For more information - https://redis.io/commands/ts.get/
func (Tx) TSIncrBy ¶
TSIncrBy - Increments the value of a time-series key by the specified timestamp. For more information - https://redis.io/commands/ts.incrby/
func (Tx) TSIncrByWithArgs ¶
func (c Tx) TSIncrByWithArgs(ctx context.Context, key string, timestamp float64, options *TSIncrDecrOptions) *IntCmd
TSIncrByWithArgs - Increments the value of a time-series key by the specified timestamp with additional options. This function allows for specifying additional options such as: Timestamp, Retention, ChunkSize, Uncompressed and Labels. For more information - https://redis.io/commands/ts.incrby/
func (Tx) TSInfo ¶
func (c Tx) TSInfo(ctx context.Context, key string) *MapStringInterfaceCmd
TSInfo - Returns information about a time-series key. For more information - https://redis.io/commands/ts.info/
func (Tx) TSInfoWithArgs ¶
func (c Tx) TSInfoWithArgs(ctx context.Context, key string, options *TSInfoOptions) *MapStringInterfaceCmd
TSInfoWithArgs - Returns information about a time-series key with additional option. This function allows for specifying additional option such as: Debug. For more information - https://redis.io/commands/ts.info/
func (Tx) TSMAdd ¶
func (c Tx) TSMAdd(ctx context.Context, ktvSlices [][]interface{}) *IntSliceCmd
TSMAdd - Adds multiple samples to multiple time-series keys. It accepts a slice of 'ktv' slices, each containing exactly three elements: key, timestamp, and value. This struct must be provided for this command to work. For more information - https://redis.io/commands/ts.madd/
func (Tx) TSMGet ¶
func (c Tx) TSMGet(ctx context.Context, filters []string) *MapStringSliceInterfaceCmd
TSMGet - Returns the last sample of multiple time-series keys. For more information - https://redis.io/commands/ts.mget/
func (Tx) TSMGetWithArgs ¶
func (c Tx) TSMGetWithArgs(ctx context.Context, filters []string, options *TSMGetOptions) *MapStringSliceInterfaceCmd
TSMGetWithArgs - Returns the last sample of multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, WithLabels and SelectedLabels. For more information - https://redis.io/commands/ts.mget/
func (Tx) TSMRange ¶
func (c Tx) TSMRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRange - Returns a range of samples from multiple time-series keys. For more information - https://redis.io/commands/ts.mrange/
func (Tx) TSMRangeWithArgs ¶
func (c Tx) TSMRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRangeOptions) *MapStringSliceInterfaceCmd
TSMRangeWithArgs - Returns a range of samples from multiple time-series keys with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrange/
func (Tx) TSMRevRange ¶
func (c Tx) TSMRevRange(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string) *MapStringSliceInterfaceCmd
TSMRevRange - Returns a range of samples from multiple time-series keys in reverse order. For more information - https://redis.io/commands/ts.mrevrange/
func (Tx) TSMRevRangeWithArgs ¶
func (c Tx) TSMRevRangeWithArgs(ctx context.Context, fromTimestamp int, toTimestamp int, filterExpr []string, options *TSMRevRangeOptions) *MapStringSliceInterfaceCmd
TSMRevRangeWithArgs - Returns a range of samples from multiple time-series keys in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, WithLabels, SelectedLabels, Count, Align, Aggregator, BucketDuration, BucketTimestamp, Empty, GroupByLabel and Reducer. For more information - https://redis.io/commands/ts.mrevrange/
func (Tx) TSQueryIndex ¶
func (c Tx) TSQueryIndex(ctx context.Context, filterExpr []string) *StringSliceCmd
TSQueryIndex - Returns all the keys matching the filter expression. For more information - https://redis.io/commands/ts.queryindex/
func (Tx) TSRange ¶
func (c Tx) TSRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRange - Returns a range of samples from a time-series key. For more information - https://redis.io/commands/ts.range/
func (Tx) TSRangeWithArgs ¶
func (c Tx) TSRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRangeOptions) *TSTimestampValueSliceCmd
TSRangeWithArgs - Returns a range of samples from a time-series key with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.range/
func (Tx) TSRevRange ¶
func (c Tx) TSRevRange(ctx context.Context, key string, fromTimestamp int, toTimestamp int) *TSTimestampValueSliceCmd
TSRevRange - Returns a range of samples from a time-series key in reverse order. For more information - https://redis.io/commands/ts.revrange/
func (Tx) TSRevRangeWithArgs ¶
func (c Tx) TSRevRangeWithArgs(ctx context.Context, key string, fromTimestamp int, toTimestamp int, options *TSRevRangeOptions) *TSTimestampValueSliceCmd
TSRevRangeWithArgs - Returns a range of samples from a time-series key in reverse order with additional options. This function allows for specifying additional options such as: Latest, FilterByTS, FilterByValue, Count, Align, Aggregator, BucketDuration, BucketTimestamp and Empty. For more information - https://redis.io/commands/ts.revrange/
func (Tx) TopKAdd ¶
func (c Tx) TopKAdd(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKAdd adds one or more elements to a Top-K filter. Returns an array of strings representing the items that were removed from the filter, if any. For more information - https://redis.io/commands/topk.add/
func (Tx) TopKCount ¶
func (c Tx) TopKCount(ctx context.Context, key string, elements ...interface{}) *IntSliceCmd
TopKCount returns an estimate of the number of times an item may be in a Top-K filter. For more information - https://redis.io/commands/topk.count/
func (Tx) TopKIncrBy ¶
func (c Tx) TopKIncrBy(ctx context.Context, key string, elements ...interface{}) *StringSliceCmd
TopKIncrBy increases the count of one or more items in a Top-K filter. For more information - https://redis.io/commands/topk.incrby/
func (Tx) TopKInfo ¶
func (c Tx) TopKInfo(ctx context.Context, key string) *TopKInfoCmd
TopKInfo returns information about a Top-K filter. For more information - https://redis.io/commands/topk.info/
func (Tx) TopKList ¶
func (c Tx) TopKList(ctx context.Context, key string) *StringSliceCmd
TopKList returns all items in Top-K list. For more information - https://redis.io/commands/topk.list/
func (Tx) TopKListWithCount ¶
func (c Tx) TopKListWithCount(ctx context.Context, key string) *MapStringIntCmd
TopKListWithCount returns all items in Top-K list with their respective count. For more information - https://redis.io/commands/topk.list/
func (Tx) TopKQuery ¶
func (c Tx) TopKQuery(ctx context.Context, key string, elements ...interface{}) *BoolSliceCmd
TopKQuery check if multiple elements exist in a Top-K filter. Returns an array of booleans indicating whether each element exists in the filter or not. For more information - https://redis.io/commands/topk.query/
func (Tx) TopKReserve ¶
TopKReserve creates an empty Top-K filter with the specified number of top items to keep. For more information - https://redis.io/commands/topk.reserve/
func (Tx) TopKReserveWithOptions ¶
func (c Tx) TopKReserveWithOptions(ctx context.Context, key string, k int64, width, depth int64, decay float64) *StatusCmd
TopKReserveWithOptions creates an empty Top-K filter with the specified number of top items to keep and additional options. This function allows for specifying additional options such as width, depth and decay. For more information - https://redis.io/commands/topk.reserve/
func (*Tx) TxPipeline ¶
TxPipeline creates a pipeline. Usually it is more convenient to use TxPipelined.
func (*Tx) TxPipelined ¶
TxPipelined executes commands queued in the fn in the transaction.
When using WATCH, EXEC will execute commands only if the watched keys were not modified, allowing for a check-and-set mechanism.
Exec always returns list of commands. If transaction fails TxFailedErr is returned. Otherwise Exec returns an error of the first failed command or nil.
func (Tx) XAutoClaim ¶
func (c Tx) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd
func (Tx) XAutoClaimJustID ¶
func (c Tx) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd
func (Tx) XClaim ¶
func (c Tx) XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd
func (Tx) XClaimJustID ¶
func (c Tx) XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd
func (Tx) XGroupCreate ¶
func (Tx) XGroupCreateConsumer ¶
func (Tx) XGroupCreateMkStream ¶
func (Tx) XGroupDelConsumer ¶
func (Tx) XGroupDestroy ¶
func (Tx) XGroupSetID ¶
func (Tx) XInfoConsumers ¶
func (c Tx) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd
func (Tx) XInfoGroups ¶
func (c Tx) XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd
func (Tx) XInfoStream ¶
func (c Tx) XInfoStream(ctx context.Context, key string) *XInfoStreamCmd
func (Tx) XInfoStreamFull ¶
func (c Tx) XInfoStreamFull(ctx context.Context, key string, count int) *XInfoStreamFullCmd
XInfoStreamFull XINFO STREAM FULL [COUNT count] redis-server >= 6.0.
func (Tx) XPendingExt ¶
func (c Tx) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd
func (Tx) XRange ¶
func (c Tx) XRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Tx) XRangeN ¶
func (c Tx) XRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Tx) XReadGroup ¶
func (c Tx) XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd
func (Tx) XReadStreams ¶
func (c Tx) XReadStreams(ctx context.Context, streams ...string) *XStreamSliceCmd
func (Tx) XRevRange ¶
func (c Tx) XRevRange(ctx context.Context, stream, start, stop string) *XMessageSliceCmd
func (Tx) XRevRangeN ¶
func (c Tx) XRevRangeN(ctx context.Context, stream, start, stop string, count int64) *XMessageSliceCmd
func (Tx) XTrimMaxLen ¶
XTrimMaxLen No `~` rules are used, `limit` cannot be used. cmd: XTRIM key MAXLEN maxLen
func (Tx) XTrimMaxLenApprox ¶
func (Tx) XTrimMinID ¶
func (Tx) XTrimMinIDApprox ¶
func (Tx) ZAddArgsIncr ¶
func (Tx) ZDiff ¶
func (c Tx) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd
ZDiff redis-server version >= 6.2.0.
func (Tx) ZDiffStore ¶
ZDiffStore redis-server version >=6.2.0.
func (Tx) ZDiffWithScores ¶
ZDiffWithScores redis-server version >= 6.2.0.
func (Tx) ZInterCard ¶
func (Tx) ZInterStore ¶
func (Tx) ZInterWithScores ¶
func (Tx) ZMPop ¶
ZMPop Pops one or more elements with the highest or lowest score from the first non-empty sorted set key from the list of provided key names. direction: "max" (highest score) or "min" (lowest score), count: > 0 example: client.ZMPop(ctx, "max", 5, "set1", "set2")
func (Tx) ZMScore ¶
func (c Tx) ZMScore(ctx context.Context, key string, members ...string) *FloatSliceCmd
func (Tx) ZRandMember ¶
func (c Tx) ZRandMember(ctx context.Context, key string, count int) *StringSliceCmd
ZRandMember redis-server version >= 6.2.0.
func (Tx) ZRandMemberWithScores ¶
ZRandMemberWithScores redis-server version >= 6.2.0.
func (Tx) ZRange ¶
func (c Tx) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Tx) ZRangeArgs ¶
func (c Tx) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd
func (Tx) ZRangeArgsWithScores ¶
func (c Tx) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd
func (Tx) ZRangeByLex ¶
func (c Tx) ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Tx) ZRangeByScore ¶
func (c Tx) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Tx) ZRangeByScoreWithScores ¶
func (Tx) ZRangeStore ¶
func (c Tx) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd
func (Tx) ZRangeWithScores ¶
func (Tx) ZRankWithScore ¶
func (c Tx) ZRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
ZRankWithScore according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Tx) ZRemRangeByLex ¶
func (Tx) ZRemRangeByRank ¶
func (Tx) ZRemRangeByScore ¶
func (Tx) ZRevRange ¶
func (c Tx) ZRevRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd
func (Tx) ZRevRangeByLex ¶
func (c Tx) ZRevRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Tx) ZRevRangeByScore ¶
func (c Tx) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd
func (Tx) ZRevRangeByScoreWithScores ¶
func (Tx) ZRevRangeWithScores ¶
ZRevRangeWithScores according to the Redis documentation, if member does not exist in the sorted set or key does not exist, it will return a redis.Nil error.
func (Tx) ZRevRankWithScore ¶
func (c Tx) ZRevRankWithScore(ctx context.Context, key, member string) *RankWithScoreCmd
func (Tx) ZUnionStore ¶
type UniversalClient ¶
type UniversalClient interface { Cmdable AddHook(Hook) Watch(ctx context.Context, fn func(*Tx) error, keys ...string) error Do(ctx context.Context, args ...interface{}) *Cmd Process(ctx context.Context, cmd Cmder) error Subscribe(ctx context.Context, channels ...string) *PubSub PSubscribe(ctx context.Context, channels ...string) *PubSub SSubscribe(ctx context.Context, channels ...string) *PubSub Close() error PoolStats() *PoolStats }
UniversalClient is an abstract client which - based on the provided options - represents either a ClusterClient, a FailoverClient, or a single-node Client. This can be useful for testing cluster-specific applications locally or having different clients in different environments.
func NewUniversalClient ¶
func NewUniversalClient(opts *UniversalOptions) UniversalClient
NewUniversalClient returns a new multi client. The type of the returned client depends on the following conditions:
1. If the MasterName option is specified, a sentinel-backed FailoverClient is returned. 2. if the number of Addrs is two or more, a ClusterClient is returned. 3. Otherwise, a single-node Client is returned.
Example (Cluster) ¶
rdb := redis.NewUniversalClient(&redis.UniversalOptions{ Addrs: []string{":7000", ":7001", ":7002", ":7003", ":7004", ":7005"}, }) defer rdb.Close() rdb.Ping(ctx)
Output:
Example (Failover) ¶
rdb := redis.NewUniversalClient(&redis.UniversalOptions{ MasterName: "master", Addrs: []string{":26379"}, }) defer rdb.Close() rdb.Ping(ctx)
Output:
Example (Simple) ¶
rdb := redis.NewUniversalClient(&redis.UniversalOptions{ Addrs: []string{":6379"}, }) defer rdb.Close() rdb.Ping(ctx)
Output:
type UniversalOptions ¶
type UniversalOptions struct { // Either a single address or a seed list of host:port addresses // of cluster/sentinel nodes. Addrs []string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. ClientName string // Database to be selected after connecting to the server. // Only single-node and failover clients. DB int Dialer func(ctx context.Context, network, addr string) (net.Conn, error) OnConnect func(ctx context.Context, cn *Conn) error Protocol int Username string Password string SentinelUsername string SentinelPassword string MaxRetries int MinRetryBackoff time.Duration MaxRetryBackoff time.Duration DialTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration ContextTimeoutEnabled bool // PoolFIFO uses FIFO mode for each node connection pool GET/PUT (default LIFO). PoolFIFO bool PoolSize int PoolTimeout time.Duration MinIdleConns int MaxIdleConns int MaxActiveConns int ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration TLSConfig *tls.Config MaxRedirects int ReadOnly bool RouteByLatency bool RouteRandomly bool MasterName string DisableIndentity bool IdentitySuffix string UnstableResp3 bool }
UniversalOptions information is required by UniversalClient to establish connections.
func (*UniversalOptions) Cluster ¶
func (o *UniversalOptions) Cluster() *ClusterOptions
Cluster returns cluster options created from the universal options.
func (*UniversalOptions) Failover ¶
func (o *UniversalOptions) Failover() *FailoverOptions
Failover returns failover options created from the universal options.
func (*UniversalOptions) Simple ¶
func (o *UniversalOptions) Simple() *Options
Simple returns basic options created from the universal options.
type XAddArgs ¶
type XAddArgs struct { Stream string NoMkStream bool MaxLen int64 // MAXLEN N MinID string // Approx causes MaxLen and MinID to use "~" matcher (instead of "="). Approx bool Limit int64 ID string Values interface{} }
XAddArgs accepts values in the following formats:
- XAddArgs.Values = []interface{}{"key1", "value1", "key2", "value2"}
- XAddArgs.Values = []string("key1", "value1", "key2", "value2")
- XAddArgs.Values = map[string]interface{}{"key1": "value1", "key2": "value2"}
Note that map will not preserve the order of key-value pairs. MaxLen/MaxLenApprox and MinID are in conflict, only one of them can be used.
type XAutoClaimArgs ¶
type XAutoClaimCmd ¶
type XAutoClaimCmd struct {
// contains filtered or unexported fields
}
func NewXAutoClaimCmd ¶
func NewXAutoClaimCmd(ctx context.Context, args ...interface{}) *XAutoClaimCmd
func (*XAutoClaimCmd) Result ¶
func (cmd *XAutoClaimCmd) Result() (messages []XMessage, start string, err error)
func (*XAutoClaimCmd) SetFirstKeyPos ¶
func (cmd *XAutoClaimCmd) SetFirstKeyPos(keyPos int8)
func (*XAutoClaimCmd) SetVal ¶
func (cmd *XAutoClaimCmd) SetVal(val []XMessage, start string)
func (*XAutoClaimCmd) String ¶
func (cmd *XAutoClaimCmd) String() string
func (*XAutoClaimCmd) Val ¶
func (cmd *XAutoClaimCmd) Val() (messages []XMessage, start string)
type XAutoClaimJustIDCmd ¶
type XAutoClaimJustIDCmd struct {
// contains filtered or unexported fields
}
func NewXAutoClaimJustIDCmd ¶
func NewXAutoClaimJustIDCmd(ctx context.Context, args ...interface{}) *XAutoClaimJustIDCmd
func (*XAutoClaimJustIDCmd) Result ¶
func (cmd *XAutoClaimJustIDCmd) Result() (ids []string, start string, err error)
func (*XAutoClaimJustIDCmd) SetFirstKeyPos ¶
func (cmd *XAutoClaimJustIDCmd) SetFirstKeyPos(keyPos int8)
func (*XAutoClaimJustIDCmd) SetVal ¶
func (cmd *XAutoClaimJustIDCmd) SetVal(val []string, start string)
func (*XAutoClaimJustIDCmd) String ¶
func (cmd *XAutoClaimJustIDCmd) String() string
func (*XAutoClaimJustIDCmd) Val ¶
func (cmd *XAutoClaimJustIDCmd) Val() (ids []string, start string)
type XClaimArgs ¶
type XInfoConsumer ¶
type XInfoConsumersCmd ¶
type XInfoConsumersCmd struct {
// contains filtered or unexported fields
}
func NewXInfoConsumersCmd ¶
func NewXInfoConsumersCmd(ctx context.Context, stream string, group string) *XInfoConsumersCmd
func (*XInfoConsumersCmd) Result ¶
func (cmd *XInfoConsumersCmd) Result() ([]XInfoConsumer, error)
func (*XInfoConsumersCmd) SetFirstKeyPos ¶
func (cmd *XInfoConsumersCmd) SetFirstKeyPos(keyPos int8)
func (*XInfoConsumersCmd) SetVal ¶
func (cmd *XInfoConsumersCmd) SetVal(val []XInfoConsumer)
func (*XInfoConsumersCmd) String ¶
func (cmd *XInfoConsumersCmd) String() string
func (*XInfoConsumersCmd) Val ¶
func (cmd *XInfoConsumersCmd) Val() []XInfoConsumer
type XInfoGroup ¶
type XInfoGroupsCmd ¶
type XInfoGroupsCmd struct {
// contains filtered or unexported fields
}
func NewXInfoGroupsCmd ¶
func NewXInfoGroupsCmd(ctx context.Context, stream string) *XInfoGroupsCmd
func (*XInfoGroupsCmd) Result ¶
func (cmd *XInfoGroupsCmd) Result() ([]XInfoGroup, error)
func (*XInfoGroupsCmd) SetFirstKeyPos ¶
func (cmd *XInfoGroupsCmd) SetFirstKeyPos(keyPos int8)
func (*XInfoGroupsCmd) SetVal ¶
func (cmd *XInfoGroupsCmd) SetVal(val []XInfoGroup)
func (*XInfoGroupsCmd) String ¶
func (cmd *XInfoGroupsCmd) String() string
func (*XInfoGroupsCmd) Val ¶
func (cmd *XInfoGroupsCmd) Val() []XInfoGroup
type XInfoStream ¶
type XInfoStreamCmd ¶
type XInfoStreamCmd struct {
// contains filtered or unexported fields
}
func NewXInfoStreamCmd ¶
func NewXInfoStreamCmd(ctx context.Context, stream string) *XInfoStreamCmd
func (*XInfoStreamCmd) Result ¶
func (cmd *XInfoStreamCmd) Result() (*XInfoStream, error)
func (*XInfoStreamCmd) SetFirstKeyPos ¶
func (cmd *XInfoStreamCmd) SetFirstKeyPos(keyPos int8)
func (*XInfoStreamCmd) SetVal ¶
func (cmd *XInfoStreamCmd) SetVal(val *XInfoStream)
func (*XInfoStreamCmd) String ¶
func (cmd *XInfoStreamCmd) String() string
func (*XInfoStreamCmd) Val ¶
func (cmd *XInfoStreamCmd) Val() *XInfoStream
type XInfoStreamConsumer ¶
type XInfoStreamFull ¶
type XInfoStreamFullCmd ¶
type XInfoStreamFullCmd struct {
// contains filtered or unexported fields
}
func NewXInfoStreamFullCmd ¶
func NewXInfoStreamFullCmd(ctx context.Context, args ...interface{}) *XInfoStreamFullCmd
func (*XInfoStreamFullCmd) Result ¶
func (cmd *XInfoStreamFullCmd) Result() (*XInfoStreamFull, error)
func (*XInfoStreamFullCmd) SetFirstKeyPos ¶
func (cmd *XInfoStreamFullCmd) SetFirstKeyPos(keyPos int8)
func (*XInfoStreamFullCmd) SetVal ¶
func (cmd *XInfoStreamFullCmd) SetVal(val *XInfoStreamFull)
func (*XInfoStreamFullCmd) String ¶
func (cmd *XInfoStreamFullCmd) String() string
func (*XInfoStreamFullCmd) Val ¶
func (cmd *XInfoStreamFullCmd) Val() *XInfoStreamFull
type XInfoStreamGroup ¶
type XInfoStreamGroup struct { Name string LastDeliveredID string EntriesRead int64 Lag int64 PelCount int64 Pending []XInfoStreamGroupPending Consumers []XInfoStreamConsumer }
type XInfoStreamGroupPending ¶
type XMessageSliceCmd ¶
type XMessageSliceCmd struct {
// contains filtered or unexported fields
}
func NewXMessageSliceCmd ¶
func NewXMessageSliceCmd(ctx context.Context, args ...interface{}) *XMessageSliceCmd
func NewXMessageSliceCmdResult ¶
func NewXMessageSliceCmdResult(val []XMessage, err error) *XMessageSliceCmd
NewXMessageSliceCmdResult returns a XMessageSliceCmd initialised with val and err for testing.
func (*XMessageSliceCmd) Result ¶
func (cmd *XMessageSliceCmd) Result() ([]XMessage, error)
func (*XMessageSliceCmd) SetFirstKeyPos ¶
func (cmd *XMessageSliceCmd) SetFirstKeyPos(keyPos int8)
func (*XMessageSliceCmd) SetVal ¶
func (cmd *XMessageSliceCmd) SetVal(val []XMessage)
func (*XMessageSliceCmd) String ¶
func (cmd *XMessageSliceCmd) String() string
func (*XMessageSliceCmd) Val ¶
func (cmd *XMessageSliceCmd) Val() []XMessage
type XPendingCmd ¶
type XPendingCmd struct {
// contains filtered or unexported fields
}
func NewXPendingCmd ¶
func NewXPendingCmd(ctx context.Context, args ...interface{}) *XPendingCmd
func NewXPendingResult ¶
func NewXPendingResult(val *XPending, err error) *XPendingCmd
NewXPendingResult returns a XPendingCmd initialised with val and err for testing.
func (*XPendingCmd) Result ¶
func (cmd *XPendingCmd) Result() (*XPending, error)
func (*XPendingCmd) SetFirstKeyPos ¶
func (cmd *XPendingCmd) SetFirstKeyPos(keyPos int8)
func (*XPendingCmd) SetVal ¶
func (cmd *XPendingCmd) SetVal(val *XPending)
func (*XPendingCmd) String ¶
func (cmd *XPendingCmd) String() string
func (*XPendingCmd) Val ¶
func (cmd *XPendingCmd) Val() *XPending
type XPendingExt ¶
type XPendingExtArgs ¶
type XPendingExtCmd ¶
type XPendingExtCmd struct {
// contains filtered or unexported fields
}
func NewXPendingExtCmd ¶
func NewXPendingExtCmd(ctx context.Context, args ...interface{}) *XPendingExtCmd
func (*XPendingExtCmd) Result ¶
func (cmd *XPendingExtCmd) Result() ([]XPendingExt, error)
func (*XPendingExtCmd) SetFirstKeyPos ¶
func (cmd *XPendingExtCmd) SetFirstKeyPos(keyPos int8)
func (*XPendingExtCmd) SetVal ¶
func (cmd *XPendingExtCmd) SetVal(val []XPendingExt)
func (*XPendingExtCmd) String ¶
func (cmd *XPendingExtCmd) String() string
func (*XPendingExtCmd) Val ¶
func (cmd *XPendingExtCmd) Val() []XPendingExt
type XReadGroupArgs ¶
type XStreamSliceCmd ¶
type XStreamSliceCmd struct {
// contains filtered or unexported fields
}
func NewXStreamSliceCmd ¶
func NewXStreamSliceCmd(ctx context.Context, args ...interface{}) *XStreamSliceCmd
func NewXStreamSliceCmdResult ¶
func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd
NewXStreamSliceCmdResult returns a XStreamSliceCmd initialised with val and err for testing.
func (*XStreamSliceCmd) Result ¶
func (cmd *XStreamSliceCmd) Result() ([]XStream, error)
func (*XStreamSliceCmd) SetFirstKeyPos ¶
func (cmd *XStreamSliceCmd) SetFirstKeyPos(keyPos int8)
func (*XStreamSliceCmd) SetVal ¶
func (cmd *XStreamSliceCmd) SetVal(val []XStream)
func (*XStreamSliceCmd) String ¶
func (cmd *XStreamSliceCmd) String() string
func (*XStreamSliceCmd) Val ¶
func (cmd *XStreamSliceCmd) Val() []XStream
type ZRangeArgs ¶
type ZRangeArgs struct { Key string // When the ByScore option is provided, the open interval(exclusive) can be set. // By default, the score intervals specified by <Start> and <Stop> are closed (inclusive). // It is similar to the deprecated(6.2.0+) ZRangeByScore command. // For example: // ZRangeArgs{ // Key: "example-key", // Start: "(3", // Stop: 8, // ByScore: true, // } // cmd: "ZRange example-key (3 8 ByScore" (3 < score <= 8). // // For the ByLex option, it is similar to the deprecated(6.2.0+) ZRangeByLex command. // You can set the <Start> and <Stop> options as follows: // ZRangeArgs{ // Key: "example-key", // Start: "[abc", // Stop: "(def", // ByLex: true, // } // cmd: "ZRange example-key [abc (def ByLex" // // For normal cases (ByScore==false && ByLex==false), <Start> and <Stop> should be set to the index range (int). // You can read the documentation for more information: https://redis.io/commands/zrange Start interface{} Stop interface{} // The ByScore and ByLex options are mutually exclusive. ByScore bool ByLex bool Rev bool // limit offset count. Offset int64 Count int64 }
ZRangeArgs is all the options of the ZRange command. In version> 6.2.0, you can replace the(cmd):
ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZRANGEBYLEX, ZREVRANGEBYLEX.
Please pay attention to your redis-server version.
Rev, ByScore, ByLex and Offset+Count options require redis-server 6.2.0 and higher.
type ZSliceCmd ¶
type ZSliceCmd struct {
// contains filtered or unexported fields
}
func NewZSliceCmd ¶
func NewZSliceCmdResult ¶
NewZSliceCmdResult returns a ZSliceCmd initialised with val and err for testing.
func (*ZSliceCmd) SetFirstKeyPos ¶
func (cmd *ZSliceCmd) SetFirstKeyPos(keyPos int8)
type ZSliceWithKeyCmd ¶
type ZSliceWithKeyCmd struct {
// contains filtered or unexported fields
}
func NewZSliceWithKeyCmd ¶
func NewZSliceWithKeyCmd(ctx context.Context, args ...interface{}) *ZSliceWithKeyCmd
func (*ZSliceWithKeyCmd) SetFirstKeyPos ¶
func (cmd *ZSliceWithKeyCmd) SetFirstKeyPos(keyPos int8)
func (*ZSliceWithKeyCmd) SetVal ¶
func (cmd *ZSliceWithKeyCmd) SetVal(key string, val []Z)
func (*ZSliceWithKeyCmd) String ¶
func (cmd *ZSliceWithKeyCmd) String() string
func (*ZSliceWithKeyCmd) Val ¶
func (cmd *ZSliceWithKeyCmd) Val() (string, []Z)
type ZWithKey ¶
ZWithKey represents sorted set member including the name of the key where it was popped.
type ZWithKeyCmd ¶
type ZWithKeyCmd struct {
// contains filtered or unexported fields
}
func NewZWithKeyCmd ¶
func NewZWithKeyCmd(ctx context.Context, args ...interface{}) *ZWithKeyCmd
func NewZWithKeyCmdResult ¶
func NewZWithKeyCmdResult(val *ZWithKey, err error) *ZWithKeyCmd
NewZWithKeyCmdResult returns a ZWithKeyCmd initialised with val and err for testing.
func (*ZWithKeyCmd) Result ¶
func (cmd *ZWithKeyCmd) Result() (*ZWithKey, error)
func (*ZWithKeyCmd) SetFirstKeyPos ¶
func (cmd *ZWithKeyCmd) SetFirstKeyPos(keyPos int8)
func (*ZWithKeyCmd) SetVal ¶
func (cmd *ZWithKeyCmd) SetVal(val *ZWithKey)
func (*ZWithKeyCmd) String ¶
func (cmd *ZWithKeyCmd) String() string
func (*ZWithKeyCmd) Val ¶
func (cmd *ZWithKeyCmd) Val() *ZWithKey
Source Files ¶
- acl_commands.go
- bitmap_commands.go
- cluster_commands.go
- command.go
- commands.go
- doc.go
- error.go
- gears_commands.go
- generic_commands.go
- geo_commands.go
- hash_commands.go
- hyperloglog_commands.go
- iterator.go
- json.go
- list_commands.go
- options.go
- osscluster.go
- osscluster_commands.go
- pipeline.go
- probabilistic.go
- pubsub.go
- pubsub_commands.go
- redis.go
- result.go
- ring.go
- script.go
- scripting_commands.go
- search_commands.go
- sentinel.go
- set_commands.go
- sortedset_commands.go
- stream_commands.go
- string_commands.go
- timeseries_commands.go
- tx.go
- universal.go
- version.go