goredis

package
v1.2.26 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

go-redis

redis 连接和操作 基于 github.com/go-redis/redis 库

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(configs ...Config) (err error)

可以一次初始化多个Redis实例或者 多次调用初始化多个实例

Types

type Config

type Config struct {
	Name     string `yaml:"name" json:"name"`
	Addr     string `yaml:"addr" json:"addr"`
	Password string `yaml:"password" json:"password"`
	DB       int    `yaml:"db" json:"DB"`
	Prefix   string `yaml:"prefix" json:"prefix"`
	AutoPing bool   `yaml:"auto_ping" json:"autoPing"`
}

type GoRedis

type GoRedis struct {
	*redis.Client
}

func Default

func Default() *GoRedis

func GetClient

func GetClient(names ...string) *GoRedis

func New

func New(conf Config) (cli *GoRedis, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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