redis

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 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:"ILLA_REDIS_ADDR" envDefault:"localhost"`
	Port     string `env:"ILLA_REDIS_PORT" envDefault:"6379"`
	Password string `env:"ILLA_REDIS_PASSWORD" envDefault:"illa2022"`
	Database int    `env:"ILLA_REDIS_DATABASE" envDefault:"0"`
}

Jump to

Keyboard shortcuts

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