redisconfig

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "redis-config.toml" // ConfigFileName

Variables

View Source
var (
	Provider       = wire.NewSet(Loading) // Provider
	ConfigFullPath = ""                   // ConfigFullPath
)

Functions

This section is empty.

Types

type Option

type Option func(*RedisConfig)

Option ProxyOption options

func WithAddr

func WithAddr(addr string) Option

func WithDb

func WithDb(db int) Option

WithDb debug

func WithPassword

func WithPassword(pw string) Option

WithPassword password

func WithTTL

func WithTTL(ttl time.Duration) Option

WithTTL ttl

type RedisConfig

type RedisConfig struct {
	Addr     string        `json:"addr"`
	Password string        `json:"password"`
	DB       int           `json:"db"`
	TTL      time.Duration `json:"ttl"`
}

func Default

func Default() *RedisConfig

func Load

func Load(f string) (*RedisConfig, error)

Load load

func Loading

func Loading() (*RedisConfig, error)

func New

func New(opts ...Option) *RedisConfig

New postgres config

Jump to

Keyboard shortcuts

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