Documentation ¶
Index ¶
- Constants
- func NewRedisClient(opt *redis.Options) *redis.Client
- func ReleaseJobMux(r *RedisClient, key string)
- func SetJobMux(r *RedisClient, key, val string, expireTime time.Duration) bool
- func SetJobMuxWithSpins(r *RedisClient, key, val string, expireTime, spinTime time.Duration, ...) bool
- type RedisClient
- func (c RedisClient) Del(keys ...string) (cmd *redis.IntCmd)
- func (c RedisClient) Expire(key string, expiration time.Duration) (cmd *redis.BoolCmd)
- func (c RedisClient) ExpireAt(key string, tm time.Time) (cmd *redis.BoolCmd)
- func (c RedisClient) Get(key string) (cmd *redis.StringCmd)
- func (c RedisClient) GetPoolConnections() uint32
- func (c RedisClient) HDel(key string, fields ...string) (cmd *redis.IntCmd)
- func (c RedisClient) HExists(key, field string) (cmd *redis.BoolCmd)
- func (c RedisClient) HGet(key, field string) (cmd *redis.StringCmd)
- func (c RedisClient) HGetAll(key string) (cmd *redis.StringStringMapCmd)
- func (c RedisClient) HIncrBy(key, field string, incr int64) (cmd *redis.IntCmd)
- func (c RedisClient) HMGet(key string, fields ...string) (cmd *redis.SliceCmd)
- func (c RedisClient) HMSet(key string, fields map[string]interface{}) (cmd *redis.StatusCmd)
- func (c RedisClient) HScan(key string, cursor uint64, match string, count int64) (cmd *redis.ScanCmd)
- func (c RedisClient) HSet(key, field string, value interface{}) (cmd *redis.BoolCmd)
- func (c RedisClient) HSetNX(key, field string, value interface{}) (cmd *redis.BoolCmd)
- func (c RedisClient) Incr(key string) (cmd *redis.IntCmd)
- func (c RedisClient) Keys(pattern string) (cmd *redis.StringSliceCmd)
- func (c RedisClient) LIndex(key string, index int64) (cmd *redis.StringCmd)
- func (c RedisClient) LLen(key string) (cmd *redis.IntCmd)
- func (c RedisClient) LPop(key string) (cmd *redis.StringCmd)
- func (c RedisClient) LPush(key string, values ...interface{}) (cmd *redis.IntCmd)
- func (c RedisClient) LRem(key string, count int64, value interface{}) (cmd *redis.IntCmd)
- func (c RedisClient) Pipeline() RedisPipeliner
- func (c RedisClient) Publish(channel string, message interface{}) (cmd *redis.IntCmd)
- func (c RedisClient) RPop(key string) (cmd *redis.StringCmd)
- func (c RedisClient) RPush(key string, values ...interface{}) (cmd *redis.IntCmd)
- func (c RedisClient) Rename(key, newkey string) (cmd *redis.StatusCmd)
- func (c RedisClient) SAdd(key string, members ...interface{}) (cmd *redis.IntCmd)
- func (c RedisClient) SCard(key string) (cmd *redis.IntCmd)
- func (c RedisClient) SIsMember(key string, member interface{}) (cmd *redis.BoolCmd)
- func (c RedisClient) SMembers(key string) (cmd *redis.StringSliceCmd)
- func (c RedisClient) SRem(key string, members ...interface{}) (cmd *redis.IntCmd)
- func (c RedisClient) Scan(cursor uint64, match string, count int64) (cmd *redis.ScanCmd)
- func (c RedisClient) Set(key string, value interface{}, expiration time.Duration) (cmd *redis.StatusCmd)
- func (c RedisClient) SetNX(key string, value interface{}, expiration time.Duration) (cmd *redis.BoolCmd)
- func (c RedisClient) Subscribe(channels ...string) (cmd *redis.PubSub)
- func (c RedisClient) Unlink(key ...string) (cmd *redis.IntCmd)
- func (c RedisClient) ZAdd(key string, members ...redis.Z) (cmd *redis.IntCmd)
- func (c RedisClient) ZAddNX(key string, members ...redis.Z) (cmd *redis.IntCmd)
- func (c RedisClient) ZAddXX(key string, members ...redis.Z) (cmd *redis.IntCmd)
- func (c RedisClient) ZCard(key string) (cmd *redis.IntCmd)
- func (c RedisClient) ZCount(key, min, max string) (cmd *redis.IntCmd)
- func (c RedisClient) ZIncr(key string, member redis.Z) (cmd *redis.FloatCmd)
- func (c RedisClient) ZIncrBy(key string, increment float64, member string) (cmd *redis.FloatCmd)
- func (c RedisClient) ZRangeWithScoresX(key string, start, stop int64, rev bool) (cmd *redis.ZSliceCmd)
- func (c RedisClient) ZRangeX(key string, start, stop int64, rev bool) (cmd *redis.StringSliceCmd)
- func (c RedisClient) ZRankX(key, member string, rev bool) (cmd *redis.IntCmd)
- func (c RedisClient) ZRem(key string, members ...interface{}) (cmd *redis.IntCmd)
- func (c RedisClient) ZRemRangeByRank(key string, start, stop int64) (cmd *redis.IntCmd)
- func (c RedisClient) ZScore(key, member string) (cmd *redis.FloatCmd)
- type RedisPipeliner
Constants ¶
View Source
const ( SPIN_TIME = 10 SPIN_NUM = 10 )
Variables ¶
This section is empty.
Functions ¶
func ReleaseJobMux ¶
func ReleaseJobMux(r *RedisClient, key string)
func SetJobMuxWithSpins ¶
Types ¶
type RedisClient ¶
func NewClientWithProm ¶
func NewClientWithProm(opt *redis.Options, clientName string) *RedisClient
func (RedisClient) GetPoolConnections ¶
func (c RedisClient) GetPoolConnections() uint32
func (RedisClient) HDel ¶
func (c RedisClient) HDel(key string, fields ...string) (cmd *redis.IntCmd)
func (RedisClient) HGetAll ¶
func (c RedisClient) HGetAll(key string) (cmd *redis.StringStringMapCmd)
func (RedisClient) HIncrBy ¶
func (c RedisClient) HIncrBy(key, field string, incr int64) (cmd *redis.IntCmd)
func (RedisClient) HMGet ¶
func (c RedisClient) HMGet(key string, fields ...string) (cmd *redis.SliceCmd)
func (RedisClient) HMSet ¶
func (c RedisClient) HMSet(key string, fields map[string]interface{}) (cmd *redis.StatusCmd)
func (RedisClient) HSet ¶
func (c RedisClient) HSet(key, field string, value interface{}) (cmd *redis.BoolCmd)
func (RedisClient) HSetNX ¶
func (c RedisClient) HSetNX(key, field string, value interface{}) (cmd *redis.BoolCmd)
func (RedisClient) Keys ¶
func (c RedisClient) Keys(pattern string) (cmd *redis.StringSliceCmd)
func (RedisClient) LIndex ¶
func (c RedisClient) LIndex(key string, index int64) (cmd *redis.StringCmd)
func (RedisClient) LPush ¶
func (c RedisClient) LPush(key string, values ...interface{}) (cmd *redis.IntCmd)
func (RedisClient) LRem ¶
func (c RedisClient) LRem(key string, count int64, value interface{}) (cmd *redis.IntCmd)
func (RedisClient) Pipeline ¶
func (c RedisClient) Pipeline() RedisPipeliner
func (RedisClient) Publish ¶
func (c RedisClient) Publish(channel string, message interface{}) (cmd *redis.IntCmd)
func (RedisClient) RPush ¶
func (c RedisClient) RPush(key string, values ...interface{}) (cmd *redis.IntCmd)
func (RedisClient) SAdd ¶
func (c RedisClient) SAdd(key string, members ...interface{}) (cmd *redis.IntCmd)
func (RedisClient) SIsMember ¶
func (c RedisClient) SIsMember(key string, member interface{}) (cmd *redis.BoolCmd)
func (RedisClient) SMembers ¶
func (c RedisClient) SMembers(key string) (cmd *redis.StringSliceCmd)
func (RedisClient) SRem ¶
func (c RedisClient) SRem(key string, members ...interface{}) (cmd *redis.IntCmd)
func (RedisClient) Subscribe ¶
func (c RedisClient) Subscribe(channels ...string) (cmd *redis.PubSub)
func (RedisClient) ZRangeWithScoresX ¶
func (c RedisClient) ZRangeWithScoresX(key string, start, stop int64, rev bool) (cmd *redis.ZSliceCmd)
ZRangeWithScoresX 返回正序 or 倒序的名次范围的zSet
func (RedisClient) ZRangeX ¶
func (c RedisClient) ZRangeX(key string, start, stop int64, rev bool) (cmd *redis.StringSliceCmd)
ZRangeX 返回正序 or 倒序的名次范围的zSet.Member
func (RedisClient) ZRankX ¶
func (c RedisClient) ZRankX(key, member string, rev bool) (cmd *redis.IntCmd)
ZRankX 返回正序 or 倒序
func (RedisClient) ZRem ¶
func (c RedisClient) ZRem(key string, members ...interface{}) (cmd *redis.IntCmd)
func (RedisClient) ZRemRangeByRank ¶
func (c RedisClient) ZRemRangeByRank(key string, start, stop int64) (cmd *redis.IntCmd)
ZRemRangeByRank 根据倒序排名移出
type RedisPipeliner ¶
Click to show internal directories.
Click to hide internal directories.