xredis

package
v1.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger added in v1.20.6

func SetLogger(logger Logging)

Types

type Client added in v1.20.6

type Client struct {
	*redis.Client
	// contains filtered or unexported fields
}

Client 支持key前缀的Redis单点客户端 关于key前缀,X开头的方法不支持

  • 示例:
  • client,_ := xredis.NewClient(cfg)
  • client.Set(ctx, key, '1', 0) // 支持key前缀
  • client.XAdd() // 不支持key前缀
  • client.Do(ctx, "set", "key", "value") // 不支持key前缀
  • client.Client.Set() // 不支持key前缀

func NewClient

func NewClient(config *RedisConfig) (client *Client, err error)

func (*Client) Append added in v1.21.6

func (c *Client) Append(ctx context.Context, key, value string) *redis.IntCmd

func (*Client) BLMove added in v1.21.6

func (c *Client) BLMove(ctx context.Context, source, destination, srcpos, destpos string, timeout time.Duration) *redis.StringCmd

func (*Client) BLPop added in v1.21.6

func (c *Client) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *redis.StringSliceCmd

func (*Client) BRPop added in v1.21.6

func (c *Client) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *redis.StringSliceCmd

func (*Client) BRPopLPush added in v1.21.6

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

func (*Client) BZPopMax added in v1.21.6

func (c *Client) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *redis.ZWithKeyCmd

func (*Client) BZPopMin added in v1.21.6

func (c *Client) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *redis.ZWithKeyCmd

func (*Client) BitCount added in v1.21.6

func (c *Client) BitCount(ctx context.Context, key string, bitCount *redis.BitCount) *redis.IntCmd

func (*Client) BitField added in v1.21.6

func (c *Client) BitField(ctx context.Context, key string, args ...interface{}) *redis.IntSliceCmd

func (*Client) BitOpAnd added in v1.21.6

func (c *Client) BitOpAnd(ctx context.Context, destKey string, keys ...string) *redis.IntCmd

func (*Client) BitOpNot added in v1.21.6

func (c *Client) BitOpNot(ctx context.Context, destKey string, key string) *redis.IntCmd

func (*Client) BitOpOr added in v1.21.6

func (c *Client) BitOpOr(ctx context.Context, destKey string, keys ...string) *redis.IntCmd

func (*Client) BitOpXor added in v1.21.6

func (c *Client) BitOpXor(ctx context.Context, destKey string, keys ...string) *redis.IntCmd

func (*Client) BitPos added in v1.21.6

func (c *Client) BitPos(ctx context.Context, key string, bit int64, pos ...int64) *redis.IntCmd

func (*Client) Copy added in v1.21.6

func (c *Client) Copy(ctx context.Context, sourceKey string, destKey string, db int, replace bool) *redis.IntCmd

func (*Client) Decr added in v1.21.6

func (c *Client) Decr(ctx context.Context, key string) *redis.IntCmd

func (*Client) DecrBy added in v1.21.6

func (c *Client) DecrBy(ctx context.Context, key string, decrement int64) *redis.IntCmd

func (*Client) Del added in v1.21.6

func (c *Client) Del(ctx context.Context, keys ...string) *redis.IntCmd

func (*Client) DisableKeyPrefix added in v1.20.8

func (c *Client) DisableKeyPrefix()

func (*Client) Dump added in v1.21.6

func (c *Client) Dump(ctx context.Context, key string) *redis.StringCmd

func (*Client) EnableKeyPrefix added in v1.20.8

func (c *Client) EnableKeyPrefix()

func (*Client) Exists added in v1.21.6

func (c *Client) Exists(ctx context.Context, keys ...string) *redis.IntCmd

func (*Client) Expire added in v1.21.6

func (c *Client) Expire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*Client) ExpireAt added in v1.21.6

func (c *Client) ExpireAt(ctx context.Context, key string, tm time.Time) *redis.BoolCmd

func (*Client) ExpireGT added in v1.21.6

func (c *Client) ExpireGT(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*Client) ExpireLT added in v1.21.6

func (c *Client) ExpireLT(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*Client) ExpireNX added in v1.21.6

func (c *Client) ExpireNX(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*Client) ExpireXX added in v1.21.6

func (c *Client) ExpireXX(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*Client) GeoAdd added in v1.21.6

func (c *Client) GeoAdd(ctx context.Context, key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd

func (*Client) GeoDist added in v1.21.6

func (c *Client) GeoDist(ctx context.Context, key string, member1, member2, unit string) *redis.FloatCmd

func (*Client) GeoHash added in v1.21.6

func (c *Client) GeoHash(ctx context.Context, key string, members ...string) *redis.StringSliceCmd

func (*Client) GeoPos added in v1.21.6

func (c *Client) GeoPos(ctx context.Context, key string, members ...string) *redis.GeoPosCmd

func (*Client) GeoRadius added in v1.21.6

func (c *Client) GeoRadius(ctx context.Context, key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd

func (*Client) GeoRadiusByMember added in v1.21.6

func (c *Client) GeoRadiusByMember(ctx context.Context, key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd

func (*Client) GeoRadiusByMemberStore added in v1.21.6

func (c *Client) GeoRadiusByMemberStore(ctx context.Context, key, member string, query *redis.GeoRadiusQuery) *redis.IntCmd

func (*Client) GeoRadiusStore added in v1.21.6

func (c *Client) GeoRadiusStore(ctx context.Context, key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.IntCmd

func (*Client) GeoSearch added in v1.21.6

func (c *Client) GeoSearch(ctx context.Context, key string, q *redis.GeoSearchQuery) *redis.StringSliceCmd

func (*Client) GeoSearchLocation added in v1.21.6

func (c *Client) GeoSearchLocation(ctx context.Context, key string, q *redis.GeoSearchLocationQuery) *redis.GeoSearchLocationCmd

func (*Client) GeoSearchStore added in v1.21.6

func (c *Client) GeoSearchStore(ctx context.Context, key, store string, q *redis.GeoSearchStoreQuery) *redis.IntCmd

func (*Client) Get added in v1.21.6

func (c *Client) Get(ctx context.Context, key string) *redis.StringCmd

func (*Client) GetBit added in v1.21.6

func (c *Client) GetBit(ctx context.Context, key string, offset int64) *redis.IntCmd

func (*Client) GetDel added in v1.21.6

func (c *Client) GetDel(ctx context.Context, key string) *redis.StringCmd

func (*Client) GetEx added in v1.21.6

func (c *Client) GetEx(ctx context.Context, key string, expiration time.Duration) *redis.StringCmd

func (*Client) GetRange added in v1.21.6

func (c *Client) GetRange(ctx context.Context, key string, start, end int64) *redis.StringCmd

func (*Client) GetSet added in v1.21.6

func (c *Client) GetSet(ctx context.Context, key string, value interface{}) *redis.StringCmd

func (*Client) HDel added in v1.21.6

func (c *Client) HDel(ctx context.Context, key string, fields ...string) *redis.IntCmd

func (*Client) HExists added in v1.21.6

func (c *Client) HExists(ctx context.Context, key, field string) *redis.BoolCmd

func (*Client) HGet added in v1.21.6

func (c *Client) HGet(ctx context.Context, key, field string) *redis.StringCmd

func (*Client) HGetAll added in v1.21.6

func (c *Client) HGetAll(ctx context.Context, key string) *redis.MapStringStringCmd

func (*Client) HIncrBy added in v1.21.6

func (c *Client) HIncrBy(ctx context.Context, key, field string, incr int64) *redis.IntCmd

func (*Client) HIncrByFloat added in v1.21.6

func (c *Client) HIncrByFloat(ctx context.Context, key, field string, incr float64) *redis.FloatCmd

func (*Client) HKeys added in v1.21.6

func (c *Client) HKeys(ctx context.Context, key string) *redis.StringSliceCmd

func (*Client) HLen added in v1.21.6

func (c *Client) HLen(ctx context.Context, key string) *redis.IntCmd

func (*Client) HMGet added in v1.21.6

func (c *Client) HMGet(ctx context.Context, key string, fields ...string) *redis.SliceCmd

func (*Client) HMSet added in v1.21.6

func (c *Client) HMSet(ctx context.Context, key string, values ...interface{}) *redis.BoolCmd

func (*Client) HRandField added in v1.21.6

func (c *Client) HRandField(ctx context.Context, key string, count int) *redis.StringSliceCmd

func (*Client) HRandFieldWithValues added in v1.21.6

func (c *Client) HRandFieldWithValues(ctx context.Context, key string, count int) *redis.KeyValueSliceCmd

func (*Client) HScan added in v1.21.6

func (c *Client) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*Client) HSet added in v1.21.6

func (c *Client) HSet(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*Client) HSetNX added in v1.21.6

func (c *Client) HSetNX(ctx context.Context, key, field string, value interface{}) *redis.BoolCmd

func (*Client) HVals added in v1.21.6

func (c *Client) HVals(ctx context.Context, key string) *redis.StringSliceCmd

func (*Client) Incr added in v1.21.6

func (c *Client) Incr(ctx context.Context, key string) *redis.IntCmd

func (*Client) IncrBy added in v1.21.6

func (c *Client) IncrBy(ctx context.Context, key string, value int64) *redis.IntCmd

func (*Client) IncrByFloat added in v1.21.6

func (c *Client) IncrByFloat(ctx context.Context, key string, value float64) *redis.FloatCmd

func (*Client) IsEnableKeyPrefix added in v1.21.6

func (c *Client) IsEnableKeyPrefix() bool

func (*Client) KeyPrefix added in v1.20.6

func (c *Client) KeyPrefix() string

func (*Client) LIndex added in v1.21.6

func (c *Client) LIndex(ctx context.Context, key string, index int64) *redis.StringCmd

func (*Client) LInsert added in v1.21.6

func (c *Client) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *redis.IntCmd

func (*Client) LInsertAfter added in v1.21.6

func (c *Client) LInsertAfter(ctx context.Context, key string, pivot, value interface{}) *redis.IntCmd

func (*Client) LInsertBefore added in v1.21.6

func (c *Client) LInsertBefore(ctx context.Context, key string, pivot, value interface{}) *redis.IntCmd

func (*Client) LLen added in v1.21.6

func (c *Client) LLen(ctx context.Context, key string) *redis.IntCmd

func (*Client) LMove added in v1.21.6

func (c *Client) LMove(ctx context.Context, source, destination, srcpos, destpos string) *redis.StringCmd

func (*Client) LPop added in v1.21.6

func (c *Client) LPop(ctx context.Context, key string) *redis.StringCmd

func (*Client) LPopCount added in v1.21.6

func (c *Client) LPopCount(ctx context.Context, key string, count int) *redis.StringSliceCmd

func (*Client) LPos added in v1.21.6

func (c *Client) LPos(ctx context.Context, key string, value string, args redis.LPosArgs) *redis.IntCmd

func (*Client) LPosCount added in v1.21.6

func (c *Client) LPosCount(ctx context.Context, key string, value string, count int64, args redis.LPosArgs) *redis.IntSliceCmd

func (*Client) LPush added in v1.21.6

func (c *Client) LPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*Client) LPushX added in v1.21.6

func (c *Client) LPushX(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*Client) LRange added in v1.21.6

func (c *Client) LRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

func (*Client) LRem added in v1.21.6

func (c *Client) LRem(ctx context.Context, key string, count int64, value interface{}) *redis.IntCmd

func (*Client) LSet added in v1.21.6

func (c *Client) LSet(ctx context.Context, key string, index int64, value interface{}) *redis.StatusCmd

func (*Client) LTrim added in v1.21.6

func (c *Client) LTrim(ctx context.Context, key string, start, stop int64) *redis.StatusCmd

func (*Client) MGet added in v1.21.6

func (c *Client) MGet(ctx context.Context, keys ...string) *redis.SliceCmd

func (*Client) MSet added in v1.21.6

func (c *Client) MSet(ctx context.Context, values ...interface{}) *redis.StatusCmd

MSet 多个key value 操作 不支持Struct

func (*Client) MSetNX added in v1.21.6

func (c *Client) MSetNX(ctx context.Context, values ...interface{}) *redis.BoolCmd

MSetNX 多个key value 操作 不支持Struct

func (*Client) Migrate added in v1.21.6

func (c *Client) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *redis.StatusCmd

func (*Client) Move added in v1.21.6

func (c *Client) Move(ctx context.Context, key string, db int) *redis.BoolCmd

func (*Client) ObjectEncoding added in v1.21.6

func (c *Client) ObjectEncoding(ctx context.Context, key string) *redis.StringCmd

func (*Client) ObjectIdleTime added in v1.21.6

func (c *Client) ObjectIdleTime(ctx context.Context, key string) *redis.DurationCmd

func (*Client) ObjectRefCount added in v1.21.6

func (c *Client) ObjectRefCount(ctx context.Context, key string) *redis.IntCmd

func (*Client) PExpire added in v1.21.6

func (c *Client) PExpire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd

func (*Client) PExpireAt added in v1.21.6

func (c *Client) PExpireAt(ctx context.Context, key string, tm time.Time) *redis.BoolCmd

func (*Client) PFAdd added in v1.21.6

func (c *Client) PFAdd(ctx context.Context, key string, els ...interface{}) *redis.IntCmd

func (*Client) PFCount added in v1.21.6

func (c *Client) PFCount(ctx context.Context, keys ...string) *redis.IntCmd

func (*Client) PFMerge added in v1.21.6

func (c *Client) PFMerge(ctx context.Context, dest string, keys ...string) *redis.StatusCmd

func (*Client) PTTL added in v1.21.6

func (c *Client) PTTL(ctx context.Context, key string) *redis.DurationCmd

func (*Client) Persist added in v1.21.6

func (c *Client) Persist(ctx context.Context, key string) *redis.BoolCmd

func (*Client) RPop added in v1.21.6

func (c *Client) RPop(ctx context.Context, key string) *redis.StringCmd

func (*Client) RPopCount added in v1.21.6

func (c *Client) RPopCount(ctx context.Context, key string, count int) *redis.StringSliceCmd

func (*Client) RPopLPush added in v1.21.6

func (c *Client) RPopLPush(ctx context.Context, source, destination string) *redis.StringCmd

func (*Client) RPush added in v1.21.6

func (c *Client) RPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*Client) RPushX added in v1.21.6

func (c *Client) RPushX(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

func (*Client) Rename added in v1.21.6

func (c *Client) Rename(ctx context.Context, key, newkey string) *redis.StatusCmd

func (*Client) RenameNX added in v1.21.6

func (c *Client) RenameNX(ctx context.Context, key, newkey string) *redis.BoolCmd

func (*Client) Restore added in v1.21.6

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

func (*Client) RestoreReplace added in v1.21.6

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

func (*Client) SAdd added in v1.21.6

func (c *Client) SAdd(ctx context.Context, key string, members ...interface{}) *redis.IntCmd

func (*Client) SCard added in v1.21.6

func (c *Client) SCard(ctx context.Context, key string) *redis.IntCmd

func (*Client) SDiff added in v1.21.6

func (c *Client) SDiff(ctx context.Context, keys ...string) *redis.StringSliceCmd

func (*Client) SDiffStore added in v1.21.6

func (c *Client) SDiffStore(ctx context.Context, destination string, keys ...string) *redis.IntCmd

func (*Client) SInter added in v1.21.6

func (c *Client) SInter(ctx context.Context, keys ...string) *redis.StringSliceCmd

func (*Client) SInterCard added in v1.21.6

func (c *Client) SInterCard(ctx context.Context, limit int64, keys ...string) *redis.IntCmd

func (*Client) SInterStore added in v1.21.6

func (c *Client) SInterStore(ctx context.Context, destination string, keys ...string) *redis.IntCmd

func (*Client) SIsMember added in v1.21.6

func (c *Client) SIsMember(ctx context.Context, key string, member interface{}) *redis.BoolCmd

func (*Client) SMIsMember added in v1.21.6

func (c *Client) SMIsMember(ctx context.Context, key string, members ...interface{}) *redis.BoolSliceCmd

func (*Client) SMembers added in v1.21.6

func (c *Client) SMembers(ctx context.Context, key string) *redis.StringSliceCmd

func (*Client) SMembersMap added in v1.21.6

func (c *Client) SMembersMap(ctx context.Context, key string) *redis.StringStructMapCmd

func (*Client) SMove added in v1.21.6

func (c *Client) SMove(ctx context.Context, source, destination string, member interface{}) *redis.BoolCmd

func (*Client) SPop added in v1.21.6

func (c *Client) SPop(ctx context.Context, key string) *redis.StringCmd

func (*Client) SPopN added in v1.21.6

func (c *Client) SPopN(ctx context.Context, key string, count int64) *redis.StringSliceCmd

func (*Client) SRandMember added in v1.21.6

func (c *Client) SRandMember(ctx context.Context, key string) *redis.StringCmd

func (*Client) SRandMemberN added in v1.21.6

func (c *Client) SRandMemberN(ctx context.Context, key string, count int64) *redis.StringSliceCmd

func (*Client) SRem added in v1.21.6

func (c *Client) SRem(ctx context.Context, key string, members ...interface{}) *redis.IntCmd

func (*Client) SScan added in v1.21.6

func (c *Client) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*Client) SUnion added in v1.21.6

func (c *Client) SUnion(ctx context.Context, keys ...string) *redis.StringSliceCmd

func (*Client) SUnionStore added in v1.21.6

func (c *Client) SUnionStore(ctx context.Context, destination string, keys ...string) *redis.IntCmd

func (*Client) Set added in v1.21.6

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

func (*Client) SetArgs added in v1.21.6

func (c *Client) SetArgs(ctx context.Context, key string, value interface{}, a redis.SetArgs) *redis.StatusCmd

func (*Client) SetBit added in v1.21.6

func (c *Client) SetBit(ctx context.Context, key string, offset int64, value int) *redis.IntCmd

func (*Client) SetEx added in v1.21.6

func (c *Client) SetEx(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd

func (*Client) SetNX added in v1.21.6

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

func (*Client) SetRange added in v1.21.6

func (c *Client) SetRange(ctx context.Context, key string, offset int64, value string) *redis.IntCmd

func (*Client) SetXX added in v1.21.6

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

func (*Client) Sort added in v1.21.6

func (c *Client) Sort(ctx context.Context, key string, sort *redis.Sort) *redis.StringSliceCmd

func (*Client) SortInterfaces added in v1.21.6

func (c *Client) SortInterfaces(ctx context.Context, key string, sort *redis.Sort) *redis.SliceCmd

func (*Client) SortRO added in v1.21.6

func (c *Client) SortRO(ctx context.Context, key string, sort *redis.Sort) *redis.StringSliceCmd

func (*Client) SortStore added in v1.21.6

func (c *Client) SortStore(ctx context.Context, key, store string, sort *redis.Sort) *redis.IntCmd

func (*Client) StrLen added in v1.21.6

func (c *Client) StrLen(ctx context.Context, key string) *redis.IntCmd

func (*Client) TTL added in v1.21.6

func (c *Client) TTL(ctx context.Context, key string) *redis.DurationCmd

func (*Client) Touch added in v1.21.6

func (c *Client) Touch(ctx context.Context, keys ...string) *redis.IntCmd

func (*Client) Type added in v1.21.6

func (c *Client) Type(ctx context.Context, key string) *redis.StatusCmd
func (c *Client) Unlink(ctx context.Context, keys ...string) *redis.IntCmd

func (*Client) ZAdd added in v1.21.6

func (c *Client) ZAdd(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd

func (*Client) ZAddArgs added in v1.21.6

func (c *Client) ZAddArgs(ctx context.Context, key string, args redis.ZAddArgs) *redis.IntCmd

func (*Client) ZAddArgsIncr added in v1.21.6

func (c *Client) ZAddArgsIncr(ctx context.Context, key string, args redis.ZAddArgs) *redis.FloatCmd

func (*Client) ZAddNX added in v1.21.6

func (c *Client) ZAddNX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd

func (*Client) ZAddXX added in v1.21.6

func (c *Client) ZAddXX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd

func (*Client) ZCard added in v1.21.6

func (c *Client) ZCard(ctx context.Context, key string) *redis.IntCmd

func (*Client) ZCount added in v1.21.6

func (c *Client) ZCount(ctx context.Context, key, min, max string) *redis.IntCmd

func (*Client) ZDiff added in v1.21.6

func (c *Client) ZDiff(ctx context.Context, keys ...string) *redis.StringSliceCmd

func (*Client) ZDiffStore added in v1.21.6

func (c *Client) ZDiffStore(ctx context.Context, destination string, keys ...string) *redis.IntCmd

func (*Client) ZDiffWithScores added in v1.21.6

func (c *Client) ZDiffWithScores(ctx context.Context, keys ...string) *redis.ZSliceCmd

func (*Client) ZIncrBy added in v1.21.6

func (c *Client) ZIncrBy(ctx context.Context, key string, increment float64, member string) *redis.FloatCmd

func (*Client) ZInter added in v1.21.6

func (c *Client) ZInter(ctx context.Context, store *redis.ZStore) *redis.StringSliceCmd

func (*Client) ZInterCard added in v1.21.6

func (c *Client) ZInterCard(ctx context.Context, limit int64, keys ...string) *redis.IntCmd

func (*Client) ZInterStore added in v1.21.6

func (c *Client) ZInterStore(ctx context.Context, destination string, store *redis.ZStore) *redis.IntCmd

func (*Client) ZInterWithScores added in v1.21.6

func (c *Client) ZInterWithScores(ctx context.Context, store *redis.ZStore) *redis.ZSliceCmd

func (*Client) ZLexCount added in v1.21.6

func (c *Client) ZLexCount(ctx context.Context, key, min, max string) *redis.IntCmd

func (*Client) ZMScore added in v1.21.6

func (c *Client) ZMScore(ctx context.Context, key string, members ...string) *redis.FloatSliceCmd

func (*Client) ZPopMax added in v1.21.6

func (c *Client) ZPopMax(ctx context.Context, key string, count ...int64) *redis.ZSliceCmd

func (*Client) ZPopMin added in v1.21.6

func (c *Client) ZPopMin(ctx context.Context, key string, count ...int64) *redis.ZSliceCmd

func (*Client) ZRandMember added in v1.21.6

func (c *Client) ZRandMember(ctx context.Context, key string, count int) *redis.StringSliceCmd

func (*Client) ZRandMemberWithScores added in v1.21.6

func (c *Client) ZRandMemberWithScores(ctx context.Context, key string, count int) *redis.ZSliceCmd

func (*Client) ZRange added in v1.21.6

func (c *Client) ZRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

func (*Client) ZRangeArgs added in v1.21.6

func (c *Client) ZRangeArgs(ctx context.Context, z redis.ZRangeArgs) *redis.StringSliceCmd

func (*Client) ZRangeArgsWithScores added in v1.21.6

func (c *Client) ZRangeArgsWithScores(ctx context.Context, z redis.ZRangeArgs) *redis.ZSliceCmd

func (*Client) ZRangeByLex added in v1.21.6

func (c *Client) ZRangeByLex(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*Client) ZRangeByScore added in v1.21.6

func (c *Client) ZRangeByScore(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*Client) ZRangeByScoreWithScores added in v1.21.6

func (c *Client) ZRangeByScoreWithScores(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.ZSliceCmd

func (*Client) ZRangeStore added in v1.21.6

func (c *Client) ZRangeStore(ctx context.Context, dst string, z redis.ZRangeArgs) *redis.IntCmd

func (*Client) ZRangeWithScores added in v1.21.6

func (c *Client) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd

func (*Client) ZRank added in v1.21.6

func (c *Client) ZRank(ctx context.Context, key, member string) *redis.IntCmd

func (*Client) ZRem added in v1.21.6

func (c *Client) ZRem(ctx context.Context, key string, members ...interface{}) *redis.IntCmd

func (*Client) ZRemRangeByLex added in v1.21.6

func (c *Client) ZRemRangeByLex(ctx context.Context, key, min, max string) *redis.IntCmd

func (*Client) ZRemRangeByRank added in v1.21.6

func (c *Client) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *redis.IntCmd

func (*Client) ZRemRangeByScore added in v1.21.6

func (c *Client) ZRemRangeByScore(ctx context.Context, key, min, max string) *redis.IntCmd

func (*Client) ZRevRange added in v1.21.6

func (c *Client) ZRevRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd

func (*Client) ZRevRangeByLex added in v1.21.6

func (c *Client) ZRevRangeByLex(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*Client) ZRevRangeByScore added in v1.21.6

func (c *Client) ZRevRangeByScore(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*Client) ZRevRangeByScoreWithScores added in v1.21.6

func (c *Client) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *redis.ZRangeBy) *redis.ZSliceCmd

func (*Client) ZRevRangeWithScores added in v1.21.6

func (c *Client) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *redis.ZSliceCmd

func (*Client) ZRevRank added in v1.21.6

func (c *Client) ZRevRank(ctx context.Context, key, member string) *redis.IntCmd

func (*Client) ZScan added in v1.21.6

func (c *Client) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*Client) ZScore added in v1.21.6

func (c *Client) ZScore(ctx context.Context, key, member string) *redis.FloatCmd

func (*Client) ZUnion added in v1.21.6

func (c *Client) ZUnion(ctx context.Context, store redis.ZStore) *redis.StringSliceCmd

func (*Client) ZUnionStore added in v1.21.6

func (c *Client) ZUnionStore(ctx context.Context, dest string, store *redis.ZStore) *redis.IntCmd

func (*Client) ZUnionWithScores added in v1.21.6

func (c *Client) ZUnionWithScores(ctx context.Context, store redis.ZStore) *redis.ZSliceCmd

type Logging added in v1.20.6

type Logging interface {
	Printf(ctx context.Context, format string, v ...interface{})
}

type RedisConfig

type RedisConfig struct {
	Addr         string `json:"addr"`
	Password     string `json:"password"`
	DB           int    `json:"DB"`
	DialTimeout  int64  `json:"dialTimeout"`
	ReadTimeout  int64  `json:"readTimeout"`
	WriteTimeout int64  `json:"writeTimeout"`
	IdleTimeout  int64  `json:"idleTimeout"` // 连接生效时间,默认5分钟
	MaxRetries   int    `json:"maxRetries"`
	PoolSize     int    `json:"poolSize"`
	MinIdleConn  int    `json:"minIdleConn"`
	KeyPrefix    string `json:"keyPrefix"`
}

type RedisCounter

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

RedisCounter Redis 计数器

func NewRedisCounter

func NewRedisCounter(client *Client, key string, keyFmtArgs ...interface{}) *RedisCounter

func (*RedisCounter) Expire

func (c *RedisCounter) Expire(ctx context.Context, duration time.Duration) error

func (*RedisCounter) Incr

func (c *RedisCounter) Incr(ctx context.Context) int64

type RedisLocker

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

RedisLocker Redis 锁

func NewRedisLocker

func NewRedisLocker(client *Client, key string, keyFmtArgs ...interface{}) *RedisLocker

func (*RedisLocker) Key

func (l *RedisLocker) Key() string

func (*RedisLocker) Lock

func (l *RedisLocker) Lock(ctx context.Context, values ...interface{}) bool

func (*RedisLocker) Unlock

func (l *RedisLocker) Unlock(ctx context.Context, values ...interface{}) bool

func (*RedisLocker) WithConfig

func (l *RedisLocker) WithConfig(retries int, interval, expiration time.Duration) *RedisLocker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL