redisext

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitState = "0"
	Doing     = "1"
	Done      = "99"
)

Variables

This section is empty.

Functions

func SetConfiger

func SetConfiger(ctx context.Context, configerType constants.ConfigerType) error

func WatchUpdate

func WatchUpdate(ctx context.Context)

Types

type PipelineExt added in v1.4.6

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

PipelineExt by RedisExt get pipeline

func (*PipelineExt) Close added in v1.4.6

func (m *PipelineExt) Close(ctx context.Context) error

func (*PipelineExt) Decr added in v1.4.6

func (m *PipelineExt) Decr(ctx context.Context, key string) (n *go_redis.IntCmd)

func (*PipelineExt) DecrBy added in v1.4.6

func (m *PipelineExt) DecrBy(ctx context.Context, key string, val int64) (n *go_redis.IntCmd)

func (*PipelineExt) Del added in v1.4.6

func (m *PipelineExt) Del(ctx context.Context, key string) (n *go_redis.IntCmd)

func (*PipelineExt) Discard added in v1.4.6

func (m *PipelineExt) Discard(ctx context.Context) (err error)

func (*PipelineExt) Exec added in v1.4.6

func (m *PipelineExt) Exec(ctx context.Context) (cmds []go_redis.Cmder, err error)

func (*PipelineExt) Exists added in v1.4.6

func (m *PipelineExt) Exists(ctx context.Context, key string) (n *go_redis.IntCmd)

func (*PipelineExt) Expire added in v1.4.6

func (m *PipelineExt) Expire(ctx context.Context, key string, expiration time.Duration) (b *go_redis.BoolCmd)

func (*PipelineExt) Get added in v1.4.6

func (m *PipelineExt) Get(ctx context.Context, key string) (strCmd *go_redis.StringCmd)

func (*PipelineExt) GetBit added in v1.4.6

func (m *PipelineExt) GetBit(ctx context.Context, key string, offset int64) (n *go_redis.IntCmd)

func (*PipelineExt) HDel added in v1.4.6

func (m *PipelineExt) HDel(ctx context.Context, key string, fields ...string) (n *go_redis.IntCmd)

func (*PipelineExt) HExists added in v1.4.6

func (m *PipelineExt) HExists(ctx context.Context, key string, field string) (b *go_redis.BoolCmd)

func (*PipelineExt) HGet added in v1.4.6

func (m *PipelineExt) HGet(ctx context.Context, key string, field string) (s *go_redis.StringCmd)

func (*PipelineExt) HGetAll added in v1.4.6

func (m *PipelineExt) HGetAll(ctx context.Context, key string) (sm *go_redis.StringStringMapCmd)

func (*PipelineExt) HIncrBy added in v1.4.6

func (m *PipelineExt) HIncrBy(ctx context.Context, key string, field string, incr int64) (n *go_redis.IntCmd)

func (*PipelineExt) HIncrByFloat added in v1.4.6

func (m *PipelineExt) HIncrByFloat(ctx context.Context, key string, field string, incr float64) (f *go_redis.FloatCmd)

func (*PipelineExt) HKeys added in v1.4.6

func (m *PipelineExt) HKeys(ctx context.Context, key string) (ss *go_redis.StringSliceCmd)

func (*PipelineExt) HLen added in v1.4.6

func (m *PipelineExt) HLen(ctx context.Context, key string) (n *go_redis.IntCmd)

func (*PipelineExt) HMGet added in v1.4.6

func (m *PipelineExt) HMGet(ctx context.Context, key string, fields ...string) (vs *go_redis.SliceCmd)

func (*PipelineExt) HMSet added in v1.4.6

func (m *PipelineExt) HMSet(ctx context.Context, key string, fields map[string]interface{}) (s *go_redis.StatusCmd)

func (*PipelineExt) HSet added in v1.4.6

func (m *PipelineExt) HSet(ctx context.Context, key string, field string, value interface{}) (b *go_redis.BoolCmd)

hashes apis

func (*PipelineExt) HSetNX added in v1.4.6

func (m *PipelineExt) HSetNX(ctx context.Context, key string, field string, val interface{}) (b *go_redis.BoolCmd)

func (*PipelineExt) HVals added in v1.4.6

func (m *PipelineExt) HVals(ctx context.Context, key string) (ss *go_redis.StringSliceCmd)

func (*PipelineExt) Incr added in v1.4.6

func (m *PipelineExt) Incr(ctx context.Context, key string) (n *go_redis.IntCmd)

func (*PipelineExt) IncrBy added in v1.4.6

func (m *PipelineExt) IncrBy(ctx context.Context, key string, val int64) (n *go_redis.IntCmd)

func (*PipelineExt) LIndex added in v1.4.6

func (p *PipelineExt) LIndex(ctx context.Context, key string, index int64) *go_redis.StringCmd

func (*PipelineExt) LInsert added in v1.4.6

func (p *PipelineExt) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *go_redis.IntCmd

func (*PipelineExt) LLen added in v1.4.6

func (p *PipelineExt) LLen(ctx context.Context, key string) *go_redis.IntCmd

func (*PipelineExt) LPop added in v1.4.6

func (p *PipelineExt) LPop(ctx context.Context, key string) *go_redis.StringCmd

func (*PipelineExt) LPush added in v1.4.6

func (p *PipelineExt) LPush(ctx context.Context, key string, values ...interface{}) *go_redis.IntCmd

func (*PipelineExt) LPushX added in v1.4.6

func (p *PipelineExt) LPushX(ctx context.Context, key string, value interface{}) *go_redis.IntCmd

func (*PipelineExt) LRange added in v1.4.6

func (p *PipelineExt) LRange(ctx context.Context, key string, start, stop int64) *go_redis.StringSliceCmd

func (*PipelineExt) LRem added in v1.4.6

func (p *PipelineExt) LRem(ctx context.Context, key string, count int64, value interface{}) *go_redis.IntCmd

func (*PipelineExt) LSet added in v1.4.6

func (p *PipelineExt) LSet(ctx context.Context, key string, count int64, value interface{}) *go_redis.StatusCmd

func (*PipelineExt) LTrim added in v1.4.6

func (p *PipelineExt) LTrim(ctx context.Context, key string, start, stop int64) *go_redis.StatusCmd

func (*PipelineExt) MGet added in v1.4.6

func (m *PipelineExt) MGet(ctx context.Context, keys ...string) (sliceCmd *go_redis.SliceCmd)

func (*PipelineExt) MSet added in v1.4.6

func (m *PipelineExt) MSet(ctx context.Context, pairs ...interface{}) (s *go_redis.StatusCmd)

func (*PipelineExt) RPop added in v1.4.6

func (p *PipelineExt) RPop(ctx context.Context, key string) *go_redis.StringCmd

func (*PipelineExt) RPush added in v1.4.6

func (p *PipelineExt) RPush(ctx context.Context, key string, values ...interface{}) *go_redis.IntCmd

func (*PipelineExt) RPushX added in v1.4.6

func (p *PipelineExt) RPushX(ctx context.Context, key string, value interface{}) *go_redis.IntCmd

func (*PipelineExt) Set added in v1.4.6

func (m *PipelineExt) Set(ctx context.Context, key string, val interface{}, exp time.Duration) (statusCmd *go_redis.StatusCmd)

func (*PipelineExt) SetBit added in v1.4.6

func (m *PipelineExt) SetBit(ctx context.Context, key string, offset int64, value int) (n *go_redis.IntCmd)

func (*PipelineExt) SetNX added in v1.4.6

func (m *PipelineExt) SetNX(ctx context.Context, key string, val interface{}, exp time.Duration) (b *go_redis.BoolCmd)

func (*PipelineExt) TTL added in v1.4.6

func (m *PipelineExt) TTL(ctx context.Context, key string) (d *go_redis.DurationCmd)

func (*PipelineExt) ZAdd added in v1.4.6

func (m *PipelineExt) ZAdd(ctx context.Context, key string, members []Z) (n *go_redis.IntCmd)

sorted set apis

func (*PipelineExt) ZAddCh added in v1.4.6

func (m *PipelineExt) ZAddCh(ctx context.Context, key string, members []Z) (n *go_redis.IntCmd)

func (*PipelineExt) ZAddNX added in v1.4.6

func (m *PipelineExt) ZAddNX(ctx context.Context, key string, members []Z) (n *go_redis.IntCmd)

func (*PipelineExt) ZAddNXCh added in v1.4.6

func (m *PipelineExt) ZAddNXCh(ctx context.Context, key string, members []Z) (n *go_redis.IntCmd)

func (*PipelineExt) ZAddXX added in v1.4.6

func (m *PipelineExt) ZAddXX(ctx context.Context, key string, members []Z) (n *go_redis.IntCmd)

func (*PipelineExt) ZAddXXCh added in v1.4.6

func (m *PipelineExt) ZAddXXCh(ctx context.Context, key string, members []Z) (n *go_redis.IntCmd)

func (*PipelineExt) ZCard added in v1.4.6

func (m *PipelineExt) ZCard(ctx context.Context, key string) (n *go_redis.IntCmd)

func (*PipelineExt) ZCount added in v1.4.6

func (m *PipelineExt) ZCount(ctx context.Context, key, min, max string) (n *go_redis.IntCmd)

func (*PipelineExt) ZIncr added in v1.4.6

func (m *PipelineExt) ZIncr(ctx context.Context, key string, member Z) (f *go_redis.FloatCmd)

func (*PipelineExt) ZIncrBy added in v1.4.6

func (m *PipelineExt) ZIncrBy(ctx context.Context, key string, increment float64, member string) (f *go_redis.FloatCmd)

func (*PipelineExt) ZIncrNX added in v1.4.6

func (m *PipelineExt) ZIncrNX(ctx context.Context, key string, member Z) (f *go_redis.FloatCmd)

func (*PipelineExt) ZIncrXX added in v1.4.6

func (m *PipelineExt) ZIncrXX(ctx context.Context, key string, member Z) (f *go_redis.FloatCmd)

func (*PipelineExt) ZRange added in v1.4.6

func (m *PipelineExt) ZRange(ctx context.Context, key string, start, stop int64) (ss *go_redis.StringSliceCmd)

func (*PipelineExt) ZRangeByLex added in v1.4.6

func (m *PipelineExt) ZRangeByLex(ctx context.Context, key string, by ZRangeBy) (ss *go_redis.StringSliceCmd)

func (*PipelineExt) ZRangeByScore added in v1.4.6

func (m *PipelineExt) ZRangeByScore(ctx context.Context, key string, by ZRangeBy) (ss *go_redis.StringSliceCmd)

func (*PipelineExt) ZRangeWithScores added in v1.4.6

func (m *PipelineExt) ZRangeWithScores(ctx context.Context, key string, start, stop int64) (zs *go_redis.ZSliceCmd)

func (*PipelineExt) ZRank added in v1.4.6

func (m *PipelineExt) ZRank(ctx context.Context, key string, member string) (n *go_redis.IntCmd)

func (*PipelineExt) ZRem added in v1.4.6

func (m *PipelineExt) ZRem(ctx context.Context, key string, members []interface{}) (n *go_redis.IntCmd)

func (*PipelineExt) ZRevRange added in v1.4.6

func (m *PipelineExt) ZRevRange(ctx context.Context, key string, start, stop int64) (ss *go_redis.StringSliceCmd)

func (*PipelineExt) ZRevRangeWithScores added in v1.4.6

func (m *PipelineExt) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) (zs *go_redis.ZSliceCmd)

func (*PipelineExt) ZRevRank added in v1.4.6

func (m *PipelineExt) ZRevRank(ctx context.Context, key string, member string) (n *go_redis.IntCmd)

func (*PipelineExt) ZScore added in v1.4.6

func (m *PipelineExt) ZScore(ctx context.Context, key string, member string) (f *go_redis.FloatCmd)

type RedisExt

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

func NewRedisExt

func NewRedisExt(namespace, prefix string) *RedisExt

func NewRedisExtNoPrefix added in v1.4.6

func NewRedisExtNoPrefix(namespace string) *RedisExt

NewRedisExtNoPrefix not fix redis key

func (*RedisExt) Append added in v1.4.10

func (m *RedisExt) Append(ctx context.Context, key, val string) (n int64, err error)

func (*RedisExt) Confirm added in v1.3.35

func (m *RedisExt) Confirm(ctx context.Context, key string) error

Confirm 确定业务处理完成

func (*RedisExt) Decr

func (m *RedisExt) Decr(ctx context.Context, key string) (n int64, err error)

func (*RedisExt) DecrBy

func (m *RedisExt) DecrBy(ctx context.Context, key string, val int64) (n int64, err error)

func (*RedisExt) Del

func (m *RedisExt) Del(ctx context.Context, key string) (n int64, err error)

func (*RedisExt) Eval added in v1.3.35

func (m *RedisExt) Eval(ctx context.Context, script *Script, keys []string, args ...interface{}) (r interface{}, err error)

Eval exec with script

func (*RedisExt) EvalSha added in v1.3.35

func (m *RedisExt) EvalSha(ctx context.Context, script *Script, keys []string, args ...interface{}) (r interface{}, err error)

EvalSha exec with script hash

func (*RedisExt) Exists

func (m *RedisExt) Exists(ctx context.Context, key string) (n int64, err error)

func (*RedisExt) Expire

func (m *RedisExt) Expire(ctx context.Context, key string, expiration time.Duration) (b bool, err error)

func (*RedisExt) Get

func (m *RedisExt) Get(ctx context.Context, key string) (s string, err error)

func (*RedisExt) GetBit

func (m *RedisExt) GetBit(ctx context.Context, key string, offset int64) (n int64, err error)

func (*RedisExt) HDel

func (m *RedisExt) HDel(ctx context.Context, key string, fields ...string) (n int64, err error)

func (*RedisExt) HExists

func (m *RedisExt) HExists(ctx context.Context, key string, field string) (b bool, err error)

func (*RedisExt) HGet

func (m *RedisExt) HGet(ctx context.Context, key string, field string) (s string, err error)

func (*RedisExt) HGetAll

func (m *RedisExt) HGetAll(ctx context.Context, key string) (sm map[string]string, err error)

func (*RedisExt) HIncrBy

func (m *RedisExt) HIncrBy(ctx context.Context, key string, field string, incr int64) (n int64, err error)

func (*RedisExt) HIncrByFloat

func (m *RedisExt) HIncrByFloat(ctx context.Context, key string, field string, incr float64) (f float64, err error)

func (*RedisExt) HKeys

func (m *RedisExt) HKeys(ctx context.Context, key string) (ss []string, err error)

func (*RedisExt) HLen

func (m *RedisExt) HLen(ctx context.Context, key string) (n int64, err error)

func (*RedisExt) HMGet

func (m *RedisExt) HMGet(ctx context.Context, key string, fields ...string) (vs []interface{}, err error)

func (*RedisExt) HMSet

func (m *RedisExt) HMSet(ctx context.Context, key string, fields map[string]interface{}) (s string, err error)

func (*RedisExt) HScan added in v1.4.10

func (m *RedisExt) HScan(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, rcursor uint64, err error)

func (*RedisExt) HSet

func (m *RedisExt) HSet(ctx context.Context, key string, field string, value interface{}) (b bool, err error)

hashes apis

func (*RedisExt) HSetNX

func (m *RedisExt) HSetNX(ctx context.Context, key string, field string, val interface{}) (b bool, err error)

func (*RedisExt) HVals

func (m *RedisExt) HVals(ctx context.Context, key string) (ss []string, err error)

func (*RedisExt) Incr

func (m *RedisExt) Incr(ctx context.Context, key string) (n int64, err error)

func (*RedisExt) IncrBy

func (m *RedisExt) IncrBy(ctx context.Context, key string, val int64) (n int64, err error)

func (*RedisExt) LIndex

func (m *RedisExt) LIndex(ctx context.Context, key string, index int64) (element string, err error)

func (*RedisExt) LInsert

func (m *RedisExt) LInsert(ctx context.Context, key, op string, pivot, value interface{}) (n int64, err error)

func (*RedisExt) LLen

func (m *RedisExt) LLen(ctx context.Context, key string) (n int64, err error)

func (*RedisExt) LPop

func (m *RedisExt) LPop(ctx context.Context, key string) (element string, err error)

func (*RedisExt) LPush

func (m *RedisExt) LPush(ctx context.Context, key string, values ...interface{}) (n int64, err error)

func (*RedisExt) LPushX

func (m *RedisExt) LPushX(ctx context.Context, key string, value interface{}) (n int64, err error)

func (*RedisExt) LRange

func (m *RedisExt) LRange(ctx context.Context, key string, start, stop int64) (r []string, err error)

func (*RedisExt) LRem

func (m *RedisExt) LRem(ctx context.Context, key string, count int64, value interface{}) (n int64, err error)

func (*RedisExt) LSet

func (m *RedisExt) LSet(ctx context.Context, key string, index int64, value interface{}) (r string, err error)

func (*RedisExt) LTrim

func (m *RedisExt) LTrim(ctx context.Context, key string, start, stop int64) (r string, err error)

func (*RedisExt) Lock added in v1.3.35

func (m *RedisExt) Lock(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)

Lock get a global lock identified by key, if failed, return quickly

func (*RedisExt) LockWithTimeout added in v1.3.35

func (m *RedisExt) LockWithTimeout(ctx context.Context, key string, value interface{}, expiration, timeout time.Duration) (r bool, err error)

LockWithTimeout will retry get lock in timeout every retryTimeGap

func (*RedisExt) MGet

func (m *RedisExt) MGet(ctx context.Context, keys ...string) (v []interface{}, err error)

func (*RedisExt) MSet

func (m *RedisExt) MSet(ctx context.Context, pairs ...interface{}) (s string, err error)

func (*RedisExt) Pipeline added in v1.4.6

func (m *RedisExt) Pipeline(ctx context.Context) (pipe *PipelineExt, err error)

func (*RedisExt) RPop

func (m *RedisExt) RPop(ctx context.Context, key string) (element string, err error)

func (*RedisExt) RPush

func (m *RedisExt) RPush(ctx context.Context, key string, values ...interface{}) (n int64, err error)

func (*RedisExt) RPushX

func (m *RedisExt) RPushX(ctx context.Context, key string, value interface{}) (n int64, err error)

func (*RedisExt) SAdd added in v1.4.7

func (m *RedisExt) SAdd(ctx context.Context, key string, members ...interface{}) (i int64, err error)

func (*RedisExt) SCard added in v1.4.7

func (m *RedisExt) SCard(ctx context.Context, key string) (i int64, err error)

func (*RedisExt) SIsMember added in v1.4.7

func (m *RedisExt) SIsMember(ctx context.Context, key string, member interface{}) (b bool, err error)

func (*RedisExt) SMembers added in v1.4.10

func (m *RedisExt) SMembers(ctx context.Context, key string) (s []string, err error)

func (*RedisExt) SPop added in v1.4.7

func (m *RedisExt) SPop(ctx context.Context, key string) (s string, err error)

func (*RedisExt) SPopN added in v1.4.7

func (m *RedisExt) SPopN(ctx context.Context, key string, count int64) (s []string, err error)

func (*RedisExt) SRandMember added in v1.4.11

func (m *RedisExt) SRandMember(ctx context.Context, key string) (s string, err error)

func (*RedisExt) SRandMemberN added in v1.4.11

func (m *RedisExt) SRandMemberN(ctx context.Context, key string, count int64) (s []string, err error)

func (*RedisExt) SRem added in v1.4.7

func (m *RedisExt) SRem(ctx context.Context, key string, members ...interface{}) (i int64, err error)

func (*RedisExt) SScan added in v1.4.7

func (m *RedisExt) SScan(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, rcursor uint64, err error)

func (*RedisExt) ScriptExists added in v1.3.35

func (m *RedisExt) ScriptExists(ctx context.Context, script *Script) (r bool, err error)

ScriptExists check if script exists in redis server

func (*RedisExt) ScriptLoad added in v1.3.35

func (m *RedisExt) ScriptLoad(ctx context.Context, script *Script) (r string, err error)

ScriptLoad load script to redis server

func (*RedisExt) Set

func (m *RedisExt) Set(ctx context.Context, key string, val interface{}, exp time.Duration) (s string, err error)

func (*RedisExt) SetBit

func (m *RedisExt) SetBit(ctx context.Context, key string, offset int64, value int) (n int64, err error)

func (*RedisExt) SetNX

func (m *RedisExt) SetNX(ctx context.Context, key string, val interface{}, exp time.Duration) (b bool, err error)

func (*RedisExt) TTL added in v1.4.4

func (m *RedisExt) TTL(ctx context.Context, key string) (d time.Duration, err error)

func (*RedisExt) TryAcquire added in v1.3.35

func (m *RedisExt) TryAcquire(ctx context.Context, key string, expiration, timeout time.Duration) (canHandle bool, state string, err error)

TryAcquire 通过特殊的全局锁,保证以key为依据的业务操作是幂等的,可能的情况如下:

入口参数: @timeout: 业务操作的超时时间,比如: 2min @expiration: 业务记录过期时间,比如: 24h

返回参数: @canHandle: 是否可以继续执行该笔业务记录, @state: 该笔业务记录的状态,InitState:初始状态 Done: 处理完成 Doing:正在处理中 @err: 异常错误

特别说明: 可以继续执行该笔业务记录的情况有: 记录为初始状态或者记录为Doing状态,且超过了timeout这个执行时间

func (*RedisExt) Unlock added in v1.3.35

func (m *RedisExt) Unlock(ctx context.Context, key string, value interface{}) (bool, error)

Unlock release lock with check lock value

func (*RedisExt) ZAdd

func (m *RedisExt) ZAdd(ctx context.Context, key string, members []Z) (n int64, err error)

sorted set apis

func (*RedisExt) ZAddCh

func (m *RedisExt) ZAddCh(ctx context.Context, key string, members []Z) (n int64, err error)

func (*RedisExt) ZAddNX

func (m *RedisExt) ZAddNX(ctx context.Context, key string, members []Z) (n int64, err error)

func (*RedisExt) ZAddNXCh

func (m *RedisExt) ZAddNXCh(ctx context.Context, key string, members []Z) (n int64, err error)

func (*RedisExt) ZAddXX

func (m *RedisExt) ZAddXX(ctx context.Context, key string, members []Z) (n int64, err error)

func (*RedisExt) ZAddXXCh

func (m *RedisExt) ZAddXXCh(ctx context.Context, key string, members []Z) (n int64, err error)

func (*RedisExt) ZCard

func (m *RedisExt) ZCard(ctx context.Context, key string) (n int64, err error)

func (*RedisExt) ZCount

func (m *RedisExt) ZCount(ctx context.Context, key, min, max string) (n int64, err error)

func (*RedisExt) ZIncr

func (m *RedisExt) ZIncr(ctx context.Context, key string, member Z) (f float64, err error)

func (*RedisExt) ZIncrBy

func (m *RedisExt) ZIncrBy(ctx context.Context, key string, increment float64, member string) (f float64, err error)

func (*RedisExt) ZIncrNX

func (m *RedisExt) ZIncrNX(ctx context.Context, key string, member Z) (f float64, err error)

func (*RedisExt) ZIncrXX

func (m *RedisExt) ZIncrXX(ctx context.Context, key string, member Z) (f float64, err error)

func (*RedisExt) ZRange

func (m *RedisExt) ZRange(ctx context.Context, key string, start, stop int64) (ss []string, err error)

func (*RedisExt) ZRangeByLex

func (m *RedisExt) ZRangeByLex(ctx context.Context, key string, by ZRangeBy) (ss []string, err error)

func (*RedisExt) ZRangeByScore

func (m *RedisExt) ZRangeByScore(ctx context.Context, key string, by ZRangeBy) (ss []string, err error)

func (*RedisExt) ZRangeWithScores

func (m *RedisExt) ZRangeWithScores(ctx context.Context, key string, start, stop int64) (zs []Z, err error)

func (*RedisExt) ZRank

func (m *RedisExt) ZRank(ctx context.Context, key string, member string) (n int64, err error)

func (*RedisExt) ZRem

func (m *RedisExt) ZRem(ctx context.Context, key string, members []interface{}) (n int64, err error)

func (*RedisExt) ZRemRangeByRank added in v1.4.8

func (m *RedisExt) ZRemRangeByRank(ctx context.Context, key string, start int64, stop int64) (i int64, err error)

func (*RedisExt) ZRemRangeByScore added in v1.4.8

func (m *RedisExt) ZRemRangeByScore(ctx context.Context, key, min, max string) (i int64, err error)

func (*RedisExt) ZRevRange

func (m *RedisExt) ZRevRange(ctx context.Context, key string, start, stop int64) (ss []string, err error)

func (*RedisExt) ZRevRangeWithScores

func (m *RedisExt) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) (zs []Z, err error)

func (*RedisExt) ZRevRank

func (m *RedisExt) ZRevRank(ctx context.Context, key string, member string) (n int64, err error)

func (*RedisExt) ZScan added in v1.4.10

func (m *RedisExt) ZScan(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, rcursor uint64, err error)

func (*RedisExt) ZScore

func (m *RedisExt) ZScore(ctx context.Context, key string, member string) (f float64, err error)

type Script added in v1.3.35

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

func NewScript added in v1.3.35

func NewScript(src string) *Script

NewScript src: script content

func (*Script) Hash added in v1.3.35

func (s *Script) Hash() string

Hash return hash of script

type Z

type Z struct {
	Score  float64
	Member interface{}
}

type ZRangeBy

type ZRangeBy struct {
	Min, Max      string
	Offset, Count int64
}

Jump to

Keyboard shortcuts

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