Versions in this module Expand all Collapse all v0 v0.0.1 May 17, 2022 Changes in this version + var ErrNoRedisNode = errors.New("no redis node") + type KvConf = cache.ClusterConf + type Store interface + Decr func(key string) (int64, error) + DecrCtx func(ctx context.Context, key string) (int64, error) + Decrby func(key string, decrement int64) (int64, error) + DecrbyCtx func(ctx context.Context, key string, decrement int64) (int64, error) + Del func(keys ...string) (int, error) + DelCtx func(ctx context.Context, keys ...string) (int, error) + Eval func(script, key string, args ...interface{}) (interface{}, error) + EvalCtx func(ctx context.Context, script, key string, args ...interface{}) (interface{}, error) + Exists func(key string) (bool, error) + ExistsCtx func(ctx context.Context, key string) (bool, error) + Expire func(key string, seconds int) error + ExpireCtx func(ctx context.Context, key string, seconds int) error + Expireat func(key string, expireTime int64) error + ExpireatCtx func(ctx context.Context, key string, expireTime int64) error + Get func(key string) (string, error) + GetCtx func(ctx context.Context, key string) (string, error) + GetSet func(key, value string) (string, error) + GetSetCtx func(ctx context.Context, key, value string) (string, error) + Hdel func(key, field string) (bool, error) + HdelCtx func(ctx context.Context, key, field string) (bool, error) + Hexists func(key, field string) (bool, error) + HexistsCtx func(ctx context.Context, key, field string) (bool, error) + Hget func(key, field string) (string, error) + HgetCtx func(ctx context.Context, key, field string) (string, error) + Hgetall func(key string) (map[string]string, error) + HgetallCtx func(ctx context.Context, key string) (map[string]string, error) + Hincrby func(key, field string, increment int) (int, error) + HincrbyCtx func(ctx context.Context, key, field string, increment int) (int, error) + Hkeys func(key string) ([]string, error) + HkeysCtx func(ctx context.Context, key string) ([]string, error) + Hlen func(key string) (int, error) + HlenCtx func(ctx context.Context, key string) (int, error) + Hmget func(key string, fields ...string) ([]string, error) + HmgetCtx func(ctx context.Context, key string, fields ...string) ([]string, error) + Hmset func(key string, fieldsAndValues map[string]string) error + HmsetCtx func(ctx context.Context, key string, fieldsAndValues map[string]string) error + Hset func(key, field, value string) error + HsetCtx func(ctx context.Context, key, field, value string) error + Hsetnx func(key, field, value string) (bool, error) + HsetnxCtx func(ctx context.Context, key, field, value string) (bool, error) + Hvals func(key string) ([]string, error) + HvalsCtx func(ctx context.Context, key string) ([]string, error) + Incr func(key string) (int64, error) + IncrCtx func(ctx context.Context, key string) (int64, error) + Incrby func(key string, increment int64) (int64, error) + IncrbyCtx func(ctx context.Context, key string, increment int64) (int64, error) + Lindex func(key string, index int64) (string, error) + LindexCtx func(ctx context.Context, key string, index int64) (string, error) + Llen func(key string) (int, error) + LlenCtx func(ctx context.Context, key string) (int, error) + Lpop func(key string) (string, error) + LpopCtx func(ctx context.Context, key string) (string, error) + Lpush func(key string, values ...interface{}) (int, error) + LpushCtx func(ctx context.Context, key string, values ...interface{}) (int, error) + Lrange func(key string, start, stop int) ([]string, error) + LrangeCtx func(ctx context.Context, key string, start, stop int) ([]string, error) + Lrem func(key string, count int, value string) (int, error) + LremCtx func(ctx context.Context, key string, count int, value string) (int, error) + Persist func(key string) (bool, error) + PersistCtx func(ctx context.Context, key string) (bool, error) + Pfadd func(key string, values ...interface{}) (bool, error) + PfaddCtx func(ctx context.Context, key string, values ...interface{}) (bool, error) + Pfcount func(key string) (int64, error) + PfcountCtx func(ctx context.Context, key string) (int64, error) + Rpush func(key string, values ...interface{}) (int, error) + RpushCtx func(ctx context.Context, key string, values ...interface{}) (int, error) + Sadd func(key string, values ...interface{}) (int, error) + SaddCtx func(ctx context.Context, key string, values ...interface{}) (int, error) + Scard func(key string) (int64, error) + ScardCtx func(ctx context.Context, key string) (int64, error) + Set func(key, value string) error + SetCtx func(ctx context.Context, key, value string) error + Setex func(key, value string, seconds int) error + SetexCtx func(ctx context.Context, key, value string, seconds int) error + Setnx func(key, value string) (bool, error) + SetnxCtx func(ctx context.Context, key, value string) (bool, error) + SetnxEx func(key, value string, seconds int) (bool, error) + SetnxExCtx func(ctx context.Context, key, value string, seconds int) (bool, error) + Sismember func(key string, value interface{}) (bool, error) + SismemberCtx func(ctx context.Context, key string, value interface{}) (bool, error) + Smembers func(key string) ([]string, error) + SmembersCtx func(ctx context.Context, key string) ([]string, error) + Spop func(key string) (string, error) + SpopCtx func(ctx context.Context, key string) (string, error) + Srandmember func(key string, count int) ([]string, error) + SrandmemberCtx func(ctx context.Context, key string, count int) ([]string, error) + Srem func(key string, values ...interface{}) (int, error) + SremCtx func(ctx context.Context, key string, values ...interface{}) (int, error) + Sscan func(key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error) + SscanCtx func(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error) + Ttl func(key string) (int, error) + TtlCtx func(ctx context.Context, key string) (int, error) + Zadd func(key string, score int64, value string) (bool, error) + ZaddCtx func(ctx context.Context, key string, score int64, value string) (bool, error) + Zadds func(key string, ps ...redis.Pair) (int64, error) + ZaddsCtx func(ctx context.Context, key string, ps ...redis.Pair) (int64, error) + Zcard func(key string) (int, error) + ZcardCtx func(ctx context.Context, key string) (int, error) + Zcount func(key string, start, stop int64) (int, error) + ZcountCtx func(ctx context.Context, key string, start, stop int64) (int, error) + Zincrby func(key string, increment int64, field string) (int64, error) + ZincrbyCtx func(ctx context.Context, key string, increment int64, field string) (int64, error) + Zrange func(key string, start, stop int64) ([]string, error) + ZrangeCtx func(ctx context.Context, key string, start, stop int64) ([]string, error) + ZrangeWithScores func(key string, start, stop int64) ([]redis.Pair, error) + ZrangeWithScoresCtx func(ctx context.Context, key string, start, stop int64) ([]redis.Pair, error) + ZrangebyscoreWithScores func(key string, start, stop int64) ([]redis.Pair, error) + ZrangebyscoreWithScoresAndLimit func(key string, start, stop int64, page, size int) ([]redis.Pair, error) + ZrangebyscoreWithScoresAndLimitCtx func(ctx context.Context, key string, start, stop int64, page, size int) ([]redis.Pair, error) + ZrangebyscoreWithScoresCtx func(ctx context.Context, key string, start, stop int64) ([]redis.Pair, error) + Zrank func(key, field string) (int64, error) + ZrankCtx func(ctx context.Context, key, field string) (int64, error) + Zrem func(key string, values ...interface{}) (int, error) + ZremCtx func(ctx context.Context, key string, values ...interface{}) (int, error) + Zremrangebyrank func(key string, start, stop int64) (int, error) + ZremrangebyrankCtx func(ctx context.Context, key string, start, stop int64) (int, error) + Zremrangebyscore func(key string, start, stop int64) (int, error) + ZremrangebyscoreCtx func(ctx context.Context, key string, start, stop int64) (int, error) + Zrevrange func(key string, start, stop int64) ([]string, error) + ZrevrangeCtx func(ctx context.Context, key string, start, stop int64) ([]string, error) + ZrevrangebyscoreWithScores func(key string, start, stop int64) ([]redis.Pair, error) + ZrevrangebyscoreWithScoresAndLimit func(key string, start, stop int64, page, size int) ([]redis.Pair, error) + ZrevrangebyscoreWithScoresAndLimitCtx func(ctx context.Context, key string, start, stop int64, page, size int) ([]redis.Pair, error) + ZrevrangebyscoreWithScoresCtx func(ctx context.Context, key string, start, stop int64) ([]redis.Pair, error) + Zrevrank func(key, field string) (int64, error) + ZrevrankCtx func(ctx context.Context, key, field string) (int64, error) + Zscore func(key, value string) (int64, error) + ZscoreCtx func(ctx context.Context, key, value string) (int64, error) + func NewStore(c KvConf) Store