redis

package
v0.1.33 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Nil = redis.Nil

Functions

This section is empty.

Types

type Client

type Client struct {
	redis.UniversalClient
	// contains filtered or unexported fields
}

Client redis客户端

func NewByConfig

func NewByConfig(setting config.Config) (r *Client, err error)

NewByConfig 构建客户端

func NewByOpts

func NewByOpts(opts ...Option) (r *Client, err error)

NewByOpts 构建客户端

func (*Client) GetAddrs

func (c *Client) GetAddrs() []string

GetAddrs GetAddrs

type Option

type Option func(opts *options)

func WithAddrs

func WithAddrs(addrs ...string) Option

func WithDbIndex

func WithDbIndex(index uint) Option

func WithDialTimeout

func WithDialTimeout(timeout uint) Option

func WithPassword

func WithPassword(password string) Option

func WithPoolSize

func WithPoolSize(poolSize uint) Option

func WithReadTimeout

func WithReadTimeout(timeout uint) Option

func WithWriteTimeout

func WithWriteTimeout(timeout uint) Option

Jump to

Keyboard shortcuts

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