config

package
v0.0.0-...-c8e5cf1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tag = "koanf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Sync    `koanf:"sync"`
	Storage `koanf:"storage"`
	HTTP    `koanf:"http"`
}

func MustLoad

func MustLoad() *Config

type HTTP

type HTTP struct {
	ReadTimeout     time.Duration `koanf:"read-timeout"`
	WriteTimeout    time.Duration `koanf:"write-timeout"`
	IdleTimeout     time.Duration `koanf:"idle-timeout"`
	ShutdownTimeout time.Duration `koanf:"shutdown-timeout"`
}

type Storage

type Storage struct {
	URL            string        `koanf:"url"`
	MinConns       int           `koanf:"min-conns"`
	MaxConns       int           `koanf:"max-conns"`
	StartTimeout   time.Duration `koanf:"start-timeout"`
	ReadTimeout    time.Duration `koanf:"read-timeout"`
	WriteTimeout   time.Duration `koanf:"write-timeout"`
	IdleTimeout    time.Duration `koanf:"idle-timeout"`
	LifetimeJitter time.Duration `koanf:"lifetime-jitter"`
}

type Sync

type Sync struct {
	Interval time.Duration `koanf:"interval"`
}

Jump to

Keyboard shortcuts

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