redis

package
v0.0.0-...-9e48597 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const RETRY_TIMES = 6

Variables

This section is empty.

Functions

func NewRedisConnection

func NewRedisConnection(config *RedisConfig, logger *zap.SugaredLogger) (*redis.Client, error)

func NewRedisConnectionByGlobalConfig

func NewRedisConnectionByGlobalConfig(config *config.Config, logger *zap.SugaredLogger) (*redis.Client, error)

Types

type RedisConfig

type RedisConfig struct {
	Addr     string `env:"KOZMO_REDIS_ADDR" envDefault:"localhost"`
	Port     string `env:"KOZMO_REDIS_PORT" envDefault:"6379"`
	Password string `env:"KOZMO_REDIS_PASSWORD" envDefault:"kozmo2022"`
	Database int    `env:"KOZMO_REDIS_DATABASE" envDefault:"0"`
}

Jump to

Keyboard shortcuts

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