redis

package module
v0.0.0-...-b4dad9e Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	*redis.Client
}

func Connect

func Connect(host string, options ...Option) (*Cli, error)

type Option

type Option func(options *redis.Options)

func WithAuth

func WithAuth(user, pwd string) Option

func WithDB

func WithDB(db int) Option

func WithMaxOpenConns

func WithMaxOpenConns(num int) Option

Maximum number of connections allocated by the pool at a given time. When zero, there is no limit on the number of connections in the pool.

func WithMinIdleConns

func WithMinIdleConns(num int) Option

The default max idle connections is currently 2.

Jump to

Keyboard shortcuts

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