redis

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName  string
	Host         string
	Port         int
	Username     string
	Password     string
	DB           int
	DialTimeout  int
	ReadTimeout  int
	WriteTimeout int
	MaxConnAge   int
	PoolSize     int
	MinIdleConns int
}

type Option added in v1.0.5

type Option struct{}

type OptionFunc added in v1.0.5

type OptionFunc func(*Option)

type RedisClient added in v1.0.5

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

func NewRedisClient added in v1.0.5

func NewRedisClient(cfg *Config, opts ...OptionFunc) (*RedisClient, error)

func (*RedisClient) Dialer added in v1.0.5

func (rc *RedisClient) Dialer(ctx context.Context, network, addr string) (net.Conn, error)

func (*RedisClient) OnConnect added in v1.0.5

func (rc *RedisClient) OnConnect(ctx context.Context, cn *redis.Conn) (err error)

Jump to

Keyboard shortcuts

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