conf

package
v0.0.0-...-888f0f9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Executable is overridden by Makefile with executable name
	Executable = "NoExecutable"
	// GitVersion is overridden by Makefile with git information
	GitVersion = "dev"
)
View Source
var C = koanf.New(".")

C is the global configuration with "." for delimeter

View Source
var Stop = func() *stop {
	ctx, cancel := context.WithCancel(context.Background())
	return &stop{
		ctx:    ctx,
		cancel: cancel,
	}
}()

Stop is the global stop instance

Functions

func Defaults

func Defaults(c *koanf.Koanf) error

Defaults loads the default config for the app

func Env

func Env(c *koanf.Koanf) error

Env environment configuration overrides

func File

func File(c *koanf.Koanf, configFile string) error

File loads configuration from a file

func GetVersion

func GetVersion() http.HandlerFunc

GetVersion returns version as a simple json

func InitLogger

func InitLogger(c *koanf.Koanf)

InitLogger loads a global logger based on a koanf configuration

Types

This section is empty.

Jump to

Keyboard shortcuts

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