goredis

package
v1.2.35 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 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,optional" json:"name,optional"`
	Addr     string `yaml:"Addr,optional" json:"addr,optional"`
	Password string `yaml:"Password,optional" json:"password,optional"`
	DB       int    `yaml:"DB,optional" json:"db,optional"`
	Prefix   string `yaml:"Prefix,optional" json:"prefix,optional"`
	AutoPing bool   `yaml:"AutoPing,optional" json:"autoPing,optional"`
}

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