redis

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisNil    = redis.Nil
	TxFailedErr = redis.TxFailedErr
)
View Source
const (
	Redis_Single = iota
	Redis_Cluster
)

Variables

This section is empty.

Functions

func Append

func Append(key string, value interface{}) (err error)

func Close

func Close() (err error)

func Decode

func Decode(value []byte, result interface{}) (err error)

func Decr

func Decr(key string, value int) (err error)

func DecrBy

func DecrBy(key string, value int) (err error)

func Delete

func Delete(key string) (err error)

func Do

func Do(ctx context.Context, args ...interface{}) *redis.Cmd

func Encode

func Encode(value interface{}) (result []byte, err error)

func ExistsKey

func ExistsKey(key string) (iskeep bool, err error)

func ExpireKey

func ExpireKey(key string, expire int) (err error)

func ExpireatKey

func ExpireatKey(key string, expire_unix int64) (err error)

func Get

func Get(key string, value interface{}) (err error)

func GetSet

func GetSet(key string, value interface{}, result interface{}) (err error)

func HDel

func HDel(key string, fields ...string) (err error)

Hash

func HExists

func HExists(key string, field string) (result bool, err error)

func HGet

func HGet(key string, field string, value interface{}) (err error)

func HGetAll

func HGetAll(key string, valuetype reflect.Type) (result []interface{}, err error)

func HIncrBy

func HIncrBy(key string, field string, value int) (err error)

func HIncrByFloat

func HIncrByFloat(key string, field string, value float32) (err error)

func HMGet

func HMGet(key string, valuetype reflect.Type, fields ...string) (result []interface{}, err error)

func HMSet

func HMSet(key string, value map[string]interface{}) (err error)

func HSet

func HSet(key string, field string, value interface{}) (err error)

func HSetNX

func HSetNX(key string, field string, value interface{}) (err error)

func Hkeys

func Hkeys(key string) (result []string, err error)

func Hlen

func Hlen(key string) (result int, err error)

func INCRBY

func INCRBY(key string, amount int64) (result int64, err error)

func Incr

func Incr(key string) (err error)

func IncrBY

func IncrBY(key string, value int) (err error)

func Incrbyfloat

func Incrbyfloat(key string, value float32) (err error)

func Keys

func Keys(pattern string) (keys []string, err error)

func LPop

func LPop(key string, value interface{}) (err error)

func LPush

func LPush(key string, values ...interface{}) (err error)

func LPushX

func LPushX(key string, values ...interface{}) (err error)

func LRange

func LRange(key string, start, end int, valuetype reflect.Type) (result []interface{}, err error)

func LRem

func LRem(key string, count int, target interface{}) (err error)

func LSet

func LSet(key string, index int, value interface{}) (err error)

func Lindex

func Lindex(key string, value interface{}) (err error)

List

func Linsert

func Linsert(key string, isbefore bool, tager interface{}, value interface{}) (err error)

func Llen

func Llen(key string) (result int, err error)

func Lock

func Lock(key string, outTime int) (result bool, err error)

func Ltrim

func Ltrim(key string, start, stop int) (err error)

func MGet

func MGet(keys ...string) (result []string, err error)

func MSet

func MSet(keyvalues map[string]interface{}) (err error)

func MSetNX

func MSetNX(keyvalues map[string]interface{}) (err error)

func PersistKey

func PersistKey(key string) (err error)

func PexpireatKey

func PexpireatKey(key string, expire_unix int64) (err error)

func Pexpirekey

func Pexpirekey(key string, expire int) (err error)

func Pipeline

func Pipeline(ctx context.Context, fn func(pipe redis.Pipeliner) error) (err error)

func PttlKey

func PttlKey(key string) (leftexpire int64, err error)

func RPopLPush

func RPopLPush(oldkey string, newkey string, value interface{}) (err error)

func RPush

func RPush(key string, values ...interface{}) (err error)

func RPushX

func RPushX(key string, values ...interface{}) (err error)

func RenameKye

func RenameKye(oldkey string, newkey string) (err error)

func RenamenxKey

func RenamenxKey(oldkey string, newkey string) (err error)

func Rpop

func Rpop(key string, value interface{}) (err error)

func SAdd

func SAdd(key string, values ...interface{}) (err error)

Set

func SCard

func SCard(key string) (result int64, err error)

func SDiff

func SDiff(valuetype reflect.Type, keys ...string) (result []interface{}, err error)

func SDiffStore

func SDiffStore(destination string, keys ...string) (result int64, err error)

func SInter

func SInter(valuetype reflect.Type, keys ...string) (result []interface{}, err error)

func SInterStore

func SInterStore(destination string, keys ...string) (result int64, err error)

func SMembers

func SMembers(valuetype reflect.Type, key string) (result []interface{}, err error)

func SMove

func SMove(source string, destination string, member interface{}) (result bool, err error)

func SRem

func SRem(key string, members ...interface{}) (result int64, err error)

func SUnion

func SUnion(valuetype reflect.Type, keys ...string) (result []interface{}, err error)

func Set

func Set(key string, value interface{}, expiration time.Duration) (err error)

String

func SetNX

func SetNX(key string, value interface{}) (result int64, err error)

func Sismember

func Sismember(key string, value interface{}) (iskeep bool, err error)

func Spop

func Spop(key string) (result string, err error)

func Srandmember

func Srandmember(key string) (result string, err error)

func Sscan

func Sscan(key string, _cursor uint64, match string, count int64) (keys []string, cursor uint64, err error)

func Sunionstore

func Sunionstore(destination string, keys ...string) (result int64, err error)

func TtlKey

func TtlKey(key string) (leftexpire int64, err error)

func TxPipelined

func TxPipelined(ctx context.Context, fn func(pipe redis.Pipeliner) error) (err error)

func Type

func Type(key string) (ty string, err error)

/获取键类型

func UnLock

func UnLock(key string) (err error)

func Watch

func Watch(ctx context.Context, fn func(*redis.Tx) error, keys ...string) (err error)

func ZAdd

func ZAdd(key string, members ...*redis.Z) (err error)

ZSet

func ZCard

func ZCard(key string) (result int64, err error)

func ZCount

func ZCount(key string, min string, max string) (result int64, err error)

func ZIncrBy

func ZIncrBy(key string, increment float64, member string) (result float64, err error)

func ZInterStore

func ZInterStore(destination string, store *redis.ZStore) (result int64, err error)

func ZLexCount

func ZLexCount(key string, min string, max string) (result int64, err error)

func ZRange

func ZRange(valuetype reflect.Type, key string, start int64, stop int64) (result []interface{}, err error)

func ZRangeByLex

func ZRangeByLex(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)

func ZRangeByScore

func ZRangeByScore(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)

func ZRank

func ZRank(key string, member string) (result int64, err error)

func ZRem

func ZRem(key string, members ...interface{}) (result int64, err error)

func ZRemRangeByLex

func ZRemRangeByLex(key string, min string, max string) (result int64, err error)

func ZRemRangeByRank

func ZRemRangeByRank(key string, start int64, stop int64) (result int64, err error)

func ZRemRangeByScore

func ZRemRangeByScore(key string, min string, max string) (result int64, err error)

func ZRevRange

func ZRevRange(valuetype reflect.Type, key string, start int64, stop int64) (result []interface{}, err error)

func ZRevRangeByScore

func ZRevRangeByScore(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)

func ZRevRank

func ZRevRank(key string, member string) (result int64, err error)

func ZScan

func ZScan(key string, _cursor uint64, match string, count int64) (keys []string, cursor uint64, err error)

func ZScore

func ZScore(key string, member string) (result float64, err error)

func ZUnionStore

func ZUnionStore(dest string, store *redis.ZStore) (result int64, err error)

Types

type IRedis

type IRedis interface {
	Close() (err error)
	Do(ctx context.Context, args ...interface{}) *redis.Cmd
	Lock(key string, outTime int) (result bool, err error)
	UnLock(key string) (err error)
	Pipeline(ctx context.Context, fn func(pipe redis.Pipeliner) error) (err error)
	TxPipelined(ctx context.Context, fn func(pipe redis.Pipeliner) error) (err error)
	Watch(ctx context.Context, fn func(*redis.Tx) error, keys ...string) (err error)
	/*Key*/
	Delete(key string) (err error)
	ExistsKey(key string) (iskeep bool, err error)
	ExpireKey(key string, expire int) (err error)
	ExpireatKey(key string, expire_unix int64) (err error)
	Pexpirekey(key string, expire int) (err error)
	PexpireatKey(key string, expire_unix int64) (err error)
	PersistKey(key string) (err error)
	PttlKey(key string) (leftexpire int64, err error)
	TtlKey(key string) (leftexpire int64, err error)
	RenameKye(oldkey string, newkey string) (err error)
	RenamenxKey(oldkey string, newkey string) (err error)
	Keys(pattern string) (keys []string, err error)
	Type(key string) (ty string, err error)
	/*String*/
	Set(key string, value interface{}, expiration time.Duration) (err error)
	SetNX(key string, value interface{}) (result int64, err error)
	MSet(keyvalues map[string]interface{}) (err error)
	MSetNX(keyvalues map[string]interface{}) (err error)
	Incr(key string) (err error)
	IncrBY(key string, value int) (err error)
	Incrbyfloat(key string, value float32) (err error)
	Decr(key string, value int) (err error)
	DecrBy(key string, value int) (err error)
	Append(key string, value interface{}) (err error)
	Get(key string, value interface{}) (err error)
	GetSet(key string, value interface{}, result interface{}) (err error)
	MGet(keys ...string) (result []string, err error)
	INCRBY(key string, amount int64) (result int64, err error)
	/*List*/
	Lindex(key string, value interface{}) (err error)
	Linsert(key string, isbefore bool, tager interface{}, value interface{}) (err error)
	Llen(key string) (result int, err error)
	LPop(key string, value interface{}) (err error)
	LPush(key string, values ...interface{}) (err error)
	LPushX(key string, values ...interface{}) (err error)
	LRange(key string, start, end int, valuetype reflect.Type) (result []interface{}, err error)
	LRem(key string, count int, target interface{}) (err error)
	LSet(key string, index int, value interface{}) (err error)
	Ltrim(key string, start, stop int) (err error)
	Rpop(key string, value interface{}) (err error)
	RPopLPush(oldkey string, newkey string, value interface{}) (err error)
	RPush(key string, values ...interface{}) (err error)
	RPushX(key string, values ...interface{}) (err error)
	/*Hash*/
	HDel(key string, fields ...string) (err error)
	HExists(key string, field string) (result bool, err error)
	HGet(key string, field string, value interface{}) (err error)
	HGetAll(key string, valuetype reflect.Type) (result []interface{}, err error)
	HIncrBy(key string, field string, value int) (err error)
	HIncrByFloat(key string, field string, value float32) (err error)
	Hkeys(key string) (result []string, err error)
	Hlen(key string) (result int, err error)
	HMGet(key string, valuetype reflect.Type, fields ...string) (result []interface{}, err error)
	HMSet(key string, value map[string]interface{}) (err error)
	HSet(key string, field string, value interface{}) (err error)
	HSetNX(key string, field string, value interface{}) (err error)
	/*Set*/
	SAdd(key string, values ...interface{}) (err error)
	SCard(key string) (result int64, err error)
	SDiff(valuetype reflect.Type, keys ...string) (result []interface{}, err error)
	SDiffStore(destination string, keys ...string) (result int64, err error)
	SInter(valuetype reflect.Type, keys ...string) (result []interface{}, err error)
	SInterStore(destination string, keys ...string) (result int64, err error)
	Sismember(key string, value interface{}) (iskeep bool, err error)
	SMembers(valuetype reflect.Type, key string) (result []interface{}, err error)
	SMove(source string, destination string, member interface{}) (result bool, err error)
	Spop(key string) (result string, err error)
	Srandmember(key string) (result string, err error)
	SRem(key string, members ...interface{}) (result int64, err error)
	SUnion(valuetype reflect.Type, keys ...string) (result []interface{}, err error)
	Sunionstore(destination string, keys ...string) (result int64, err error)
	Sscan(key string, _cursor uint64, match string, count int64) (keys []string, cursor uint64, err error)
	/*ZSet*/
	ZAdd(key string, members ...*redis.Z) (err error)
	ZCard(key string) (result int64, err error)
	ZCount(key string, min string, max string) (result int64, err error)
	ZIncrBy(key string, increment float64, member string) (result float64, err error)
	ZInterStore(destination string, store *redis.ZStore) (result int64, err error)
	ZLexCount(key string, min string, max string) (result int64, err error)
	ZRange(valuetype reflect.Type, key string, start int64, stop int64) (result []interface{}, err error)
	ZRangeByLex(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)
	ZRangeByScore(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)
	ZRank(key string, member string) (result int64, err error)
	ZRem(key string, members ...interface{}) (result int64, err error)
	ZRemRangeByLex(key string, min string, max string) (result int64, err error)
	ZRemRangeByRank(key string, start int64, stop int64) (result int64, err error)
	ZRemRangeByScore(key string, min string, max string) (result int64, err error)
	ZRevRange(valuetype reflect.Type, key string, start int64, stop int64) (result []interface{}, err error)
	ZRevRangeByScore(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)
	ZRevRank(key string, member string) (result int64, err error)
	ZScore(key string, member string) (result float64, err error)
	ZUnionStore(dest string, store *redis.ZStore) (result int64, err error)
	ZScan(key string, _cursor uint64, match string, count int64) (keys []string, cursor uint64, err error)
}

type IRedisSys

type IRedisSys interface {
	IRedis
	/*Lock*/
	NewRedisMutex(key string, optfns ...RMutexOptionfn) (result *RedisMutex, err error)
	Encode(value interface{}) (result []byte, err error)
	Decode(value []byte, result interface{}) (err error)
}

func NewSys

func NewSys(options ...Optionfn) (sys IRedisSys, err error)

func Oninit

func Oninit(config map[string]interface{}, options ...Optionfn) (sys IRedisSys, err error)

type Option

type Option struct {
	RedisType              RedisType
	Redis_Single_Addr      string
	Redis_Single_Password  string
	Redis_Single_DB        int
	Redis_Single_PoolSize  int
	Redis_Cluster_Addr     []string
	Redis_Cluster_Password string
	RedisStorageType       RedisStorageType
	TimeOut                time.Duration
}

type Optionfn

type Optionfn func(*Option)

func Redis_Cluster_Addr

func Redis_Cluster_Addr(v []string) Optionfn

func SetRedisStorageType

func SetRedisStorageType(v RedisStorageType) Optionfn

func SetRedisType

func SetRedisType(v RedisType) Optionfn

func SetRedis_Cluster_Password

func SetRedis_Cluster_Password(v string) Optionfn

func SetRedis_Single_Addr

func SetRedis_Single_Addr(v string) Optionfn

/RedisUrl = "127.0.0.1:6379"

func SetRedis_Single_DB

func SetRedis_Single_DB(v int) Optionfn

func SetRedis_Single_Password

func SetRedis_Single_Password(v string) Optionfn

func SetRedis_Single_PoolSize

func SetRedis_Single_PoolSize(v int) Optionfn

func SetTimeOut

func SetTimeOut(v time.Duration) Optionfn

type RMutexOption

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

type RMutexOptionfn

type RMutexOptionfn func(*RMutexOption)

func SetDelay

func SetDelay(v time.Duration) RMutexOptionfn

func SetExpiry

func SetExpiry(v int) RMutexOptionfn

type Redis

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

func (*Redis) Append

func (this *Redis) Append(key string, value interface{}) (err error)

func (*Redis) Close

func (this *Redis) Close() (err error)

func (*Redis) Decode

func (this *Redis) Decode(value []byte, result interface{}) (err error)

func (*Redis) Decr

func (this *Redis) Decr(key string, value int) (err error)

func (*Redis) DecrBy

func (this *Redis) DecrBy(key string, value int) (err error)

func (*Redis) Delete

func (this *Redis) Delete(key string) (err error)

func (*Redis) Do

func (this *Redis) Do(ctx context.Context, args ...interface{}) *redis.Cmd

func (*Redis) Encode

func (this *Redis) Encode(value interface{}) (result []byte, err error)

/数据编码

func (*Redis) ExistsKey

func (this *Redis) ExistsKey(key string) (iskeep bool, err error)

func (*Redis) ExpireKey

func (this *Redis) ExpireKey(key string, expire int) (err error)

func (*Redis) ExpireatKey

func (this *Redis) ExpireatKey(key string, expire_unix int64) (err error)

func (*Redis) Get

func (this *Redis) Get(key string, value interface{}) (err error)

func (*Redis) GetSet

func (this *Redis) GetSet(key string, value interface{}, result interface{}) (err error)

func (*Redis) HDel

func (this *Redis) HDel(key string, fields ...string) (err error)

Hash

func (*Redis) HExists

func (this *Redis) HExists(key string, field string) (result bool, err error)

func (*Redis) HGet

func (this *Redis) HGet(key string, field string, value interface{}) (err error)

func (*Redis) HGetAll

func (this *Redis) HGetAll(key string, valuetype reflect.Type) (result []interface{}, err error)

func (*Redis) HIncrBy

func (this *Redis) HIncrBy(key string, field string, value int) (err error)

func (*Redis) HIncrByFloat

func (this *Redis) HIncrByFloat(key string, field string, value float32) (err error)

func (*Redis) HMGet

func (this *Redis) HMGet(key string, valuetype reflect.Type, fields ...string) (result []interface{}, err error)

func (*Redis) HMSet

func (this *Redis) HMSet(key string, value map[string]interface{}) (err error)

func (*Redis) HSet

func (this *Redis) HSet(key string, field string, value interface{}) (err error)

func (*Redis) HSetNX

func (this *Redis) HSetNX(key string, field string, value interface{}) (err error)

func (*Redis) Hkeys

func (this *Redis) Hkeys(key string) (result []string, err error)

func (*Redis) Hlen

func (this *Redis) Hlen(key string) (result int, err error)

func (*Redis) INCRBY

func (this *Redis) INCRBY(key string, amount int64) (result int64, err error)

func (*Redis) Incr

func (this *Redis) Incr(key string) (err error)

func (*Redis) IncrBY

func (this *Redis) IncrBY(key string, value int) (err error)

func (*Redis) Incrbyfloat

func (this *Redis) Incrbyfloat(key string, value float32) (err error)

func (*Redis) Keys

func (this *Redis) Keys(pattern string) (keys []string, err error)

func (*Redis) LPop

func (this *Redis) LPop(key string, value interface{}) (err error)

func (*Redis) LPush

func (this *Redis) LPush(key string, values ...interface{}) (err error)

func (*Redis) LPushX

func (this *Redis) LPushX(key string, values ...interface{}) (err error)

func (*Redis) LRange

func (this *Redis) LRange(key string, start, end int, valuetype reflect.Type) (result []interface{}, err error)

func (*Redis) LRem

func (this *Redis) LRem(key string, count int, target interface{}) (err error)

func (*Redis) LSet

func (this *Redis) LSet(key string, index int, value interface{}) (err error)

func (*Redis) Lindex

func (this *Redis) Lindex(key string, value interface{}) (err error)

List

func (*Redis) Linsert

func (this *Redis) Linsert(key string, isbefore bool, tager interface{}, value interface{}) (err error)

func (*Redis) Llen

func (this *Redis) Llen(key string) (result int, err error)

func (*Redis) Lock

func (this *Redis) Lock(key string, outTime int) (result bool, err error)

func (*Redis) Ltrim

func (this *Redis) Ltrim(key string, start, stop int) (err error)

func (*Redis) MGet

func (this *Redis) MGet(keys ...string) (result []string, err error)

func (*Redis) MSet

func (this *Redis) MSet(keyvalues map[string]interface{}) (err error)

func (*Redis) MSetNX

func (this *Redis) MSetNX(keyvalues map[string]interface{}) (err error)

func (*Redis) NewRedisMutex

func (this *Redis) NewRedisMutex(key string, optfns ...RMutexOptionfn) (result *RedisMutex, err error)

func (*Redis) PersistKey

func (this *Redis) PersistKey(key string) (err error)

func (*Redis) PexpireatKey

func (this *Redis) PexpireatKey(key string, expire_unix int64) (err error)

func (*Redis) Pexpirekey

func (this *Redis) Pexpirekey(key string, expire int) (err error)

func (*Redis) Pipeline

func (this *Redis) Pipeline(ctx context.Context, fn func(pipe redis.Pipeliner) error) (err error)

func (*Redis) PttlKey

func (this *Redis) PttlKey(key string) (leftexpire int64, err error)

func (*Redis) RPopLPush

func (this *Redis) RPopLPush(oldkey string, newkey string, value interface{}) (err error)

func (*Redis) RPush

func (this *Redis) RPush(key string, values ...interface{}) (err error)

func (*Redis) RPushX

func (this *Redis) RPushX(key string, values ...interface{}) (err error)

func (*Redis) RenameKye

func (this *Redis) RenameKye(oldkey string, newkey string) (err error)

func (*Redis) RenamenxKey

func (this *Redis) RenamenxKey(oldkey string, newkey string) (err error)

func (*Redis) Rpop

func (this *Redis) Rpop(key string, value interface{}) (err error)

func (*Redis) SAdd

func (this *Redis) SAdd(key string, values ...interface{}) (err error)

Set

func (*Redis) SCard

func (this *Redis) SCard(key string) (result int64, err error)

func (*Redis) SDiff

func (this *Redis) SDiff(valuetype reflect.Type, keys ...string) (result []interface{}, err error)

func (*Redis) SDiffStore

func (this *Redis) SDiffStore(destination string, keys ...string) (result int64, err error)

func (*Redis) SInter

func (this *Redis) SInter(valuetype reflect.Type, keys ...string) (result []interface{}, err error)

func (*Redis) SInterStore

func (this *Redis) SInterStore(destination string, keys ...string) (result int64, err error)

func (*Redis) SMembers

func (this *Redis) SMembers(valuetype reflect.Type, key string) (result []interface{}, err error)

func (*Redis) SMove

func (this *Redis) SMove(source string, destination string, member interface{}) (result bool, err error)

func (*Redis) SRem

func (this *Redis) SRem(key string, members ...interface{}) (result int64, err error)

func (*Redis) SUnion

func (this *Redis) SUnion(valuetype reflect.Type, keys ...string) (result []interface{}, err error)

func (*Redis) Set

func (this *Redis) Set(key string, value interface{}, expiration time.Duration) (err error)

String

func (*Redis) SetNX

func (this *Redis) SetNX(key string, value interface{}) (result int64, err error)

func (*Redis) Sismember

func (this *Redis) Sismember(key string, value interface{}) (iskeep bool, err error)

func (*Redis) Spop

func (this *Redis) Spop(key string) (result string, err error)

func (*Redis) Srandmember

func (this *Redis) Srandmember(key string) (result string, err error)

func (*Redis) Sscan

func (this *Redis) Sscan(key string, _cursor uint64, match string, count int64) (keys []string, cursor uint64, err error)

func (*Redis) Sunionstore

func (this *Redis) Sunionstore(destination string, keys ...string) (result int64, err error)

func (*Redis) TtlKey

func (this *Redis) TtlKey(key string) (leftexpire int64, err error)

func (*Redis) TxPipelined

func (this *Redis) TxPipelined(ctx context.Context, fn func(pipe redis.Pipeliner) error) (err error)

func (*Redis) Type

func (this *Redis) Type(key string) (ty string, err error)

/获取键类型

func (*Redis) UnLock

func (this *Redis) UnLock(key string) (err error)

func (*Redis) Watch

func (this *Redis) Watch(ctx context.Context, fn func(*redis.Tx) error, keys ...string) (err error)

func (*Redis) ZAdd

func (this *Redis) ZAdd(key string, members ...*redis.Z) (err error)

ZSet

func (*Redis) ZCard

func (this *Redis) ZCard(key string) (result int64, err error)

func (*Redis) ZCount

func (this *Redis) ZCount(key string, min string, max string) (result int64, err error)

func (*Redis) ZIncrBy

func (this *Redis) ZIncrBy(key string, increment float64, member string) (result float64, err error)

func (*Redis) ZInterStore

func (this *Redis) ZInterStore(destination string, store *redis.ZStore) (result int64, err error)

func (*Redis) ZLexCount

func (this *Redis) ZLexCount(key string, min string, max string) (result int64, err error)

func (*Redis) ZRange

func (this *Redis) ZRange(valuetype reflect.Type, key string, start int64, stop int64) (result []interface{}, err error)

func (*Redis) ZRangeByLex

func (this *Redis) ZRangeByLex(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)

func (*Redis) ZRangeByScore

func (this *Redis) ZRangeByScore(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)

func (*Redis) ZRank

func (this *Redis) ZRank(key string, member string) (result int64, err error)

func (*Redis) ZRem

func (this *Redis) ZRem(key string, members ...interface{}) (result int64, err error)

func (*Redis) ZRemRangeByLex

func (this *Redis) ZRemRangeByLex(key string, min string, max string) (result int64, err error)

func (*Redis) ZRemRangeByRank

func (this *Redis) ZRemRangeByRank(key string, start int64, stop int64) (result int64, err error)

func (*Redis) ZRemRangeByScore

func (this *Redis) ZRemRangeByScore(key string, min string, max string) (result int64, err error)

func (*Redis) ZRevRange

func (this *Redis) ZRevRange(valuetype reflect.Type, key string, start int64, stop int64) (result []interface{}, err error)

func (*Redis) ZRevRangeByScore

func (this *Redis) ZRevRangeByScore(valuetype reflect.Type, key string, opt *redis.ZRangeBy) (result []interface{}, err error)

func (*Redis) ZRevRank

func (this *Redis) ZRevRank(key string, member string) (result int64, err error)

func (*Redis) ZScan

func (this *Redis) ZScan(key string, _cursor uint64, match string, count int64) (keys []string, cursor uint64, err error)

func (*Redis) ZScore

func (this *Redis) ZScore(key string, member string) (result float64, err error)

func (*Redis) ZUnionStore

func (this *Redis) ZUnionStore(dest string, store *redis.ZStore) (result int64, err error)

type RedisMutex

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

func NewRedisMutex

func NewRedisMutex(key string, opt ...RMutexOptionfn) (result *RedisMutex, err error)

Lock

func (*RedisMutex) Lock

func (this *RedisMutex) Lock() (err error)

func (*RedisMutex) Unlock

func (this *RedisMutex) Unlock()

type RedisStorageType

type RedisStorageType int8

/redis 存储数据格式化类型

const (
	JsonData RedisStorageType = iota
	ProtoData
)

type RedisType

type RedisType int8

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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