redis

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nil = redis.Nil
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client = redis.Client

func New added in v1.0.24

func New(ctx context.Context, cfg *Config) (Client, error)

ConnectToRedis returns a client to the Redis Server specified by Options.

type Config

type Config struct {
	Host     string `yaml:"host" env:"REDIS_HOST"      env-default:"localhost"`
	Port     int    `yaml:"port" env:"REDIS_PORT"      env-default:"6379"`
	DBNumber int    `yaml:"db"   env:"REDIS_DB_NUMBER" env-default:"0"`
	Password string `env:"REDIS_PASSWORD"`
}

Config is type for database connection

Jump to

Keyboard shortcuts

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