redis

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address     string
	Password    string
	Database    int
	PoolSize    int
	MinIdleConn int
}

Config struct to create new redis connection client

{
	Address: the redis address
	Password: the redis password
	Database: redis database default value is 0
	PoolSize: Maximum number of socket connections
	MinIdleConn: Minimum number of idle connections which is useful when establishing
}

func (Config) Client

func (r Config) Client() (*redis.Client, error)

Client create new redis client connection

func (Config) Ping

func (r Config) Ping() error

Ping check database connection status

func (Config) Reset

func (r Config) Reset()

Reset reset redis client connection

Jump to

Keyboard shortcuts

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