rredis

package
v0.0.0-...-bac8e5f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nil     = redis.Nil
	DefName = "default"
)

Variables

This section is empty.

Functions

func DefRedis

func DefRedis() *redis.Client

返回 *redis.Client, 参见: https://github.com/go-redis/redis

func Redis

func Redis(name string) *redis.Client

返回 *redis.Client, 参见: https://github.com/go-redis/redis

func Reg

func Reg(name, addr, password string, db int) error

注册一个为name的redis实例

建立无密码连接sample

Reg("name", "localhost:6379", "", 0)

Types

type Config

type Config struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

Jump to

Keyboard shortcuts

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