config

package
v0.0.0-...-738d9da Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunOnConfigChange

func RunOnConfigChange(ctx context.Context, log *zap.SugaredLogger, path string, callbacks ...CallbackFn)

RunOnConfigChange - run callback functions when config is changed

Types

type CallbackFn

type CallbackFn func(Config)

type Config

type Config struct {
	LogLevel  string `yaml:"logLevel"`
	LogFormat string `yaml:"logFormat"`
}

func LoadLogConfig

func LoadLogConfig(path string) (Config, error)

LoadLogConfig - return cfg struct based on given path

Jump to

Keyboard shortcuts

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