Documentation ¶
Index ¶
- type Param
- type Redis
- func (r *Redis) Append(key, value string) *redis.IntCmd
- func (r *Redis) BLPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd
- func (r *Redis) BRPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd
- func (r *Redis) BRPopLPush(source, destination string, timeout time.Duration) *redis.StringCmd
- func (r *Redis) BZPopMax(timeout time.Duration, keys ...string) *redis.ZWithKeyCmd
- func (r *Redis) BZPopMin(timeout time.Duration, keys ...string) *redis.ZWithKeyCmd
- func (r *Redis) BgRewriteAOF() *redis.StatusCmd
- func (r *Redis) BgSave() *redis.StatusCmd
- func (r *Redis) BitCount(key string, bitCount *redis.BitCount) *redis.IntCmd
- func (r *Redis) BitOpAnd(destKey string, keys ...string) *redis.IntCmd
- func (r *Redis) BitOpNot(destKey string, key string) *redis.IntCmd
- func (r *Redis) BitOpOr(destKey string, keys ...string) *redis.IntCmd
- func (r *Redis) BitOpXor(destKey string, keys ...string) *redis.IntCmd
- func (r *Redis) BitPos(key string, bit int64, pos ...int64) *redis.IntCmd
- func (r *Redis) ClientGetName() *redis.StringCmd
- func (r *Redis) ClientID() *redis.IntCmd
- func (r *Redis) ClientKill(ipPort string) *redis.StatusCmd
- func (r *Redis) ClientKillByFilter(keys ...string) *redis.IntCmd
- func (r *Redis) ClientList() *redis.StringCmd
- func (r *Redis) ClientPause(dur time.Duration) *redis.BoolCmd
- func (r *Redis) ClusterAddSlots(slots ...int) *redis.StatusCmd
- func (r *Redis) ClusterAddSlotsRange(min, max int) *redis.StatusCmd
- func (r *Redis) ClusterCountFailureReports(nodeID string) *redis.IntCmd
- func (r *Redis) ClusterCountKeysInSlot(slot int) *redis.IntCmd
- func (r *Redis) ClusterDelSlots(slots ...int) *redis.StatusCmd
- func (r *Redis) ClusterDelSlotsRange(min, max int) *redis.StatusCmd
- func (r *Redis) ClusterFailover() *redis.StatusCmd
- func (r *Redis) ClusterForget(nodeID string) *redis.StatusCmd
- func (r *Redis) ClusterGetKeysInSlot(slot int, count int) *redis.StringSliceCmd
- func (r *Redis) ClusterInfo() *redis.StringCmd
- func (r *Redis) ClusterKeySlot(key string) *redis.IntCmd
- func (r *Redis) ClusterMeet(host, port string) *redis.StatusCmd
- func (r *Redis) ClusterNodes() *redis.StringCmd
- func (r *Redis) ClusterReplicate(nodeID string) *redis.StatusCmd
- func (r *Redis) ClusterResetHard() *redis.StatusCmd
- func (r *Redis) ClusterResetSoft() *redis.StatusCmd
- func (r *Redis) ClusterSaveConfig() *redis.StatusCmd
- func (r *Redis) ClusterSlaves(nodeID string) *redis.StringSliceCmd
- func (r *Redis) ClusterSlots() *redis.ClusterSlotsCmd
- func (r *Redis) Command() *redis.CommandsInfoCmd
- func (r *Redis) ConfigGet(parameter string) *redis.SliceCmd
- func (r *Redis) ConfigResetStat() *redis.StatusCmd
- func (r *Redis) ConfigRewrite() *redis.StatusCmd
- func (r *Redis) ConfigSet(parameter, value string) *redis.StatusCmd
- func (r *Redis) Context() context.Context
- func (r *Redis) DBSize() *redis.IntCmd
- func (r *Redis) DebugObject(key string) *redis.StringCmd
- func (r *Redis) Decr(key string) *redis.IntCmd
- func (r *Redis) DecrBy(key string, decrement int64) *redis.IntCmd
- func (r *Redis) Del(keys ...string) *redis.IntCmd
- func (r *Redis) Dump(key string) *redis.StringCmd
- func (r *Redis) Echo(message interface{}) *redis.StringCmd
- func (r *Redis) Eval(script string, keys []string, args ...interface{}) *redis.Cmd
- func (r *Redis) EvalSha(sha1 string, keys []string, args ...interface{}) *redis.Cmd
- func (r *Redis) Exists(keys ...string) *redis.IntCmd
- func (r *Redis) Expire(key string, expiration time.Duration) *redis.BoolCmd
- func (r *Redis) ExpireAt(key string, tm time.Time) *redis.BoolCmd
- func (r *Redis) FlushAll() *redis.StatusCmd
- func (r *Redis) FlushAllAsync() *redis.StatusCmd
- func (r *Redis) FlushDB() *redis.StatusCmd
- func (r *Redis) FlushDBAsync() *redis.StatusCmd
- func (r *Redis) GeoAdd(key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd
- func (r *Redis) GeoDist(key string, member1, member2, unit string) *redis.FloatCmd
- func (r *Redis) GeoHash(key string, members ...string) *redis.StringSliceCmd
- func (r *Redis) GeoPos(key string, members ...string) *redis.GeoPosCmd
- func (r *Redis) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (r *Redis) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (r *Redis) GeoRadiusByMemberRO(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (r *Redis) GeoRadiusRO(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (r *Redis) Get(key string) *redis.StringCmd
- func (r *Redis) GetBit(key string, offset int64) *redis.IntCmd
- func (r *Redis) GetRange(key string, start, end int64) *redis.StringCmd
- func (r *Redis) GetSet(key string, value interface{}) *redis.StringCmd
- func (r *Redis) HDel(key string, fields ...string) *redis.IntCmd
- func (r *Redis) HExists(key, field string) *redis.BoolCmd
- func (r *Redis) HGet(key, field string) *redis.StringCmd
- func (r *Redis) HGetAll(key string) *redis.StringStringMapCmd
- func (r *Redis) HIncrBy(key, field string, incr int64) *redis.IntCmd
- func (r *Redis) HIncrByFloat(key, field string, incr float64) *redis.FloatCmd
- func (r *Redis) HKeys(key string) *redis.StringSliceCmd
- func (r *Redis) HLen(key string) *redis.IntCmd
- func (r *Redis) HMGet(key string, fields ...string) *redis.SliceCmd
- func (r *Redis) HMSet(key string, fields map[string]interface{}) *redis.StatusCmd
- func (r *Redis) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (r *Redis) HSet(key, field string, value interface{}) *redis.BoolCmd
- func (r *Redis) HSetNX(key, field string, value interface{}) *redis.BoolCmd
- func (r *Redis) HVals(key string) *redis.StringSliceCmd
- func (r *Redis) Incr(key string) *redis.IntCmd
- func (r *Redis) IncrBy(key string, value int64) *redis.IntCmd
- func (r *Redis) IncrByFloat(key string, value float64) *redis.FloatCmd
- func (r *Redis) Info(section ...string) *redis.StringCmd
- func (r *Redis) Keys(pattern string) *redis.StringSliceCmd
- func (r *Redis) LIndex(key string, index int64) *redis.StringCmd
- func (r *Redis) LInsert(key, op string, pivot, value interface{}) *redis.IntCmd
- func (r *Redis) LInsertAfter(key string, pivot, value interface{}) *redis.IntCmd
- func (r *Redis) LInsertBefore(key string, pivot, value interface{}) *redis.IntCmd
- func (r *Redis) LLen(key string) *redis.IntCmd
- func (r *Redis) LPop(key string) *redis.StringCmd
- func (r *Redis) LPush(key string, values ...interface{}) *redis.IntCmd
- func (r *Redis) LPushX(key string, value interface{}) *redis.IntCmd
- func (r *Redis) LRange(key string, start, stop int64) *redis.StringSliceCmd
- func (r *Redis) LRem(key string, count int64, value interface{}) *redis.IntCmd
- func (r *Redis) LSet(key string, index int64, value interface{}) *redis.StatusCmd
- func (r *Redis) LTrim(key string, start, stop int64) *redis.StatusCmd
- func (r *Redis) LastSave() *redis.IntCmd
- func (r *Redis) MGet(keys ...string) *redis.SliceCmd
- func (r *Redis) MSet(pairs ...interface{}) *redis.StatusCmd
- func (r *Redis) MSetNX(pairs ...interface{}) *redis.BoolCmd
- func (r *Redis) MemoryUsage(key string, samples ...int) *redis.IntCmd
- func (r *Redis) Migrate(host, port, key string, db int64, timeout time.Duration) *redis.StatusCmd
- func (r *Redis) Move(key string, db int64) *redis.BoolCmd
- func (r *Redis) ObjectEncoding(key string) *redis.StringCmd
- func (r *Redis) ObjectIdleTime(key string) *redis.DurationCmd
- func (r *Redis) ObjectRefCount(key string) *redis.IntCmd
- func (r *Redis) Options() *redis.Options
- func (r *Redis) PExpire(key string, expiration time.Duration) *redis.BoolCmd
- func (r *Redis) PExpireAt(key string, tm time.Time) *redis.BoolCmd
- func (r *Redis) PFAdd(key string, els ...interface{}) *redis.IntCmd
- func (r *Redis) PFCount(keys ...string) *redis.IntCmd
- func (r *Redis) PFMerge(dest string, keys ...string) *redis.StatusCmd
- func (r *Redis) PSubscribe(channels ...string) *redis.PubSub
- func (r *Redis) PTTL(key string) *redis.DurationCmd
- func (r *Redis) Persist(key string) *redis.BoolCmd
- func (r *Redis) Ping() *redis.StatusCmd
- func (r *Redis) Pipeline() redis.Pipeliner
- func (r *Redis) Pipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error)
- func (r *Redis) PoolStats() *redis.PoolStats
- func (r *Redis) PubSubChannels(pattern string) *redis.StringSliceCmd
- func (r *Redis) PubSubNumPat() *redis.IntCmd
- func (r *Redis) PubSubNumSub(channels ...string) *redis.StringIntMapCmd
- func (r *Redis) Publish(channel string, message interface{}) *redis.IntCmd
- func (r *Redis) Quit() *redis.StatusCmd
- func (r *Redis) RPop(key string) *redis.StringCmd
- func (r *Redis) RPopLPush(source, destination string) *redis.StringCmd
- func (r *Redis) RPush(key string, values ...interface{}) *redis.IntCmd
- func (r *Redis) RPushX(key string, value interface{}) *redis.IntCmd
- func (r *Redis) RandomKey() *redis.StringCmd
- func (r *Redis) ReadOnly() *redis.StatusCmd
- func (r *Redis) ReadWrite() *redis.StatusCmd
- func (r *Redis) Rename(key, newkey string) *redis.StatusCmd
- func (r *Redis) RenameNX(key, newkey string) *redis.BoolCmd
- func (r *Redis) Restore(key string, ttl time.Duration, value string) *redis.StatusCmd
- func (r *Redis) RestoreReplace(key string, ttl time.Duration, value string) *redis.StatusCmd
- func (r *Redis) SAdd(key string, members ...interface{}) *redis.IntCmd
- func (r *Redis) SCard(key string) *redis.IntCmd
- func (r *Redis) SDiff(keys ...string) *redis.StringSliceCmd
- func (r *Redis) SDiffStore(destination string, keys ...string) *redis.IntCmd
- func (r *Redis) SInter(keys ...string) *redis.StringSliceCmd
- func (r *Redis) SInterStore(destination string, keys ...string) *redis.IntCmd
- func (r *Redis) SIsMember(key string, member interface{}) *redis.BoolCmd
- func (r *Redis) SMembers(key string) *redis.StringSliceCmd
- func (r *Redis) SMembersMap(key string) *redis.StringStructMapCmd
- func (r *Redis) SMove(source, destination string, member interface{}) *redis.BoolCmd
- func (r *Redis) SPop(key string) *redis.StringCmd
- func (r *Redis) SPopN(key string, count int64) *redis.StringSliceCmd
- func (r *Redis) SRandMember(key string) *redis.StringCmd
- func (r *Redis) SRandMemberN(key string, count int64) *redis.StringSliceCmd
- func (r *Redis) SRem(key string, members ...interface{}) *redis.IntCmd
- func (r *Redis) SScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (r *Redis) SUnion(keys ...string) *redis.StringSliceCmd
- func (r *Redis) SUnionStore(destination string, keys ...string) *redis.IntCmd
- func (r *Redis) Save() *redis.StatusCmd
- func (r *Redis) Scan(cursor uint64, match string, count int64) *redis.ScanCmd
- func (r *Redis) ScriptExists(hashes ...string) *redis.BoolSliceCmd
- func (r *Redis) ScriptFlush() *redis.StatusCmd
- func (r *Redis) ScriptKill() *redis.StatusCmd
- func (r *Redis) ScriptLoad(script string) *redis.StringCmd
- func (r *Redis) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd
- func (r *Redis) SetBit(key string, offset int64, value int) *redis.IntCmd
- func (r *Redis) SetLimiter(l redis.Limiter) RedisIOCInterface
- func (r *Redis) SetNX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- func (r *Redis) SetRange(key string, offset int64, value string) *redis.IntCmd
- func (r *Redis) SetXX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- func (r *Redis) Shutdown() *redis.StatusCmd
- func (r *Redis) ShutdownNoSave() *redis.StatusCmd
- func (r *Redis) ShutdownSave() *redis.StatusCmd
- func (r *Redis) SlaveOf(host, port string) *redis.StatusCmd
- func (r *Redis) Sort(key string, sort *redis.Sort) *redis.StringSliceCmd
- func (r *Redis) SortInterfaces(key string, sort *redis.Sort) *redis.SliceCmd
- func (r *Redis) SortStore(key, store string, sort *redis.Sort) *redis.IntCmd
- func (r *Redis) StrLen(key string) *redis.IntCmd
- func (r *Redis) Subscribe(channels ...string) *redis.PubSub
- func (r *Redis) TTL(key string) *redis.DurationCmd
- func (r *Redis) Time() *redis.TimeCmd
- func (r *Redis) Touch(keys ...string) *redis.IntCmd
- func (r *Redis) TxPipeline() redis.Pipeliner
- func (r *Redis) TxPipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error)
- func (r *Redis) Type(key string) *redis.StatusCmd
- func (r *Redis) Unlink(keys ...string) *redis.IntCmd
- func (r *Redis) WithContext(ctx context.Context) RedisIOCInterface
- func (r *Redis) XAck(stream, group string, ids ...string) *redis.IntCmd
- func (r *Redis) XAdd(a *redis.XAddArgs) *redis.StringCmd
- func (r *Redis) XClaim(a *redis.XClaimArgs) *redis.XMessageSliceCmd
- func (r *Redis) XClaimJustID(a *redis.XClaimArgs) *redis.StringSliceCmd
- func (r *Redis) XDel(stream string, ids ...string) *redis.IntCmd
- func (r *Redis) XGroupCreate(stream, group, start string) *redis.StatusCmd
- func (r *Redis) XGroupCreateMkStream(stream, group, start string) *redis.StatusCmd
- func (r *Redis) XGroupDelConsumer(stream, group, consumer string) *redis.IntCmd
- func (r *Redis) XGroupDestroy(stream, group string) *redis.IntCmd
- func (r *Redis) XGroupSetID(stream, group, start string) *redis.StatusCmd
- func (r *Redis) XLen(stream string) *redis.IntCmd
- func (r *Redis) XPending(stream, group string) *redis.XPendingCmd
- func (r *Redis) XPendingExt(a *redis.XPendingExtArgs) *redis.XPendingExtCmd
- func (r *Redis) XRange(stream, start, stop string) *redis.XMessageSliceCmd
- func (r *Redis) XRangeN(stream, start, stop string, count int64) *redis.XMessageSliceCmd
- func (r *Redis) XRead(a *redis.XReadArgs) *redis.XStreamSliceCmd
- func (r *Redis) XReadGroup(a *redis.XReadGroupArgs) *redis.XStreamSliceCmd
- func (r *Redis) XReadStreams(streams ...string) *redis.XStreamSliceCmd
- func (r *Redis) XRevRange(stream string, start, stop string) *redis.XMessageSliceCmd
- func (r *Redis) XRevRangeN(stream string, start, stop string, count int64) *redis.XMessageSliceCmd
- func (r *Redis) XTrim(key string, maxLen int64) *redis.IntCmd
- func (r *Redis) XTrimApprox(key string, maxLen int64) *redis.IntCmd
- func (r *Redis) ZAdd(key string, members ...redis.Z) *redis.IntCmd
- func (r *Redis) ZAddCh(key string, members ...redis.Z) *redis.IntCmd
- func (r *Redis) ZAddNX(key string, members ...redis.Z) *redis.IntCmd
- func (r *Redis) ZAddNXCh(key string, members ...redis.Z) *redis.IntCmd
- func (r *Redis) ZAddXX(key string, members ...redis.Z) *redis.IntCmd
- func (r *Redis) ZAddXXCh(key string, members ...redis.Z) *redis.IntCmd
- func (r *Redis) ZCard(key string) *redis.IntCmd
- func (r *Redis) ZCount(key, min, max string) *redis.IntCmd
- func (r *Redis) ZIncr(key string, member redis.Z) *redis.FloatCmd
- func (r *Redis) ZIncrBy(key string, increment float64, member string) *redis.FloatCmd
- func (r *Redis) ZIncrNX(key string, member redis.Z) *redis.FloatCmd
- func (r *Redis) ZIncrXX(key string, member redis.Z) *redis.FloatCmd
- func (r *Redis) ZInterStore(destination string, store redis.ZStore, keys ...string) *redis.IntCmd
- func (r *Redis) ZLexCount(key, min, max string) *redis.IntCmd
- func (r *Redis) ZPopMax(key string, count ...int64) *redis.ZSliceCmd
- func (r *Redis) ZPopMin(key string, count ...int64) *redis.ZSliceCmd
- func (r *Redis) ZRange(key string, start, stop int64) *redis.StringSliceCmd
- func (r *Redis) ZRangeByLex(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (r *Redis) ZRangeByScore(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (r *Redis) ZRangeByScoreWithScores(key string, opt redis.ZRangeBy) *redis.ZSliceCmd
- func (r *Redis) ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (r *Redis) ZRank(key, member string) *redis.IntCmd
- func (r *Redis) ZRem(key string, members ...interface{}) *redis.IntCmd
- func (r *Redis) ZRemRangeByLex(key, min, max string) *redis.IntCmd
- func (r *Redis) ZRemRangeByRank(key string, start, stop int64) *redis.IntCmd
- func (r *Redis) ZRemRangeByScore(key, min, max string) *redis.IntCmd
- func (r *Redis) ZRevRange(key string, start, stop int64) *redis.StringSliceCmd
- func (r *Redis) ZRevRangeByLex(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (r *Redis) ZRevRangeByScore(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (r *Redis) ZRevRangeByScoreWithScores(key string, opt redis.ZRangeBy) *redis.ZSliceCmd
- func (r *Redis) ZRevRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (r *Redis) ZRevRank(key, member string) *redis.IntCmd
- func (r *Redis) ZScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (r *Redis) ZScore(key, member string) *redis.FloatCmd
- func (r *Redis) ZUnionStore(dest string, store redis.ZStore, keys ...string) *redis.IntCmd
- type RedisIOCInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func GetRedisSingleton ¶
func (*Redis) BRPopLPush ¶
func (*Redis) BgRewriteAOF ¶
func (*Redis) ClientGetName ¶
func (*Redis) ClientList ¶
func (*Redis) ClusterAddSlotsRange ¶
func (*Redis) ClusterCountFailureReports ¶
func (*Redis) ClusterCountKeysInSlot ¶
func (*Redis) ClusterDelSlotsRange ¶
func (*Redis) ClusterFailover ¶
func (*Redis) ClusterGetKeysInSlot ¶
func (r *Redis) ClusterGetKeysInSlot(slot int, count int) *redis.StringSliceCmd
func (*Redis) ClusterInfo ¶
func (*Redis) ClusterNodes ¶
func (*Redis) ClusterResetHard ¶
func (*Redis) ClusterResetSoft ¶
func (*Redis) ClusterSaveConfig ¶
func (*Redis) ClusterSlaves ¶
func (r *Redis) ClusterSlaves(nodeID string) *redis.StringSliceCmd
func (*Redis) ClusterSlots ¶
func (r *Redis) ClusterSlots() *redis.ClusterSlotsCmd
func (*Redis) Command ¶
func (r *Redis) Command() *redis.CommandsInfoCmd
func (*Redis) ConfigResetStat ¶
func (*Redis) ConfigRewrite ¶
func (*Redis) FlushAllAsync ¶
func (*Redis) FlushDBAsync ¶
func (*Redis) GeoHash ¶
func (r *Redis) GeoHash(key string, members ...string) *redis.StringSliceCmd
func (*Redis) GeoRadius ¶
func (r *Redis) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*Redis) GeoRadiusByMember ¶
func (r *Redis) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*Redis) GeoRadiusByMemberRO ¶
func (r *Redis) GeoRadiusByMemberRO(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*Redis) GeoRadiusRO ¶
func (r *Redis) GeoRadiusRO(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*Redis) HIncrByFloat ¶
func (*Redis) LInsertAfter ¶
func (*Redis) LInsertBefore ¶
func (*Redis) ObjectIdleTime ¶
func (r *Redis) ObjectIdleTime(key string) *redis.DurationCmd
func (*Redis) PSubscribe ¶
PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription.
func (*Redis) PubSubChannels ¶
func (r *Redis) PubSubChannels(pattern string) *redis.StringSliceCmd
func (*Redis) PubSubNumPat ¶
func (*Redis) PubSubNumSub ¶
func (r *Redis) PubSubNumSub(channels ...string) *redis.StringIntMapCmd
func (*Redis) RestoreReplace ¶
func (*Redis) SDiffStore ¶
func (*Redis) SInterStore ¶
func (*Redis) SMembersMap ¶
func (r *Redis) SMembersMap(key string) *redis.StringStructMapCmd
func (*Redis) SRandMemberN ¶
func (r *Redis) SRandMemberN(key string, count int64) *redis.StringSliceCmd
func (*Redis) SUnionStore ¶
func (*Redis) ScriptExists ¶
func (r *Redis) ScriptExists(hashes ...string) *redis.BoolSliceCmd
func (*Redis) ScriptFlush ¶
func (*Redis) ScriptKill ¶
func (*Redis) SetLimiter ¶
func (r *Redis) SetLimiter(l redis.Limiter) RedisIOCInterface
func (*Redis) ShutdownNoSave ¶
func (*Redis) ShutdownSave ¶
func (*Redis) SortInterfaces ¶
func (*Redis) 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 (*Redis) TxPipeline ¶
TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
func (*Redis) TxPipelined ¶
func (*Redis) WithContext ¶
func (r *Redis) WithContext(ctx context.Context) RedisIOCInterface
func (*Redis) XClaim ¶
func (r *Redis) XClaim(a *redis.XClaimArgs) *redis.XMessageSliceCmd
func (*Redis) XClaimJustID ¶
func (r *Redis) XClaimJustID(a *redis.XClaimArgs) *redis.StringSliceCmd
func (*Redis) XGroupCreate ¶
func (*Redis) XGroupCreateMkStream ¶
func (*Redis) XGroupDelConsumer ¶
func (*Redis) XGroupSetID ¶
func (*Redis) XPendingExt ¶
func (r *Redis) XPendingExt(a *redis.XPendingExtArgs) *redis.XPendingExtCmd
func (*Redis) XRangeN ¶
func (r *Redis) XRangeN(stream, start, stop string, count int64) *redis.XMessageSliceCmd
func (*Redis) XReadGroup ¶
func (r *Redis) XReadGroup(a *redis.XReadGroupArgs) *redis.XStreamSliceCmd
func (*Redis) XReadStreams ¶
func (r *Redis) XReadStreams(streams ...string) *redis.XStreamSliceCmd
func (*Redis) XRevRange ¶
func (r *Redis) XRevRange(stream string, start, stop string) *redis.XMessageSliceCmd
func (*Redis) XRevRangeN ¶
func (*Redis) ZInterStore ¶
func (*Redis) ZRangeByLex ¶
func (*Redis) ZRangeByScore ¶
func (*Redis) ZRangeByScoreWithScores ¶
func (*Redis) ZRangeWithScores ¶
func (*Redis) ZRemRangeByRank ¶
func (*Redis) ZRemRangeByScore ¶
func (*Redis) ZRevRange ¶
func (r *Redis) ZRevRange(key string, start, stop int64) *redis.StringSliceCmd
func (*Redis) ZRevRangeByLex ¶
func (*Redis) ZRevRangeByScore ¶
func (*Redis) ZRevRangeByScoreWithScores ¶
func (*Redis) ZRevRangeWithScores ¶
type RedisIOCInterface ¶
type RedisIOCInterface interface { Command() *go_redisredis.CommandsInfoCmd ClientGetName() *go_redisredis.StringCmd Echo(message interface{}) *go_redisredis.StringCmd Ping() *go_redisredis.StatusCmd Quit() *go_redisredis.StatusCmd Del(keys ...string) *go_redisredis.IntCmd Unlink(keys ...string) *go_redisredis.IntCmd Dump(key string) *go_redisredis.StringCmd Exists(keys ...string) *go_redisredis.IntCmd Expire(key string, expiration timex.Duration) *go_redisredis.BoolCmd ExpireAt(key string, tm timex.Time) *go_redisredis.BoolCmd Keys(pattern string) *go_redisredis.StringSliceCmd Migrate(host, port, key string, db int64, timeout timex.Duration) *go_redisredis.StatusCmd Move(key string, db int64) *go_redisredis.BoolCmd ObjectRefCount(key string) *go_redisredis.IntCmd ObjectEncoding(key string) *go_redisredis.StringCmd ObjectIdleTime(key string) *go_redisredis.DurationCmd Persist(key string) *go_redisredis.BoolCmd PExpire(key string, expiration timex.Duration) *go_redisredis.BoolCmd PExpireAt(key string, tm timex.Time) *go_redisredis.BoolCmd PTTL(key string) *go_redisredis.DurationCmd RandomKey() *go_redisredis.StringCmd Rename(key, newkey string) *go_redisredis.StatusCmd RenameNX(key, newkey string) *go_redisredis.BoolCmd Restore(key string, ttl timex.Duration, value string) *go_redisredis.StatusCmd RestoreReplace(key string, ttl timex.Duration, value string) *go_redisredis.StatusCmd Sort(key string, sort *go_redisredis.Sort) *go_redisredis.StringSliceCmd SortStore(key, store string, sort *go_redisredis.Sort) *go_redisredis.IntCmd SortInterfaces(key string, sort *go_redisredis.Sort) *go_redisredis.SliceCmd Touch(keys ...string) *go_redisredis.IntCmd TTL(key string) *go_redisredis.DurationCmd Type(key string) *go_redisredis.StatusCmd Scan(cursor uint64, match string, count int64) *go_redisredis.ScanCmd SScan(key string, cursor uint64, match string, count int64) *go_redisredis.ScanCmd HScan(key string, cursor uint64, match string, count int64) *go_redisredis.ScanCmd ZScan(key string, cursor uint64, match string, count int64) *go_redisredis.ScanCmd Append(key, value string) *go_redisredis.IntCmd BitCount(key string, bitCount *go_redisredis.BitCount) *go_redisredis.IntCmd BitOpAnd(destKey string, keys ...string) *go_redisredis.IntCmd BitOpOr(destKey string, keys ...string) *go_redisredis.IntCmd BitOpXor(destKey string, keys ...string) *go_redisredis.IntCmd BitOpNot(destKey string, key string) *go_redisredis.IntCmd BitPos(key string, bit int64, pos ...int64) *go_redisredis.IntCmd Decr(key string) *go_redisredis.IntCmd DecrBy(key string, decrement int64) *go_redisredis.IntCmd Get(key string) *go_redisredis.StringCmd GetBit(key string, offset int64) *go_redisredis.IntCmd GetRange(key string, start, end int64) *go_redisredis.StringCmd GetSet(key string, value interface{}) *go_redisredis.StringCmd Incr(key string) *go_redisredis.IntCmd IncrBy(key string, value int64) *go_redisredis.IntCmd IncrByFloat(key string, value float64) *go_redisredis.FloatCmd MGet(keys ...string) *go_redisredis.SliceCmd MSet(pairs ...interface{}) *go_redisredis.StatusCmd MSetNX(pairs ...interface{}) *go_redisredis.BoolCmd Set(key string, value interface{}, expiration timex.Duration) *go_redisredis.StatusCmd SetBit(key string, offset int64, value int) *go_redisredis.IntCmd SetNX(key string, value interface{}, expiration timex.Duration) *go_redisredis.BoolCmd SetXX(key string, value interface{}, expiration timex.Duration) *go_redisredis.BoolCmd SetRange(key string, offset int64, value string) *go_redisredis.IntCmd StrLen(key string) *go_redisredis.IntCmd HDel(key string, fields ...string) *go_redisredis.IntCmd HExists(key, field string) *go_redisredis.BoolCmd HGet(key, field string) *go_redisredis.StringCmd HGetAll(key string) *go_redisredis.StringStringMapCmd HIncrBy(key, field string, incr int64) *go_redisredis.IntCmd HIncrByFloat(key, field string, incr float64) *go_redisredis.FloatCmd HKeys(key string) *go_redisredis.StringSliceCmd HLen(key string) *go_redisredis.IntCmd HMGet(key string, fields ...string) *go_redisredis.SliceCmd HMSet(key string, fields map[string]interface{}) *go_redisredis.StatusCmd HSet(key, field string, value interface{}) *go_redisredis.BoolCmd HSetNX(key, field string, value interface{}) *go_redisredis.BoolCmd HVals(key string) *go_redisredis.StringSliceCmd BLPop(timeout timex.Duration, keys ...string) *go_redisredis.StringSliceCmd BRPop(timeout timex.Duration, keys ...string) *go_redisredis.StringSliceCmd BRPopLPush(source, destination string, timeout timex.Duration) *go_redisredis.StringCmd LIndex(key string, index int64) *go_redisredis.StringCmd LInsert(key, op string, pivot, value interface{}) *go_redisredis.IntCmd LInsertBefore(key string, pivot, value interface{}) *go_redisredis.IntCmd LInsertAfter(key string, pivot, value interface{}) *go_redisredis.IntCmd LLen(key string) *go_redisredis.IntCmd LPop(key string) *go_redisredis.StringCmd LPush(key string, values ...interface{}) *go_redisredis.IntCmd LPushX(key string, value interface{}) *go_redisredis.IntCmd LRange(key string, start, stop int64) *go_redisredis.StringSliceCmd LRem(key string, count int64, value interface{}) *go_redisredis.IntCmd LSet(key string, index int64, value interface{}) *go_redisredis.StatusCmd LTrim(key string, start, stop int64) *go_redisredis.StatusCmd RPop(key string) *go_redisredis.StringCmd RPopLPush(source, destination string) *go_redisredis.StringCmd RPush(key string, values ...interface{}) *go_redisredis.IntCmd RPushX(key string, value interface{}) *go_redisredis.IntCmd SAdd(key string, members ...interface{}) *go_redisredis.IntCmd SCard(key string) *go_redisredis.IntCmd SDiff(keys ...string) *go_redisredis.StringSliceCmd SDiffStore(destination string, keys ...string) *go_redisredis.IntCmd SInter(keys ...string) *go_redisredis.StringSliceCmd SInterStore(destination string, keys ...string) *go_redisredis.IntCmd SIsMember(key string, member interface{}) *go_redisredis.BoolCmd SMembers(key string) *go_redisredis.StringSliceCmd SMembersMap(key string) *go_redisredis.StringStructMapCmd SMove(source, destination string, member interface{}) *go_redisredis.BoolCmd SPop(key string) *go_redisredis.StringCmd SPopN(key string, count int64) *go_redisredis.StringSliceCmd SRandMember(key string) *go_redisredis.StringCmd SRandMemberN(key string, count int64) *go_redisredis.StringSliceCmd SRem(key string, members ...interface{}) *go_redisredis.IntCmd SUnion(keys ...string) *go_redisredis.StringSliceCmd SUnionStore(destination string, keys ...string) *go_redisredis.IntCmd XAdd(a *go_redisredis.XAddArgs) *go_redisredis.StringCmd XDel(stream string, ids ...string) *go_redisredis.IntCmd XLen(stream string) *go_redisredis.IntCmd XRange(stream, start, stop string) *go_redisredis.XMessageSliceCmd XRangeN(stream, start, stop string, count int64) *go_redisredis.XMessageSliceCmd XRevRange(stream string, start, stop string) *go_redisredis.XMessageSliceCmd XRevRangeN(stream string, start, stop string, count int64) *go_redisredis.XMessageSliceCmd XRead(a *go_redisredis.XReadArgs) *go_redisredis.XStreamSliceCmd XReadStreams(streams ...string) *go_redisredis.XStreamSliceCmd XGroupCreate(stream, group, start string) *go_redisredis.StatusCmd XGroupCreateMkStream(stream, group, start string) *go_redisredis.StatusCmd XGroupSetID(stream, group, start string) *go_redisredis.StatusCmd XGroupDestroy(stream, group string) *go_redisredis.IntCmd XGroupDelConsumer(stream, group, consumer string) *go_redisredis.IntCmd XReadGroup(a *go_redisredis.XReadGroupArgs) *go_redisredis.XStreamSliceCmd XAck(stream, group string, ids ...string) *go_redisredis.IntCmd XPending(stream, group string) *go_redisredis.XPendingCmd XPendingExt(a *go_redisredis.XPendingExtArgs) *go_redisredis.XPendingExtCmd XClaim(a *go_redisredis.XClaimArgs) *go_redisredis.XMessageSliceCmd XClaimJustID(a *go_redisredis.XClaimArgs) *go_redisredis.StringSliceCmd XTrim(key string, maxLen int64) *go_redisredis.IntCmd XTrimApprox(key string, maxLen int64) *go_redisredis.IntCmd BZPopMax(timeout timex.Duration, keys ...string) *go_redisredis.ZWithKeyCmd BZPopMin(timeout timex.Duration, keys ...string) *go_redisredis.ZWithKeyCmd ZAdd(key string, members ...go_redisredis.Z) *go_redisredis.IntCmd ZAddNX(key string, members ...go_redisredis.Z) *go_redisredis.IntCmd ZAddXX(key string, members ...go_redisredis.Z) *go_redisredis.IntCmd ZAddCh(key string, members ...go_redisredis.Z) *go_redisredis.IntCmd ZAddNXCh(key string, members ...go_redisredis.Z) *go_redisredis.IntCmd ZAddXXCh(key string, members ...go_redisredis.Z) *go_redisredis.IntCmd ZIncr(key string, member go_redisredis.Z) *go_redisredis.FloatCmd ZIncrNX(key string, member go_redisredis.Z) *go_redisredis.FloatCmd ZIncrXX(key string, member go_redisredis.Z) *go_redisredis.FloatCmd ZCard(key string) *go_redisredis.IntCmd ZCount(key, min, max string) *go_redisredis.IntCmd ZLexCount(key, min, max string) *go_redisredis.IntCmd ZIncrBy(key string, increment float64, member string) *go_redisredis.FloatCmd ZInterStore(destination string, store go_redisredis.ZStore, keys ...string) *go_redisredis.IntCmd ZPopMax(key string, count ...int64) *go_redisredis.ZSliceCmd ZPopMin(key string, count ...int64) *go_redisredis.ZSliceCmd ZRange(key string, start, stop int64) *go_redisredis.StringSliceCmd ZRangeWithScores(key string, start, stop int64) *go_redisredis.ZSliceCmd ZRangeByScore(key string, opt go_redisredis.ZRangeBy) *go_redisredis.StringSliceCmd ZRangeByLex(key string, opt go_redisredis.ZRangeBy) *go_redisredis.StringSliceCmd ZRangeByScoreWithScores(key string, opt go_redisredis.ZRangeBy) *go_redisredis.ZSliceCmd ZRank(key, member string) *go_redisredis.IntCmd ZRem(key string, members ...interface{}) *go_redisredis.IntCmd ZRemRangeByRank(key string, start, stop int64) *go_redisredis.IntCmd ZRemRangeByScore(key, min, max string) *go_redisredis.IntCmd ZRemRangeByLex(key, min, max string) *go_redisredis.IntCmd ZRevRange(key string, start, stop int64) *go_redisredis.StringSliceCmd ZRevRangeWithScores(key string, start, stop int64) *go_redisredis.ZSliceCmd ZRevRangeByScore(key string, opt go_redisredis.ZRangeBy) *go_redisredis.StringSliceCmd ZRevRangeByLex(key string, opt go_redisredis.ZRangeBy) *go_redisredis.StringSliceCmd ZRevRangeByScoreWithScores(key string, opt go_redisredis.ZRangeBy) *go_redisredis.ZSliceCmd ZRevRank(key, member string) *go_redisredis.IntCmd ZScore(key, member string) *go_redisredis.FloatCmd ZUnionStore(dest string, store go_redisredis.ZStore, keys ...string) *go_redisredis.IntCmd PFAdd(key string, els ...interface{}) *go_redisredis.IntCmd PFCount(keys ...string) *go_redisredis.IntCmd PFMerge(dest string, keys ...string) *go_redisredis.StatusCmd BgRewriteAOF() *go_redisredis.StatusCmd BgSave() *go_redisredis.StatusCmd ClientKill(ipPort string) *go_redisredis.StatusCmd ClientKillByFilter(keys ...string) *go_redisredis.IntCmd ClientList() *go_redisredis.StringCmd ClientPause(dur timex.Duration) *go_redisredis.BoolCmd ClientID() *go_redisredis.IntCmd ConfigGet(parameter string) *go_redisredis.SliceCmd ConfigResetStat() *go_redisredis.StatusCmd ConfigSet(parameter, value string) *go_redisredis.StatusCmd ConfigRewrite() *go_redisredis.StatusCmd DBSize() *go_redisredis.IntCmd FlushAll() *go_redisredis.StatusCmd FlushAllAsync() *go_redisredis.StatusCmd FlushDB() *go_redisredis.StatusCmd FlushDBAsync() *go_redisredis.StatusCmd Info(section ...string) *go_redisredis.StringCmd LastSave() *go_redisredis.IntCmd Save() *go_redisredis.StatusCmd Shutdown() *go_redisredis.StatusCmd ShutdownSave() *go_redisredis.StatusCmd ShutdownNoSave() *go_redisredis.StatusCmd SlaveOf(host, port string) *go_redisredis.StatusCmd Time() *go_redisredis.TimeCmd Eval(script string, keys []string, args ...interface{}) *go_redisredis.Cmd EvalSha(sha1 string, keys []string, args ...interface{}) *go_redisredis.Cmd ScriptExists(hashes ...string) *go_redisredis.BoolSliceCmd ScriptFlush() *go_redisredis.StatusCmd ScriptKill() *go_redisredis.StatusCmd ScriptLoad(script string) *go_redisredis.StringCmd DebugObject(key string) *go_redisredis.StringCmd Publish(channel string, message interface{}) *go_redisredis.IntCmd PubSubChannels(pattern string) *go_redisredis.StringSliceCmd PubSubNumSub(channels ...string) *go_redisredis.StringIntMapCmd PubSubNumPat() *go_redisredis.IntCmd ClusterSlots() *go_redisredis.ClusterSlotsCmd ClusterNodes() *go_redisredis.StringCmd ClusterMeet(host, port string) *go_redisredis.StatusCmd ClusterForget(nodeID string) *go_redisredis.StatusCmd ClusterReplicate(nodeID string) *go_redisredis.StatusCmd ClusterResetSoft() *go_redisredis.StatusCmd ClusterResetHard() *go_redisredis.StatusCmd ClusterInfo() *go_redisredis.StringCmd ClusterKeySlot(key string) *go_redisredis.IntCmd ClusterGetKeysInSlot(slot int, count int) *go_redisredis.StringSliceCmd ClusterCountFailureReports(nodeID string) *go_redisredis.IntCmd ClusterCountKeysInSlot(slot int) *go_redisredis.IntCmd ClusterDelSlots(slots ...int) *go_redisredis.StatusCmd ClusterDelSlotsRange(min, max int) *go_redisredis.StatusCmd ClusterSaveConfig() *go_redisredis.StatusCmd ClusterSlaves(nodeID string) *go_redisredis.StringSliceCmd ClusterFailover() *go_redisredis.StatusCmd ClusterAddSlots(slots ...int) *go_redisredis.StatusCmd ClusterAddSlotsRange(min, max int) *go_redisredis.StatusCmd GeoAdd(key string, geoLocation ...*go_redisredis.GeoLocation) *go_redisredis.IntCmd GeoPos(key string, members ...string) *go_redisredis.GeoPosCmd GeoRadius(key string, longitude, latitude float64, query *go_redisredis.GeoRadiusQuery) *go_redisredis.GeoLocationCmd GeoRadiusRO(key string, longitude, latitude float64, query *go_redisredis.GeoRadiusQuery) *go_redisredis.GeoLocationCmd GeoRadiusByMember(key, member string, query *go_redisredis.GeoRadiusQuery) *go_redisredis.GeoLocationCmd GeoRadiusByMemberRO(key, member string, query *go_redisredis.GeoRadiusQuery) *go_redisredis.GeoLocationCmd GeoDist(key string, member1, member2, unit string) *go_redisredis.FloatCmd GeoHash(key string, members ...string) *go_redisredis.StringSliceCmd ReadOnly() *go_redisredis.StatusCmd ReadWrite() *go_redisredis.StatusCmd MemoryUsage(key string, samples ...int) *go_redisredis.IntCmd Context() contextx.Context WithContext(ctx contextx.Context) RedisIOCInterface Options() *go_redisredis.Options SetLimiter(l go_redisredis.Limiter) RedisIOCInterface PoolStats() *go_redisredis.PoolStats Pipelined(fn func(go_redisredis.Pipeliner) error) ([]go_redisredis.Cmder, error) Pipeline() go_redisredis.Pipeliner TxPipelined(fn func(go_redisredis.Pipeliner) error) ([]go_redisredis.Cmder, error) TxPipeline() go_redisredis.Pipeliner Subscribe(channels ...string) *go_redisredis.PubSub PSubscribe(channels ...string) *go_redisredis.PubSub }
func GetRedisIOCInterface ¶
func GetRedisIOCInterface(p *Param) (RedisIOCInterface, error)
func GetRedisIOCInterfaceSingleton ¶
func GetRedisIOCInterfaceSingleton(p *Param) (RedisIOCInterface, error)
Click to show internal directories.
Click to hide internal directories.