config

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const LogNodeName = "node.name"
View Source
const LogPluginId = "plugin.id"
View Source
const TraceLevel = zapcore.DebugLevel - 1

Variables

This section is empty.

Functions

func GetKoanf

func GetKoanf() *koanf.Koanf

func GetLogger

func GetLogger(logLevel, logFormat string) (*zap.Logger, error)

func GetNamedLogger

func GetNamedLogger(name string) (*zap.Logger, error)

func GetPluginConfig added in v0.0.3

func GetPluginConfig(format pluginv1.ConfigFormat, pluginId string) ([]byte, error)

func LoadDefaultConfig

func LoadDefaultConfig()

Types

type Config

type Config struct {
	Log struct {
		Level   string            `koanf:"level"`
		Format  string            `koanf:"format"`
		Loggers map[string]Logger `koanf:"loggers"`
	} `koanf:"log"`
	Reboot struct {
		CheckInterval time.Duration `koanf:"checkInterval"`
	}
	ContainerNode bool `koanf:"containerNode"`
}

func GetConfig

func GetConfig() *Config

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) GetLogger

func (c *Config) GetLogger(name string) Logger

type Logger

type Logger struct {
	Level string `koanf:"level"`
}

Jump to

Keyboard shortcuts

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