Documentation ¶
Index ¶
- Constants
- Variables
- func NewRedisDriverCluster(domain string, appGroup string, keySep string, opt *redis.ClusterOptions) *redisDriver
- func NewRedisDriverStandalone(domain string, appGroup string, keySep string, opt *redis.Options) *redisDriver
- func NewRedisTagProcessor(driver IRedisDriver) *redisTagProcessor
- type AutoConfigReids
- type BoundHashOperation
- func (this *BoundHashOperation) Cas(hashKey string, old string, new string) (bool, error)
- func (this *BoundHashOperation) Expire(duration time.Duration) (bool, error)
- func (this *BoundHashOperation) HDel(hashKeys ...string) (int64, error)
- func (this *BoundHashOperation) HExists(hashKey string) (bool, error)
- func (this *BoundHashOperation) HGet(hashKey string) (string, error)
- func (this *BoundHashOperation) HGetAll() (map[string]string, error)
- func (this *BoundHashOperation) HIncrBy(hashKey string, delta int64) (int64, error)
- func (this *BoundHashOperation) HIncrByFloat(hashKey string, delta float64) (float64, error)
- func (this *BoundHashOperation) HKeys() ([]string, error)
- func (this *BoundHashOperation) HLen() (int64, error)
- func (this *BoundHashOperation) HMGet(hashKeys ...string) ([]interface{}, error)
- func (this *BoundHashOperation) HMSet(kv map[string]interface{}) (string, error)
- func (this *BoundHashOperation) HScan(cursor uint64, match string, count int64) *redis.ScanCmd
- func (this *BoundHashOperation) HSet(hashKey string, value string) (bool, error)
- func (this *BoundHashOperation) HSetNX(hashKey string, value string) (bool, error)
- type BoundListOperation
- func (this *BoundListOperation) Expire(key string, duration time.Duration) (bool, error)
- func (this *BoundListOperation) LIndex(index int64) (string, error)
- func (this *BoundListOperation) LInsert(op string, pivot, value string) (int64, error)
- func (this *BoundListOperation) LLen() (int64, error)
- func (this *BoundListOperation) LPop() (string, error)
- func (this *BoundListOperation) LPush(value ...string) (int64, error)
- func (this *BoundListOperation) LPushX(value string) (int64, error)
- func (this *BoundListOperation) LRange(start int64, end int64) ([]string, error)
- func (this *BoundListOperation) LRem(count int64, value string) (int64, error)
- func (this *BoundListOperation) LSet(index int64, value string) (string, error)
- func (this *BoundListOperation) LTrim(start int64, end int64) (string, error)
- func (this *BoundListOperation) RPop() (string, error)
- func (this *BoundListOperation) RPush(value ...interface{}) (int64, error)
- type BoundSetOperation
- func (this *BoundSetOperation) SAdd(values ...string) (int64, error)
- func (this *BoundSetOperation) SCard() (int64, error)
- func (this *BoundSetOperation) SIsMember(o string) (bool, error)
- func (this *BoundSetOperation) SMembers() ([]string, error)
- func (this *BoundSetOperation) SPop() (string, error)
- func (this *BoundSetOperation) SPopN(count int64) ([]string, error)
- func (this *BoundSetOperation) SRandMember() (string, error)
- func (this *BoundSetOperation) SRandMemberN(count int64) ([]string, error)
- func (this *BoundSetOperation) SRem(values ...string) (int64, error)
- func (this *BoundSetOperation) SScan(cursor uint64, match string, count int64) *redis.ScanCmd
- type BoundValueOperation
- func (this *BoundValueOperation) Append(value string) (int64, error)
- func (this *BoundValueOperation) Cas(old string, new string) (bool, error)
- func (this *BoundValueOperation) Decr() (int64, error)
- func (this *BoundValueOperation) DecrBy(delta int64) (int64, error)
- func (this *BoundValueOperation) Expire(key string, duration time.Duration) (bool, error)
- func (this *BoundValueOperation) Get() (string, error)
- func (this *BoundValueOperation) GetBit(offset int64) (int64, error)
- func (this *BoundValueOperation) GetRange(start int64, end int64) (string, error)
- func (this *BoundValueOperation) GetSet(value string) (string, error)
- func (this *BoundValueOperation) Incr() (int64, error)
- func (this *BoundValueOperation) IncrBy(delta int64) (int64, error)
- func (this *BoundValueOperation) IncrByFloat(delta float64) (float64, error)
- func (this *BoundValueOperation) Set(value string) (string, error)
- func (this *BoundValueOperation) SetBit(offset int64, value int) (int64, error)
- func (this *BoundValueOperation) SetNX(value string) (bool, error)
- func (this *BoundValueOperation) SetNXTimeout(value string, timeout time.Duration) (bool, error)
- func (this *BoundValueOperation) SetRange(value string, offset int64) (int64, error)
- func (this *BoundValueOperation) SetTimeout(value string, timeout time.Duration) (string, error)
- func (this *BoundValueOperation) StrLen() (int64, error)
- type BoundZSetOperation
- func (this *BoundZSetOperation) ZAdd(members ...redis.Z) (int64, error)
- func (this *BoundZSetOperation) ZAddCh(members ...redis.Z) (int64, error)
- func (this *BoundZSetOperation) ZAddNX(members ...redis.Z) (int64, error)
- func (this *BoundZSetOperation) ZAddNXCh(members ...redis.Z) (int64, error)
- func (this *BoundZSetOperation) ZAddXX(members ...redis.Z) (int64, error)
- func (this *BoundZSetOperation) ZAddXXCh(members ...redis.Z) (int64, error)
- func (this *BoundZSetOperation) ZCard() (int64, error)
- func (this *BoundZSetOperation) ZCount(min, max string) (int64, error)
- func (this *BoundZSetOperation) ZIncr(member redis.Z) (float64, error)
- func (this *BoundZSetOperation) ZIncrBy(increment float64, member string) (float64, error)
- func (this *BoundZSetOperation) ZIncrNX(member redis.Z) (float64, error)
- func (this *BoundZSetOperation) ZIncrXX(member redis.Z) (float64, error)
- func (this *BoundZSetOperation) ZLexCount(min, max string) (int64, error)
- func (this *BoundZSetOperation) ZPopMax(count ...int64) ([]redis.Z, error)
- func (this *BoundZSetOperation) ZPopMin(count ...int64) ([]redis.Z, error)
- func (this *BoundZSetOperation) ZRange(start, stop int64) ([]string, error)
- func (this *BoundZSetOperation) ZRangeByLex(opt redis.ZRangeBy) ([]string, error)
- func (this *BoundZSetOperation) ZRangeByScore(opt redis.ZRangeBy) ([]string, error)
- func (this *BoundZSetOperation) ZRangeByScoreWithScores(opt redis.ZRangeBy) ([]redis.Z, error)
- func (this *BoundZSetOperation) ZRangeWithScores(start, stop int64) ([]redis.Z, error)
- func (this *BoundZSetOperation) ZRank(member string) (int64, error)
- func (this *BoundZSetOperation) ZRem(members ...interface{}) (int64, error)
- func (this *BoundZSetOperation) ZRemRangeByLex(min, max string) (int64, error)
- func (this *BoundZSetOperation) ZRemRangeByRank(start, stop int64) (int64, error)
- func (this *BoundZSetOperation) ZRemRangeByScore(min, max string) (int64, error)
- func (this *BoundZSetOperation) ZRevRange(start, stop int64) ([]string, error)
- func (this *BoundZSetOperation) ZRevRangeByLex(opt redis.ZRangeBy) ([]string, error)
- func (this *BoundZSetOperation) ZRevRangeByScore(opt redis.ZRangeBy) ([]string, error)
- func (this *BoundZSetOperation) ZRevRangeByScoreWithScores(opt redis.ZRangeBy) ([]redis.Z, error)
- func (this *BoundZSetOperation) ZRevRangeWithScores(start, stop int64) ([]redis.Z, error)
- func (this *BoundZSetOperation) ZRevRank(member string) (int64, error)
- func (this *BoundZSetOperation) ZScore(member string) (float64, error)
- type HashOperation
- func (this *HashOperation) Cas(key string, hashKey string, old string, new string) (bool, error)
- func (this *HashOperation) Expire(key string, duration time.Duration) (bool, error)
- func (this *HashOperation) HDel(key string, hashKeys ...string) (int64, error)
- func (this *HashOperation) HExists(key string, hashKey string) (bool, error)
- func (this *HashOperation) HGet(key string, hashKey string) (string, error)
- func (this *HashOperation) HGetAll(key string) (map[string]string, error)
- func (this *HashOperation) HIncrBy(key string, hashKey string, delta int64) (int64, error)
- func (this *HashOperation) HIncrByFloat(key string, hashKey string, delta float64) (float64, error)
- func (this *HashOperation) HKeys(key string) ([]string, error)
- func (this *HashOperation) HLen(key string) (int64, error)
- func (this *HashOperation) HMGet(key string, hashKeys ...string) ([]interface{}, error)
- func (this *HashOperation) HMSet(key string, kv map[string]interface{}) (string, error)
- func (this *HashOperation) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (this *HashOperation) HSet(key string, hashKey string, value string) (bool, error)
- func (this *HashOperation) HSetNX(key string, hashKey string, value string) (bool, error)
- type IRedisDriver
- type ListOperation
- func (this *ListOperation) BLPop(timeout time.Duration, keys ...string) ([]string, error)
- func (this *ListOperation) BRPop(timeout time.Duration, keys ...string) ([]string, error)
- func (this *ListOperation) BRPopLPush(source, destination string, timeout time.Duration) (string, error)
- func (this *ListOperation) Expire(key string, duration time.Duration) (bool, error)
- func (this *ListOperation) LIndex(key string, index int64) (string, error)
- func (this *ListOperation) LInsert(key, op string, pivot, value string) (int64, error)
- func (this *ListOperation) LLen(key string) (int64, error)
- func (this *ListOperation) LPop(key string) (string, error)
- func (this *ListOperation) LPush(key string, value ...string) (int64, error)
- func (this *ListOperation) LPushX(key string, value string) (int64, error)
- func (this *ListOperation) LRange(key string, start int64, end int64) ([]string, error)
- func (this *ListOperation) LRem(key string, count int64, value string) (int64, error)
- func (this *ListOperation) LSet(key string, index int64, value string) (string, error)
- func (this *ListOperation) LTrim(key string, start int64, end int64) (string, error)
- func (this *ListOperation) RPop(key string) (string, error)
- func (this *ListOperation) RPopLPush(sourceKey string, destinationKey string) (string, error)
- func (this *ListOperation) RPush(key string, value ...interface{}) (int64, error)
- type RedisAttributeGroup
- func (this *RedisAttributeGroup) CasSetAttribute(key string, oldValue string, newValue string) bool
- func (this *RedisAttributeGroup) GetAttribute(key string) (string, error)
- func (this *RedisAttributeGroup) SetAttribute(key string, value string) error
- func (this *RedisAttributeGroup) SetAttributes(values map[string]interface{}) error
- func (this *RedisAttributeGroup) SetExpireDuration(duration time.Duration) error
- type RedisMQBundle
- type RedisMessageQueue
- type SetOperation
- func (this *SetOperation) SAdd(key string, values ...string) (int64, error)
- func (this *SetOperation) SCard(key string) (int64, error)
- func (this *SetOperation) SDiff(keys ...string) ([]string, error)
- func (this *SetOperation) SDiffStore(destination string, keys ...string) (int64, error)
- func (this *SetOperation) SInter(keys ...string) ([]string, error)
- func (this *SetOperation) SInterStore(destination string, keys ...string) (int64, error)
- func (this *SetOperation) SIsMember(key string, o string) (bool, error)
- func (this *SetOperation) SMembers(key string) ([]string, error)
- func (this *SetOperation) SMove(key string, value string, destKey string) (bool, error)
- func (this *SetOperation) SPop(key string) (string, error)
- func (this *SetOperation) SPopN(key string, count int64) ([]string, error)
- func (this *SetOperation) SRandMember(key string) (string, error)
- func (this *SetOperation) SRandMemberN(key string, count int64) ([]string, error)
- func (this *SetOperation) SRem(key string, values ...string) (int64, error)
- func (this *SetOperation) SScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (this *SetOperation) SUnion(keys ...string) ([]string, error)
- func (this *SetOperation) SUnionStore(destination string, keys ...string) (int64, error)
- type ValueOperation
- func (this *ValueOperation) Append(key string, value string) (int64, error)
- func (this *ValueOperation) Cas(key string, old string, new string) (bool, error)
- func (this *ValueOperation) Decr(key string) (int64, error)
- func (this *ValueOperation) DecrBy(key string, delta int64) (int64, error)
- func (this *ValueOperation) Expire(key string, duration time.Duration) (bool, error)
- func (this *ValueOperation) Get(key string) (string, error)
- func (this *ValueOperation) GetBit(key string, offset int64) (int64, error)
- func (this *ValueOperation) GetRange(key string, start int64, end int64) (string, error)
- func (this *ValueOperation) GetSet(key string, value string) (string, error)
- func (this *ValueOperation) Incr(key string) (int64, error)
- func (this *ValueOperation) IncrBy(key string, delta int64) (int64, error)
- func (this *ValueOperation) IncrByFloat(key string, delta float64) (float64, error)
- func (this *ValueOperation) MGet(keys ...string) ([]string, error)
- func (this *ValueOperation) MSet(kvalues map[string]string) (string, error)
- func (this *ValueOperation) MSetNX(kvalues map[string]string) (bool, error)
- func (this *ValueOperation) Set(key string, value string) (string, error)
- func (this *ValueOperation) SetBit(key string, offset int64, value int) (int64, error)
- func (this *ValueOperation) SetNX(key string, value string) (bool, error)
- func (this *ValueOperation) SetNXTimeout(key string, value string, timeout time.Duration) (bool, error)
- func (this *ValueOperation) SetRange(key string, value string, offset int64) (int64, error)
- func (this *ValueOperation) SetTimeout(key string, value string, timeout time.Duration) (string, error)
- func (this *ValueOperation) StrLen(key string) (int64, error)
- type WrapKeyFunc
- type ZSetOperation
- func (this *ZSetOperation) Add(key string, members ...redis.Z) (int64, error)
- func (this *ZSetOperation) BZPopMax(timeout time.Duration, keys ...string) (redis.ZWithKey, error)
- func (this *ZSetOperation) BZPopMin(timeout time.Duration, keys ...string) (redis.ZWithKey, error)
- func (this *ZSetOperation) ZAddCh(key string, members ...redis.Z) (int64, error)
- func (this *ZSetOperation) ZAddNX(key string, members ...redis.Z) (int64, error)
- func (this *ZSetOperation) ZAddNXCh(key string, members ...redis.Z) (int64, error)
- func (this *ZSetOperation) ZAddXX(key string, members ...redis.Z) (int64, error)
- func (this *ZSetOperation) ZAddXXCh(key string, members ...redis.Z) (int64, error)
- func (this *ZSetOperation) ZCard(key string) (int64, error)
- func (this *ZSetOperation) ZCount(key, min, max string) (int64, error)
- func (this *ZSetOperation) ZIncr(key string, member redis.Z) (float64, error)
- func (this *ZSetOperation) ZIncrBy(key string, increment float64, member string) (float64, error)
- func (this *ZSetOperation) ZIncrNX(key string, member redis.Z) (float64, error)
- func (this *ZSetOperation) ZIncrXX(key string, member redis.Z) (float64, error)
- func (this *ZSetOperation) ZInterStore(destination string, store redis.ZStore, keys ...string) (int64, error)
- func (this *ZSetOperation) ZLexCount(key, min, max string) (int64, error)
- func (this *ZSetOperation) ZPopMax(key string, count ...int64) ([]redis.Z, error)
- func (this *ZSetOperation) ZPopMin(key string, count ...int64) ([]redis.Z, error)
- func (this *ZSetOperation) ZRange(key string, start, stop int64) ([]string, error)
- func (this *ZSetOperation) ZRangeByLex(key string, opt redis.ZRangeBy) ([]string, error)
- func (this *ZSetOperation) ZRangeByScore(key string, opt redis.ZRangeBy) ([]string, error)
- func (this *ZSetOperation) ZRangeByScoreWithScores(key string, opt redis.ZRangeBy) ([]redis.Z, error)
- func (this *ZSetOperation) ZRangeWithScores(key string, start, stop int64) ([]redis.Z, error)
- func (this *ZSetOperation) ZRank(key, member string) (int64, error)
- func (this *ZSetOperation) ZRem(key string, members ...interface{}) (int64, error)
- func (this *ZSetOperation) ZRemRangeByLex(key, min, max string) (int64, error)
- func (this *ZSetOperation) ZRemRangeByRank(key string, start, stop int64) (int64, error)
- func (this *ZSetOperation) ZRemRangeByScore(key, min, max string) (int64, error)
- func (this *ZSetOperation) ZRevRange(key string, start, stop int64) ([]string, error)
- func (this *ZSetOperation) ZRevRangeByLex(key string, opt redis.ZRangeBy) ([]string, error)
- func (this *ZSetOperation) ZRevRangeByScore(key string, opt redis.ZRangeBy) ([]string, error)
- func (this *ZSetOperation) ZRevRangeByScoreWithScores(key string, opt redis.ZRangeBy) ([]redis.Z, error)
- func (this *ZSetOperation) ZRevRangeWithScores(key string, start, stop int64) ([]redis.Z, error)
- func (this *ZSetOperation) ZRevRank(key, member string) (int64, error)
- func (this *ZSetOperation) ZScore(key, member string) (float64, error)
- func (this *ZSetOperation) ZUnionStore(dest string, store redis.ZStore, keys ...string) (int64, error)
Constants ¶
View Source
const ( RedisObjTag = "redis" RedisDomain = "redis.domain" )
View Source
const (
CasScript = "local l=1;\n local rawVal = redis.call('hget', KEYS[1], ARGV[1])\n" +
"if not rawVal then rawVal='' end\n" +
"if rawVal == ARGV[2] then\n" +
" redis.call('hset', KEYS[1], ARGV[1], ARGV[3])\n" +
" return true\n" +
"else\n" +
" return false\n" +
"end\n"
)
View Source
const (
CasValueScript = "local l=1;\n local rawVal = redis.call('get', KEYS[1])\n" +
"if not rawVal then rawVal='' end\n" +
"if rawVal == ARGV[1] then\n" +
" redis.call('set', KEYS[1], ARGV[2])\n" +
" return true\n" +
"else\n" +
" return false\n" +
"end\n"
)
Variables ¶
View Source
var IRedisDriverType = reflect.TypeOf((*IRedisDriver)(nil)).Elem()
Functions ¶
func NewRedisDriverCluster ¶
func NewRedisDriverCluster(domain string, appGroup string, keySep string, opt *redis.ClusterOptions) *redisDriver
func NewRedisTagProcessor ¶
func NewRedisTagProcessor(driver IRedisDriver) *redisTagProcessor
Types ¶
type AutoConfigReids ¶
type AutoConfigReids struct { // 启动条件 gioc.IBeanCondition gioc.IConfigBase IRedisDriver // contains filtered or unexported fields }
func NewAutoConfigReids ¶
func NewAutoConfigReids(cfgBase, domain string) *AutoConfigReids
func (*AutoConfigReids) PrepareProcess ¶
func (this *AutoConfigReids) PrepareProcess()
func (*AutoConfigReids) TagProcess ¶
func (this *AutoConfigReids) TagProcess(bean interface{}, fType reflect.StructField, fValue reflect.Value, tags map[string]string)
func (*AutoConfigReids) TagProcessorName ¶
func (this *AutoConfigReids) TagProcessorName() string
type BoundHashOperation ¶
type BoundHashOperation struct {
// contains filtered or unexported fields
}
func NewBoundHashOperation ¶
func NewBoundHashOperation(boundKey string, cmdable redis.Cmdable) *BoundHashOperation
func (*BoundHashOperation) Expire ¶
func (this *BoundHashOperation) Expire(duration time.Duration) (bool, error)
func (*BoundHashOperation) HDel ¶
func (this *BoundHashOperation) HDel(hashKeys ...string) (int64, error)
func (*BoundHashOperation) HExists ¶
func (this *BoundHashOperation) HExists(hashKey string) (bool, error)
func (*BoundHashOperation) HGet ¶
func (this *BoundHashOperation) HGet(hashKey string) (string, error)
func (*BoundHashOperation) HGetAll ¶
func (this *BoundHashOperation) HGetAll() (map[string]string, error)
func (*BoundHashOperation) HIncrBy ¶
func (this *BoundHashOperation) HIncrBy(hashKey string, delta int64) (int64, error)
func (*BoundHashOperation) HIncrByFloat ¶
func (this *BoundHashOperation) HIncrByFloat(hashKey string, delta float64) (float64, error)
func (*BoundHashOperation) HKeys ¶
func (this *BoundHashOperation) HKeys() ([]string, error)
func (*BoundHashOperation) HLen ¶
func (this *BoundHashOperation) HLen() (int64, error)
func (*BoundHashOperation) HMGet ¶
func (this *BoundHashOperation) HMGet(hashKeys ...string) ([]interface{}, error)
func (*BoundHashOperation) HMSet ¶
func (this *BoundHashOperation) HMSet(kv map[string]interface{}) (string, error)
type BoundListOperation ¶
type BoundListOperation struct {
// contains filtered or unexported fields
}
func NewBoundListOperation ¶
func NewBoundListOperation(boundKey string, cmdable redis.Cmdable) *BoundListOperation
func (*BoundListOperation) LIndex ¶
func (this *BoundListOperation) LIndex(index int64) (string, error)
func (*BoundListOperation) LInsert ¶
func (this *BoundListOperation) LInsert(op string, pivot, value string) (int64, error)
func (*BoundListOperation) LLen ¶
func (this *BoundListOperation) LLen() (int64, error)
func (*BoundListOperation) LPop ¶
func (this *BoundListOperation) LPop() (string, error)
func (*BoundListOperation) LPush ¶
func (this *BoundListOperation) LPush(value ...string) (int64, error)
func (*BoundListOperation) LPushX ¶
func (this *BoundListOperation) LPushX(value string) (int64, error)
func (*BoundListOperation) LRange ¶
func (this *BoundListOperation) LRange(start int64, end int64) ([]string, error)
func (*BoundListOperation) LRem ¶
func (this *BoundListOperation) LRem(count int64, value string) (int64, error)
func (*BoundListOperation) LSet ¶
func (this *BoundListOperation) LSet(index int64, value string) (string, error)
func (*BoundListOperation) LTrim ¶
func (this *BoundListOperation) LTrim(start int64, end int64) (string, error)
func (*BoundListOperation) RPop ¶
func (this *BoundListOperation) RPop() (string, error)
func (*BoundListOperation) RPush ¶
func (this *BoundListOperation) RPush(value ...interface{}) (int64, error)
type BoundSetOperation ¶
type BoundSetOperation struct {
// contains filtered or unexported fields
}
func NewBoundSetOperation ¶
func NewBoundSetOperation(boundKey string, cmdable redis.Cmdable) *BoundSetOperation
func (*BoundSetOperation) SAdd ¶
func (this *BoundSetOperation) SAdd(values ...string) (int64, error)
func (*BoundSetOperation) SCard ¶
func (this *BoundSetOperation) SCard() (int64, error)
func (*BoundSetOperation) SIsMember ¶
func (this *BoundSetOperation) SIsMember(o string) (bool, error)
func (*BoundSetOperation) SMembers ¶
func (this *BoundSetOperation) SMembers() ([]string, error)
func (*BoundSetOperation) SPop ¶
func (this *BoundSetOperation) SPop() (string, error)
func (*BoundSetOperation) SPopN ¶
func (this *BoundSetOperation) SPopN(count int64) ([]string, error)
func (*BoundSetOperation) SRandMember ¶
func (this *BoundSetOperation) SRandMember() (string, error)
func (*BoundSetOperation) SRandMemberN ¶
func (this *BoundSetOperation) SRandMemberN(count int64) ([]string, error)
type BoundValueOperation ¶
type BoundValueOperation struct {
// contains filtered or unexported fields
}
func NewBoundValueOperation ¶
func NewBoundValueOperation(boundKey string, cmdable redis.Cmdable) *BoundValueOperation
func (*BoundValueOperation) Append ¶
func (this *BoundValueOperation) Append(value string) (int64, error)
func (*BoundValueOperation) Cas ¶
func (this *BoundValueOperation) Cas(old string, new string) (bool, error)
func (*BoundValueOperation) Decr ¶
func (this *BoundValueOperation) Decr() (int64, error)
func (*BoundValueOperation) DecrBy ¶
func (this *BoundValueOperation) DecrBy(delta int64) (int64, error)
func (*BoundValueOperation) Get ¶
func (this *BoundValueOperation) Get() (string, error)
func (*BoundValueOperation) GetBit ¶
func (this *BoundValueOperation) GetBit(offset int64) (int64, error)
func (*BoundValueOperation) GetRange ¶
func (this *BoundValueOperation) GetRange(start int64, end int64) (string, error)
func (*BoundValueOperation) GetSet ¶
func (this *BoundValueOperation) GetSet(value string) (string, error)
func (*BoundValueOperation) Incr ¶
func (this *BoundValueOperation) Incr() (int64, error)
func (*BoundValueOperation) IncrBy ¶
func (this *BoundValueOperation) IncrBy(delta int64) (int64, error)
func (*BoundValueOperation) IncrByFloat ¶
func (this *BoundValueOperation) IncrByFloat(delta float64) (float64, error)
func (*BoundValueOperation) Set ¶
func (this *BoundValueOperation) Set(value string) (string, error)
func (*BoundValueOperation) SetBit ¶
func (this *BoundValueOperation) SetBit(offset int64, value int) (int64, error)
func (*BoundValueOperation) SetNX ¶
func (this *BoundValueOperation) SetNX(value string) (bool, error)
func (*BoundValueOperation) SetNXTimeout ¶
func (*BoundValueOperation) SetRange ¶
func (this *BoundValueOperation) SetRange(value string, offset int64) (int64, error)
func (*BoundValueOperation) SetTimeout ¶
func (*BoundValueOperation) StrLen ¶
func (this *BoundValueOperation) StrLen() (int64, error)
type BoundZSetOperation ¶
type BoundZSetOperation struct {
// contains filtered or unexported fields
}
func NewBoundZSetOperation ¶
func NewBoundZSetOperation(boundKey string, cmdable redis.Cmdable) *BoundZSetOperation
func (*BoundZSetOperation) ZAdd ¶
func (this *BoundZSetOperation) ZAdd(members ...redis.Z) (int64, error)
func (*BoundZSetOperation) ZAddCh ¶
func (this *BoundZSetOperation) ZAddCh(members ...redis.Z) (int64, error)
func (*BoundZSetOperation) ZAddNX ¶
func (this *BoundZSetOperation) ZAddNX(members ...redis.Z) (int64, error)
func (*BoundZSetOperation) ZAddNXCh ¶
func (this *BoundZSetOperation) ZAddNXCh(members ...redis.Z) (int64, error)
func (*BoundZSetOperation) ZAddXX ¶
func (this *BoundZSetOperation) ZAddXX(members ...redis.Z) (int64, error)
func (*BoundZSetOperation) ZAddXXCh ¶
func (this *BoundZSetOperation) ZAddXXCh(members ...redis.Z) (int64, error)
func (*BoundZSetOperation) ZCard ¶
func (this *BoundZSetOperation) ZCard() (int64, error)
func (*BoundZSetOperation) ZCount ¶
func (this *BoundZSetOperation) ZCount(min, max string) (int64, error)
func (*BoundZSetOperation) ZIncr ¶
func (this *BoundZSetOperation) ZIncr(member redis.Z) (float64, error)
func (*BoundZSetOperation) ZIncrBy ¶
func (this *BoundZSetOperation) ZIncrBy(increment float64, member string) (float64, error)
func (*BoundZSetOperation) ZIncrNX ¶
func (this *BoundZSetOperation) ZIncrNX(member redis.Z) (float64, error)
func (*BoundZSetOperation) ZIncrXX ¶
func (this *BoundZSetOperation) ZIncrXX(member redis.Z) (float64, error)
func (*BoundZSetOperation) ZLexCount ¶
func (this *BoundZSetOperation) ZLexCount(min, max string) (int64, error)
func (*BoundZSetOperation) ZPopMax ¶
func (this *BoundZSetOperation) ZPopMax(count ...int64) ([]redis.Z, error)
func (*BoundZSetOperation) ZPopMin ¶
func (this *BoundZSetOperation) ZPopMin(count ...int64) ([]redis.Z, error)
func (*BoundZSetOperation) ZRange ¶
func (this *BoundZSetOperation) ZRange(start, stop int64) ([]string, error)
func (*BoundZSetOperation) ZRangeByLex ¶
func (this *BoundZSetOperation) ZRangeByLex(opt redis.ZRangeBy) ([]string, error)
func (*BoundZSetOperation) ZRangeByScore ¶
func (this *BoundZSetOperation) ZRangeByScore(opt redis.ZRangeBy) ([]string, error)
func (*BoundZSetOperation) ZRangeByScoreWithScores ¶
func (*BoundZSetOperation) ZRangeWithScores ¶
func (this *BoundZSetOperation) ZRangeWithScores(start, stop int64) ([]redis.Z, error)
func (*BoundZSetOperation) ZRank ¶
func (this *BoundZSetOperation) ZRank(member string) (int64, error)
func (*BoundZSetOperation) ZRem ¶
func (this *BoundZSetOperation) ZRem(members ...interface{}) (int64, error)
func (*BoundZSetOperation) ZRemRangeByLex ¶
func (this *BoundZSetOperation) ZRemRangeByLex(min, max string) (int64, error)
func (*BoundZSetOperation) ZRemRangeByRank ¶
func (this *BoundZSetOperation) ZRemRangeByRank(start, stop int64) (int64, error)
func (*BoundZSetOperation) ZRemRangeByScore ¶
func (this *BoundZSetOperation) ZRemRangeByScore(min, max string) (int64, error)
func (*BoundZSetOperation) ZRevRange ¶
func (this *BoundZSetOperation) ZRevRange(start, stop int64) ([]string, error)
func (*BoundZSetOperation) ZRevRangeByLex ¶
func (this *BoundZSetOperation) ZRevRangeByLex(opt redis.ZRangeBy) ([]string, error)
func (*BoundZSetOperation) ZRevRangeByScore ¶
func (this *BoundZSetOperation) ZRevRangeByScore(opt redis.ZRangeBy) ([]string, error)
func (*BoundZSetOperation) ZRevRangeByScoreWithScores ¶
func (*BoundZSetOperation) ZRevRangeWithScores ¶
func (this *BoundZSetOperation) ZRevRangeWithScores(start, stop int64) ([]redis.Z, error)
type HashOperation ¶
type HashOperation struct {
// contains filtered or unexported fields
}
func NewHashOperation ¶
func NewHashOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *HashOperation
func (*HashOperation) HDel ¶
func (this *HashOperation) HDel(key string, hashKeys ...string) (int64, error)
func (*HashOperation) HExists ¶
func (this *HashOperation) HExists(key string, hashKey string) (bool, error)
func (*HashOperation) HGet ¶
func (this *HashOperation) HGet(key string, hashKey string) (string, error)
func (*HashOperation) HGetAll ¶
func (this *HashOperation) HGetAll(key string) (map[string]string, error)
func (*HashOperation) HIncrByFloat ¶
func (*HashOperation) HMGet ¶
func (this *HashOperation) HMGet(key string, hashKeys ...string) ([]interface{}, error)
func (*HashOperation) HMSet ¶
func (this *HashOperation) HMSet(key string, kv map[string]interface{}) (string, error)
type IRedisDriver ¶
type IRedisDriver interface { Domain() string RedisDB() GetHashOperation() *HashOperation GetBoundHashOperation(key string) *BoundHashOperation GetListOperation() *ListOperation GetBoundListOperation(key string) *BoundListOperation GetValueOperation() *ValueOperation GetBoundValueOperation(key string) *BoundValueOperation GetSetOperation() *SetOperation GetBoundSetOperation(key string) *BoundSetOperation GetZSetOperation() *ZSetOperation GetBoundZSetOperation(key string) *BoundZSetOperation GetPriority() int GetMessageQueue(group, id string) gproto.IMessageQueue GetAttributeGroup(group, id string) gdb.IDBAttributeGroup }
type ListOperation ¶
type ListOperation struct {
// contains filtered or unexported fields
}
func NewListOperation ¶
func NewListOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *ListOperation
func (*ListOperation) BRPopLPush ¶
func (*ListOperation) LIndex ¶
func (this *ListOperation) LIndex(key string, index int64) (string, error)
func (*ListOperation) LInsert ¶
func (this *ListOperation) LInsert(key, op string, pivot, value string) (int64, error)
func (*ListOperation) LPush ¶
func (this *ListOperation) LPush(key string, value ...string) (int64, error)
func (*ListOperation) LPushX ¶
func (this *ListOperation) LPushX(key string, value string) (int64, error)
type RedisAttributeGroup ¶
type RedisAttributeGroup struct {
// contains filtered or unexported fields
}
func NewRedisAttributeGroup ¶
func NewRedisAttributeGroup(opt *BoundHashOperation) *RedisAttributeGroup
func (*RedisAttributeGroup) CasSetAttribute ¶
func (this *RedisAttributeGroup) CasSetAttribute(key string, oldValue string, newValue string) bool
func (*RedisAttributeGroup) GetAttribute ¶
func (this *RedisAttributeGroup) GetAttribute(key string) (string, error)
func (*RedisAttributeGroup) SetAttribute ¶
func (this *RedisAttributeGroup) SetAttribute(key string, value string) error
func (*RedisAttributeGroup) SetAttributes ¶
func (this *RedisAttributeGroup) SetAttributes(values map[string]interface{}) error
func (*RedisAttributeGroup) SetExpireDuration ¶
func (this *RedisAttributeGroup) SetExpireDuration(duration time.Duration) error
type RedisMQBundle ¶
type RedisMQBundle struct {
// contains filtered or unexported fields
}
func NewRedisMQBundle ¶
func NewRedisMQBundle(queue string, encoder gproto.IEncoder, decoder gproto.IDecoder, listOpt *ListOperation) *RedisMQBundle
func (*RedisMQBundle) Pop ¶
func (this *RedisMQBundle) Pop(id interface{}, num int) []interface{}
func (*RedisMQBundle) Push ¶
func (this *RedisMQBundle) Push(id interface{}, msg interface{}) bool
type RedisMessageQueue ¶
type RedisMessageQueue struct {
// contains filtered or unexported fields
}
func NewRedisMessageQueue ¶
func NewRedisMessageQueue(queue string, listOpt *ListOperation) *RedisMessageQueue
func (*RedisMessageQueue) Name ¶
func (this *RedisMessageQueue) Name() string
func (*RedisMessageQueue) Pop ¶
func (this *RedisMessageQueue) Pop(num int) []string
func (*RedisMessageQueue) Push ¶
func (this *RedisMessageQueue) Push(msg string) bool
func (*RedisMessageQueue) SetExpireDuration ¶
func (this *RedisMessageQueue) SetExpireDuration(duration time.Duration) error
type SetOperation ¶
type SetOperation struct {
// contains filtered or unexported fields
}
func NewSetOperation ¶
func NewSetOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *SetOperation
func (*SetOperation) SAdd ¶
func (this *SetOperation) SAdd(key string, values ...string) (int64, error)
func (*SetOperation) SDiffStore ¶
func (this *SetOperation) SDiffStore(destination string, keys ...string) (int64, error)
func (*SetOperation) SInterStore ¶
func (this *SetOperation) SInterStore(destination string, keys ...string) (int64, error)
func (*SetOperation) SIsMember ¶
func (this *SetOperation) SIsMember(key string, o string) (bool, error)
func (*SetOperation) SPopN ¶
func (this *SetOperation) SPopN(key string, count int64) ([]string, error)
func (*SetOperation) SRandMember ¶
func (this *SetOperation) SRandMember(key string) (string, error)
func (*SetOperation) SRandMemberN ¶
func (this *SetOperation) SRandMemberN(key string, count int64) ([]string, error)
func (*SetOperation) SRem ¶
func (this *SetOperation) SRem(key string, values ...string) (int64, error)
func (*SetOperation) SUnionStore ¶
func (this *SetOperation) SUnionStore(destination string, keys ...string) (int64, error)
type ValueOperation ¶
type ValueOperation struct {
// contains filtered or unexported fields
}
func NewValueOperation ¶
func NewValueOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *ValueOperation
func (*ValueOperation) Append ¶
func (this *ValueOperation) Append(key string, value string) (int64, error)
func (*ValueOperation) DecrBy ¶
func (this *ValueOperation) DecrBy(key string, delta int64) (int64, error)
func (*ValueOperation) GetBit ¶
func (this *ValueOperation) GetBit(key string, offset int64) (int64, error)
func (*ValueOperation) GetSet ¶
func (this *ValueOperation) GetSet(key string, value string) (string, error)
func (*ValueOperation) IncrBy ¶
func (this *ValueOperation) IncrBy(key string, delta int64) (int64, error)
func (*ValueOperation) IncrByFloat ¶
func (this *ValueOperation) IncrByFloat(key string, delta float64) (float64, error)
func (*ValueOperation) MSet ¶
func (this *ValueOperation) MSet(kvalues map[string]string) (string, error)
func (*ValueOperation) MSetNX ¶
func (this *ValueOperation) MSetNX(kvalues map[string]string) (bool, error)
func (*ValueOperation) Set ¶
func (this *ValueOperation) Set(key string, value string) (string, error)
func (*ValueOperation) SetNX ¶
func (this *ValueOperation) SetNX(key string, value string) (bool, error)
func (*ValueOperation) SetNXTimeout ¶
func (*ValueOperation) SetTimeout ¶
type WrapKeyFunc ¶
type ZSetOperation ¶
type ZSetOperation struct {
// contains filtered or unexported fields
}
func NewZSetOperation ¶
func NewZSetOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *ZSetOperation
func (*ZSetOperation) ZCount ¶
func (this *ZSetOperation) ZCount(key, min, max string) (int64, error)
func (*ZSetOperation) ZInterStore ¶
func (*ZSetOperation) ZLexCount ¶
func (this *ZSetOperation) ZLexCount(key, min, max string) (int64, error)
func (*ZSetOperation) ZRange ¶
func (this *ZSetOperation) ZRange(key string, start, stop int64) ([]string, error)
func (*ZSetOperation) ZRangeByLex ¶
func (*ZSetOperation) ZRangeByScore ¶
func (*ZSetOperation) ZRangeByScoreWithScores ¶
func (*ZSetOperation) ZRangeWithScores ¶
func (*ZSetOperation) ZRem ¶
func (this *ZSetOperation) ZRem(key string, members ...interface{}) (int64, error)
func (*ZSetOperation) ZRemRangeByLex ¶
func (this *ZSetOperation) ZRemRangeByLex(key, min, max string) (int64, error)
func (*ZSetOperation) ZRemRangeByRank ¶
func (this *ZSetOperation) ZRemRangeByRank(key string, start, stop int64) (int64, error)
func (*ZSetOperation) ZRemRangeByScore ¶
func (this *ZSetOperation) ZRemRangeByScore(key, min, max string) (int64, error)
func (*ZSetOperation) ZRevRange ¶
func (this *ZSetOperation) ZRevRange(key string, start, stop int64) ([]string, error)
func (*ZSetOperation) ZRevRangeByLex ¶
func (*ZSetOperation) ZRevRangeByScore ¶
func (*ZSetOperation) ZRevRangeByScoreWithScores ¶
func (*ZSetOperation) ZRevRangeWithScores ¶
func (*ZSetOperation) ZRevRank ¶
func (this *ZSetOperation) ZRevRank(key, member string) (int64, error)
func (*ZSetOperation) ZScore ¶
func (this *ZSetOperation) ZScore(key, member string) (float64, error)
func (*ZSetOperation) ZUnionStore ¶
Click to show internal directories.
Click to hide internal directories.