redis

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client *client
)

Functions

func Init

func Init(redisName string, confStr string) error

Init 初始化redis json config string

func InitWithConfig added in v0.2.7

func InitWithConfig(redisName string, redisConf *Config) error

func InitYaml added in v0.2.7

func InitYaml(redisName string, confStr string) error

InitYaml 初始化redis yaml config string

Types

type Config

type Config struct {
	Host     string `json:"host" yaml:"host" validate:"required"`
	Database int    `json:"database" yaml:"database" validate:"required"`
	Password string `json:"password" yaml:"password" validate:"required"`
}

Jump to

Keyboard shortcuts

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