redis

package
v0.0.0-...-3b47b55 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPoolName = ""
)

Variables

This section is empty.

Functions

func NewRedisOptions

func NewRedisOptions(config *Config) *redis.Options

Types

type ClientPool

type ClientPool struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) *ClientPool

func (*ClientPool) GetClient

func (srv *ClientPool) GetClient(key string) *redis.Client

func (*ClientPool) NewClient

func (srv *ClientPool) NewClient() (*redis.Client, error)

NewClient net the client of redis.

type Config

type Config struct {
	Host     string
	Port     int64
	Password string
	DBIndex  int
	MaxConn  int
}

Jump to

Keyboard shortcuts

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