redis

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromConfig

func NewFromConfig(ctx context.Context, conf IConfig) (*_redis, error)

func NewRedis

func NewRedis(ctx context.Context, config *RedisConfig) (*_redis, error)

Types

type IConfig added in v0.1.2

type IConfig interface {
	Unmarshal(ptr any) error
}

type IRedis

type IRedis interface {
	GetClient() *redis.Client
}

type RedisConfig

type RedisConfig struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

Jump to

Keyboard shortcuts

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