redis

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisHealthCheck

type RedisHealthCheck struct {
	// Default 1s
	DialTimeout time.Duration `json:"dialTimeout" toml:"dialTimeout"`
	// Default 1s
	ReadTimeout time.Duration `json:"readTimeout" toml:"readTimeout"`
	//Default 1s
	WriteTimeout time.Duration `json:"writeTimeout" toml:"writeTimeout"`
	//Default 0
	DB int `json:"db" toml:"db"`
	//redis://:password@ip:port
	Addr     string `json:"addr"`
	PassWord string `json:"passWord" toml:"passWord"`
}

RedisHealthCheck redis check config

func DefaultRedisNodeConfig

func DefaultRedisNodeConfig() *RedisHealthCheck

DefaultRedisNodeConfig return default config

func NewRedisHealthCheck

func NewRedisHealthCheck() *RedisHealthCheck

NewRedisHealthCheck new a instance

func (*RedisHealthCheck) DoHealthCheck

func (h *RedisHealthCheck) DoHealthCheck() (resHealthCheck *view.ResHealthCheck, err error)

DoHealthCheck check is invoked periodically to perform the mysql check

func (*RedisHealthCheck) LoadExtConfig

func (h *RedisHealthCheck) LoadExtConfig(extConfig string) (err error)

LoadExtConfig parse redis config

Jump to

Keyboard shortcuts

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