redis

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: Zlib Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Get(name string) (*redis.Client, error)
	Close(name string) error
	CloseAll()
	Select(name string)                    //选哪个redis
	SelectDB(name string, index int) error //选哪个redis db
}

func NewRedis

func NewRedis(conf []server.Redis) (Client, error)

type Connector

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

func (*Connector) Close

func (c *Connector) Close(name string) error

func (*Connector) CloseAll

func (c *Connector) CloseAll()

func (*Connector) Get

func (c *Connector) Get(name string) (*redis.Client, error)

func (*Connector) Select added in v0.4.1

func (c *Connector) Select(name string)

func (*Connector) SelectDB added in v0.4.6

func (c *Connector) SelectDB(name string, index int) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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