config

package
v0.0.0-...-50fa61f Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: Zlib Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConf = MainConfig{
	Output:         "stdout",
	Notifiers:      "",
	StatusInterval: 1 * time.Second,
	NotifyTimeout:  5 * time.Second,
	NotifyRotate:   1500 * time.Millisecond,
	SocketNetwork:  "tcp4",
	SocketAddress:  "0.0.0.0:4040",
}

Functions

func ParseConfig

func ParseConfig(file io.Reader, filename string) iter.Seq2[string, map[string]string]

func UnmarshalConf

func UnmarshalConf(data map[string]string, prefix string, out any) error

Types

type MainConfig

type MainConfig struct {
	Output         string        `conf:"driver.output"`
	Notifiers      string        `conf:"driver.notifiers"`
	StatusInterval time.Duration `conf:"status.interval"`
	NotifyTimeout  time.Duration `conf:"notification.timeout"`
	NotifyRotate   time.Duration `conf:"notification.rotate"`
	SocketNetwork  string        `conf:"socket-notifier.network"`
	SocketAddress  string        `conf:"socket-notifier.address"`
}

Jump to

Keyboard shortcuts

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