kv

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRedisNode = errors.New("no redis node")

ErrNoRedisNode is an error that indicates no redis node.

Functions

This section is empty.

Types

type KvConf

type KvConf = cache.ClusterConf

KvConf is an alias of cache.ClusterConf.

type Store

type Store interface {
	Decr(key string) (int64, error)
	Decrby(key string, increment int64) (int64, error)
	Del(keys ...string) (int, error)
	Eval(script, key string, args ...interface{}) (interface{}, error)
	Exists(key string) (bool, error)
	Expire(key string, seconds int) error
	Expireat(key string, expireTime int64) error
	Get(key string) (string, error)
	Hdel(key, field string) (bool, error)
	Hexists(key, field string) (bool, error)
	Hget(key, field string) (string, error)
	Hgetall(key string) (map[string]string, error)
	Hincrby(key, field string, increment int) (int, error)
	Hkeys(key string) ([]string, error)
	Hlen(key string) (int, error)
	Hmget(key string, fields ...string) ([]string, error)
	Hset(key, field, value string) error
	Hsetnx(key, field, value string) (bool, error)
	Hmset(key string, fieldsAndValues map[string]string) error
	Hvals(key string) ([]string, error)
	Incr(key string) (int64, error)
	Incrby(key string, increment int64) (int64, error)
	Lindex(key string, index int64) (string, error)
	Llen(key string) (int, error)
	Lpop(key string) (string, error)
	Lpush(key string, values ...interface{}) (int, error)
	Lrange(key string, start, stop int) ([]string, error)
	Lrem(key string, count int, value string) (int, error)
	Persist(key string) (bool, error)
	Pfadd(key string, values ...interface{}) (bool, error)
	Pfcount(key string) (int64, error)
	Rpush(key string, values ...interface{}) (int, error)
	Sadd(key string, values ...interface{}) (int, error)
	Scard(key string) (int64, error)
	Set(key, value string) error
	Setex(key, value string, seconds int) error
	Setnx(key, value string) (bool, error)
	SetnxEx(key, value string, seconds int) (bool, error)
	Sismember(key string, value interface{}) (bool, error)
	Smembers(key string) ([]string, error)
	Spop(key string) (string, error)
	Srandmember(key string, count int) ([]string, error)
	Srem(key string, values ...interface{}) (int, error)
	Sscan(key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
	Ttl(key string) (int, error)
	Zadd(key string, score int64, value string) (bool, error)
	Zadds(key string, ps ...redis.Pair) (int64, error)
	Zcard(key string) (int, error)
	Zcount(key string, start, stop int64) (int, error)
	Zincrby(key string, increment int64, field string) (int64, error)
	Zrange(key string, start, stop int64) ([]string, error)
	ZrangeWithScores(key string, start, stop int64) ([]redis.Pair, error)
	ZrangebyscoreWithScores(key string, start, stop int64) ([]redis.Pair, error)
	ZrangebyscoreWithScoresAndLimit(key string, start, stop int64, page, size int) ([]redis.Pair, error)
	Zrank(key, field string) (int64, error)
	Zrem(key string, values ...interface{}) (int, error)
	Zremrangebyrank(key string, start, stop int64) (int, error)
	Zremrangebyscore(key string, start, stop int64) (int, error)
	Zrevrange(key string, start, stop int64) ([]string, error)
	ZrevrangebyscoreWithScores(key string, start, stop int64) ([]redis.Pair, error)
	ZrevrangebyscoreWithScoresAndLimit(key string, start, stop int64, page, size int) ([]redis.Pair, error)
	Zscore(key, value string) (int64, error)
	Zrevrank(key, field string) (int64, error)
}

Store interface represents a KV store.

func NewStore

func NewStore(c KvConf) Store

NewStore returns a Store.

Jump to

Keyboard shortcuts

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