goredis

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRDB

func GetRDB() *redis.Client

GetRDB get the default redis connection

func GetRDBByName

func GetRDBByName(name string) *redis.Client

GetRDBByName get a redis connection by name

func InitDB

func InitDB(rcs []*RedisConfig) (err error)

InitDB initialize multiple redis connections

func InitDefaultDB

func InitDefaultDB(rc *RedisConfig) (err error)

InitDefaultDB Initialize a redis connection

Types

type RedisConfig

type RedisConfig struct {
	Name     string // name
	DB       int    // redis db num
	Host     string // host
	Port     int    // port
	Username string // username
	Password string // password
	Pool     int    // pool
}

RedisConfig redis config

Jump to

Keyboard shortcuts

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