redis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedis

func NewRedis(opts ...RedisConfigOption) (*redis.Client, error)

func NewRedisV8

func NewRedisV8(opts ...RedisConfigOption) (*redisv8.Client, error)

Types

type RedisConfig

type RedisConfig struct {
	Host         string `json:"host" yaml:"host" env:"DEFAULT_REDIS_HOST"`
	Port         uint32 `json:"port" yaml:"port" env:"DEFAULT_REDIS_PORT"`
	Pass         string `json:"pass" yaml:"pass" env:"DEFAULT_REDIS_PASS"`
	DialTimeout  uint32 `json:"dial_timeout" yaml:"dialTimeout" env:"DEFAULT_REDIS_DIAL_TIMEOUT"`
	ReadTimeout  uint32 `json:"read_timeout" yaml:"readTimeout" env:"DEFAULT_REDIS_READ_TIMEOUT"`
	WriteTimeout uint32 `json:"write_timeout" yaml:"writeTimeout" env:"DEFAULT_REDIS_WRITE_TIMEOUT"`

	TracerProvider trace.TracerProvider `json:"-"`
	MeterProvider  metric.MeterProvider `json:"-"`
}

type RedisConfigOption

type RedisConfigOption func(*RedisConfig)

Jump to

Keyboard shortcuts

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