config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPIDPath

func DefaultPIDPath() string

Types

type Config

type Config struct {
	Targets   TargetsConfig   `toml:"targets"`
	Intervals IntervalsConfig `toml:"intervals"`
	Storage   StorageConfig   `toml:"storage"`
	Outage    OutageConfig    `toml:"outage"`
	TUI       TUIConfig       `toml:"tui"`
	Verbose   bool            `toml:"-"`
}

func DefaultConfig

func DefaultConfig() *Config

func Load

func Load(path string) (*Config, error)

type Duration

type Duration struct {
	time.Duration
}

Duration wraps time.Duration for TOML parsing.

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

type IntervalsConfig

type IntervalsConfig struct {
	ICMP Duration `toml:"icmp"`
	DNS  Duration `toml:"dns"`
	HTTP Duration `toml:"http"`
}

type OutageConfig

type OutageConfig struct {
	ConsecutiveFailures int `toml:"consecutive_failures"`
}

type StorageConfig

type StorageConfig struct {
	Path      string   `toml:"path"`
	Retention Duration `toml:"retention"`
}

type TUIConfig

type TUIConfig struct {
	DefaultTimeRange string `toml:"default_timerange"`
}

type TargetsConfig

type TargetsConfig struct {
	ICMP         []string `toml:"icmp"`
	DNSQuery     string   `toml:"dns_query"`
	DNSResolvers []string `toml:"dns_resolvers"`
	HTTP         string   `toml:"http"`
}

Jump to

Keyboard shortcuts

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