redis

package module
v0.0.0-...-472bd46 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 3 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(options ...Option) (*Cli, error)

type Option

type Option func(options *redis.Options)

func ReadTimeout

func ReadTimeout(timeout time.Duration) Option

func WithAuth

func WithAuth(user, password string) Option

func WithDB

func WithDB(db int) Option

func WithDialTimeout

func WithDialTimeout(timeout time.Duration) 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.

func WriteTimeout

func WriteTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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