cache

package
v0.0.0-...-556d222 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWithoutConnConfig = errors.New("connection config is required")
	ErrEmptyURI          = errors.New("empty uri been input")
	ErrPingFailed        = errors.New("redis ping check get error")
	ErrHostIsEmptyStr    = errors.New("config host should not as empty string")
	ErrIncorrectPort     = errors.New("config port value is incorrect")
	ErrGetConnectClient  = errors.New("establish connection client failed")
)

Functions

func GetRedisConn

func GetRedisConn(ctx ctx.CTX, redisConf *RedisConfig) (conn *redis.Client, err error)

Types

type RedisConfig

type RedisConfig struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Password string `json:"password"`
}

RedisConfig describe connection information

Jump to

Keyboard shortcuts

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