redis

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	Host        []string `json:"host" yaml:"host"`
	Password    string   `json:"password" yaml:"password"`
	PoolSize    int      `json:"pool_size" yaml:"pool_size"`
	PoolTimeout int64    `json:"pool_timeout" yaml:"pool_timeout"`
	// contains filtered or unexported fields
}

DB redis实例

func New

func New() *DB

New 创建redis实例

func (*DB) Client

func (this *DB) Client() *redis.Client

Client 获取redis客户端

func (*DB) ClusterClient

func (this *DB) ClusterClient() *redis.ClusterClient

ClusterClient 获取redis集群客户端

func (*DB) Conn

func (this *DB) Conn(isCluster bool) error

Conn 连接redis

Jump to

Keyboard shortcuts

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