redisUtils

package
v0.0.0-...-054b70b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRedisCluster

func InitRedisCluster(addrs []string, password string)

func RedisLock

func RedisLock(key, value string, expireTime time.Duration) bool

func RedisUnLock

func RedisUnLock(key, value string) error

Types

type RedisCluster

type RedisCluster struct {
	*redisc.Cluster
}

func GetRedisClusterClient

func GetRedisClusterClient() *RedisCluster

func (*RedisCluster) Close

func (rc *RedisCluster) Close()

func (*RedisCluster) Del

func (rc *RedisCluster) Del(keys ...interface{}) (int, error)

func (*RedisCluster) Do

func (rc *RedisCluster) Do(cmd string, args ...interface{}) (interface{}, error)

func (*RedisCluster) Exists

func (rc *RedisCluster) Exists(key string) bool

func (*RedisCluster) Expire

func (rc *RedisCluster) Expire(key string, seconds int) (interface{}, error)

func (*RedisCluster) GetKey

func (rc *RedisCluster) GetKey(key string) (interface{}, error)

func (*RedisCluster) HGetAll

func (rc *RedisCluster) HGetAll(key string) (interface{}, error)

func (*RedisCluster) HIncrBy

func (rc *RedisCluster) HIncrBy(key string, field string, incr int64) (interface{}, error)

func (*RedisCluster) HMSet

func (rc *RedisCluster) HMSet(key string, values ...interface{}) (interface{}, error)

func (*RedisCluster) LLen

func (rc *RedisCluster) LLen(key string) int

func (*RedisCluster) LPush

func (rc *RedisCluster) LPush(key string, values ...interface{}) (interface{}, error)

func (*RedisCluster) LRange

func (rc *RedisCluster) LRange(key string, start, end int) (interface{}, error)

func (*RedisCluster) LTrim

func (rc *RedisCluster) LTrim(key string, start, end int) (interface{}, error)

func (*RedisCluster) Members

func (rc *RedisCluster) Members(key string) (interface{}, error)

func (*RedisCluster) RPush

func (rc *RedisCluster) RPush(key string, values ...interface{}) (interface{}, error)

func (*RedisCluster) Sadd

func (rc *RedisCluster) Sadd(key string, members ...interface{}) (interface{}, error)

func (*RedisCluster) Scard

func (rc *RedisCluster) Scard(key string) (interface{}, error)

func (*RedisCluster) Send

func (rc *RedisCluster) Send(cmd string, args ...interface{}) error

func (*RedisCluster) Set

func (rc *RedisCluster) Set(key string, value interface{}, ttl ...time.Duration) (interface{}, error)

func (*RedisCluster) SetNX

func (rc *RedisCluster) SetNX(key string, value interface{}, expireSeconds int) bool

Jump to

Keyboard shortcuts

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