redis

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRedisNotExists = errors.New("指定Redis不存在,或未初始化")
)

Functions

func Client added in v0.3.7

func Client(name string) (*goredis.Client, error)

Client 通过名称获取Redis

func Init added in v0.1.6

func Init(conf []Config) error

Init 初始化数据库

Types

type Config added in v0.2.23

type Config struct {
	Name     string `json:"name" toml:"name"`
	Host     string `json:"host" toml:"host"`
	Port     int    `json:"port" toml:"port"`
	Password string `json:"password" toml:"password"`
	Db       int    `json:"db" toml:"db"`
	Prefix   string `json:"prefix" toml:"prefix"`
}

type Manager

type Manager struct {
	sync.Map
}

Jump to

Keyboard shortcuts

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