redismgr

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do added in v1.0.13

func Do(cmd string, args ...interface{}) (reply interface{}, err error)

Do a redis command with respect of the circuit breaker status

func DoScript added in v1.0.13

func DoScript(script *redis.Script, keysAndArgs ...interface{}) (reply interface{}, err error)

DoScript run a lua script with the respect of the circuit breaker status

func GetConn

func GetConn() (c redis.Conn)

GetConn return a redis.Conn instance

func Init

func Init(conf *RedisConfig, l *zap.Logger)

Init initialize the global RedisConnectionManager instance

func Uninit

func Uninit()

Uninit do the clean up for the global RedisConnectionManager instance

Types

type RedisConfig

type RedisConfig struct {
	Addrs          []string
	MaxIdle        int
	MaxActive      int
	ConnectTimeout time.Duration
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	IdleTimeout    time.Duration
	Wait           bool
}

RedisConfig defines the redis config

type RedisConnectionManager

type RedisConnectionManager struct {
	// contains filtered or unexported fields
}

RedisConnectionManager is the redis connection manager

Jump to

Keyboard shortcuts

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