redis

package
v0.0.0-...-9665562 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 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 Config

type Config struct {
	Host               string        `mapstructure:"host"`
	Port               string        `mapstructure:"port"`
	Password           string        `mapstructure:"password"`
	DB                 int           `mapstructure:"db"`
	PoolSize           int           `mapstructure:"pool_size"`
	DialTimeout        time.Duration `mapstructure:"dial_timeout"`
	ReadTimeout        time.Duration `mapstructure:"read_timeout"`
	WriteTimeout       time.Duration `mapstructure:"write_timeout"`
	PoolTimeout        time.Duration `mapstructure:"pool_timeout"`
	IdleCheckFrequency time.Duration `mapstructure:"idle_check_frequency"`
}

type Redis

type Redis struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *Redis

func (*Redis) Client

func (r *Redis) Client() *redis.Client

func (*Redis) ConnectTo

func (r *Redis) ConnectTo() error

Jump to

Keyboard shortcuts

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