Documentation ¶
Index ¶
- Constants
- Variables
- type ClosableNode
- type FloatCmd
- type IntCmd
- type Map
- type Pair
- type Pipeliner
- type Redis
- func (s *Redis) Blpop(redisNode RedisNode, key string) (string, error)
- func (s *Redis) BlpopEx(redisNode RedisNode, key string) (string, bool, error)
- func (s *Redis) Del(keys ...string) (val int, err error)
- func (s *Redis) Eval(script string, keys []string, args ...interface{}) (val interface{}, err error)
- func (s *Redis) Exists(key string) (val bool, err error)
- func (s *Redis) Expire(key string, seconds int) error
- func (s *Redis) Expireat(key string, expireTime int64) error
- func (s *Redis) Get(key string) (val string, err error)
- func (s *Redis) GetBit(key string, offset int64) (val int, err error)
- func (s *Redis) Hdel(key, field string) (val bool, err error)
- func (s *Redis) Hexists(key, field string) (val bool, err error)
- func (s *Redis) Hget(key, field string) (val string, err error)
- func (s *Redis) Hgetall(key string) (val map[string]string, err error)
- func (s *Redis) Hincrby(key, field string, increment int) (val int, err error)
- func (s *Redis) Hkeys(key string) (val []string, err error)
- func (s *Redis) Hlen(key string) (val int, err error)
- func (s *Redis) Hmget(key string, fields ...string) (val []string, err error)
- func (s *Redis) Hmset(key string, fieldsAndValues map[string]string) error
- func (s *Redis) Hset(key, field, value string) error
- func (s *Redis) Hsetnx(key, field, value string) (val bool, err error)
- func (s *Redis) Hvals(key string) (val []string, err error)
- func (s *Redis) Incr(key string) (val int64, err error)
- func (s *Redis) Incrby(key string, increment int64) (val int64, err error)
- func (s *Redis) Keys(pattern string) (val []string, err error)
- func (s *Redis) Llen(key string) (val int, err error)
- func (s *Redis) Lpop(key string) (val string, err error)
- func (s *Redis) Lpush(key string, values ...interface{}) (val int, err error)
- func (s *Redis) Lrange(key string, start int, stop int) (val []string, err error)
- func (s *Redis) Lrem(key string, count int, value string) (val int, err error)
- func (s *Redis) Mget(keys ...string) (val []string, err error)
- func (s *Redis) Persist(key string) (val bool, err error)
- func (s *Redis) Pfadd(key string, values ...interface{}) (val bool, err error)
- func (s *Redis) Pfcount(key string) (val int64, err error)
- func (s *Redis) Pfmerge(dest string, keys ...string) error
- func (s *Redis) Ping() (val bool)
- func (s *Redis) Pipelined(fn func(Pipeliner) error) (err error)
- func (s *Redis) Rpush(key string, values ...interface{}) (val int, err error)
- func (s *Redis) Sadd(key string, values ...interface{}) (val int, err error)
- func (s *Redis) Scan(cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
- func (s *Redis) Scard(key string) (val int64, err error)
- func (s *Redis) Sdiff(keys ...string) (val []string, err error)
- func (s *Redis) Sdiffstore(destination string, keys ...string) (val int, err error)
- func (s *Redis) Set(key string, value string) error
- func (s *Redis) SetBit(key string, offset int64, value int) error
- func (s *Redis) Setex(key, value string, seconds int) error
- func (s *Redis) Setnx(key, value string) (val bool, err error)
- func (s *Redis) SetnxEx(key, value string, seconds int) (val bool, err error)
- func (s *Redis) Sismember(key string, value interface{}) (val bool, err error)
- func (s *Redis) Smembers(key string) (val []string, err error)
- func (s *Redis) Spop(key string) (val string, err error)
- func (s *Redis) Srandmember(key string, count int) (val []string, err error)
- func (s *Redis) Srem(key string, values ...interface{}) (val int, err error)
- func (s *Redis) Sscan(key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
- func (s *Redis) String() string
- func (s *Redis) Sunion(keys ...string) (val []string, err error)
- func (s *Redis) Sunionstore(destination string, keys ...string) (val int, err error)
- func (s *Redis) Ttl(key string) (val int, err error)
- func (s *Redis) ZRevRangeWithScores(key string, start, stop int64) (val []Pair, err error)
- func (s *Redis) Zadd(key string, score int64, value string) (val bool, err error)
- func (s *Redis) Zadds(key string, ps ...Pair) (val int64, err error)
- func (s *Redis) Zcard(key string) (val int, err error)
- func (s *Redis) Zcount(key string, start, stop int64) (val int, err error)
- func (s *Redis) Zincrby(key string, increment int64, field string) (val int64, err error)
- func (s *Redis) Zrange(key string, start, stop int64) (val []string, err error)
- func (s *Redis) ZrangeWithScores(key string, start, stop int64) (val []Pair, err error)
- func (s *Redis) ZrangebyscoreWithScores(key string, start, stop int64) (val []Pair, err error)
- func (s *Redis) ZrangebyscoreWithScoresAndLimit(key string, start, stop int64, page, size int) (val []Pair, err error)
- func (s *Redis) Zrank(key, field string) (val int64, err error)
- func (s *Redis) Zrem(key string, values ...interface{}) (val int, err error)
- func (s *Redis) Zremrangebyrank(key string, start, stop int64) (val int, err error)
- func (s *Redis) Zremrangebyscore(key string, start, stop int64) (val int, err error)
- func (s *Redis) Zrevrange(key string, start, stop int64) (val []string, err error)
- func (s *Redis) ZrevrangebyscoreWithScores(key string, start, stop int64) (val []Pair, err error)
- func (s *Redis) ZrevrangebyscoreWithScoresAndLimit(key string, start, stop int64, page, size int) (val []Pair, err error)
- func (s *Redis) Zscore(key string, value string) (val int64, err error)
- type RedisConf
- type RedisKeyConf
- type RedisLock
- type RedisNode
- type ScriptCache
- type Z
Constants ¶
View Source
const ( ClusterType = "cluster" NodeType = "node" Nil = red.Nil )
Variables ¶
View Source
var ( ErrEmptyHost = errors.New("empty redis host") ErrEmptyType = errors.New("empty redis type") ErrEmptyKey = errors.New("empty redis key") )
View Source
var ErrNilNode = errors.New("nil redis node")
Functions ¶
This section is empty.
Types ¶
type ClosableNode ¶
type ClosableNode interface { RedisNode Close() }
func CreateBlockingNode ¶
func CreateBlockingNode(r *Redis) (ClosableNode, error)
type Redis ¶
thread-safe
func (*Redis) Blpop ¶
Use passed in redis connection to execute blocking queries Doesn't benefit from pooling redis connections of blocking queries
func (*Redis) Sdiffstore ¶
func (*Redis) Srandmember ¶
func (*Redis) Sunionstore ¶
func (*Redis) ZRevRangeWithScores ¶
func (*Redis) ZrangeWithScores ¶
func (*Redis) ZrangebyscoreWithScores ¶
func (*Redis) ZrangebyscoreWithScoresAndLimit ¶
func (*Redis) Zremrangebyrank ¶
func (*Redis) Zremrangebyscore ¶
func (*Redis) ZrevrangebyscoreWithScores ¶
func (*Redis) ZrevrangebyscoreWithScoresAndLimit ¶
type RedisConf ¶
type RedisKeyConf ¶
func (RedisKeyConf) Validate ¶
func (rkc RedisKeyConf) Validate() error
type RedisLock ¶
type RedisLock struct {
// contains filtered or unexported fields
}
func NewRedisLock ¶
type ScriptCache ¶
func GetScriptCache ¶
func GetScriptCache() *ScriptCache
func (*ScriptCache) SetSha ¶
func (sc *ScriptCache) SetSha(script, sha string)
Click to show internal directories.
Click to hide internal directories.