ntp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	config.InternalConfig

	Mode    string          `toml:"mode"`
	Timeout config.Duration `toml:"timeout"`
	Sync    SyncCheck       `toml:"sync"`
	Offset  OffsetCheck     `toml:"offset"`
	Stratum StratumCheck    `toml:"stratum"`
	// contains filtered or unexported fields
}

func (*Instance) Gather

func (ins *Instance) Gather(q *safe.Queue[*types.Event])

func (*Instance) Init

func (ins *Instance) Init() error

type NTPPlugin

type NTPPlugin struct {
	config.InternalConfig
	Instances []*Instance `toml:"instances"`
}

func (*NTPPlugin) GetInstances

func (p *NTPPlugin) GetInstances() []plugins.Instance

type OffsetCheck

type OffsetCheck struct {
	WarnGe     config.Duration `toml:"warn_ge"`
	CriticalGe config.Duration `toml:"critical_ge"`
	TitleRule  string          `toml:"title_rule"`
}

type StratumCheck

type StratumCheck struct {
	WarnGe     int    `toml:"warn_ge"`
	CriticalGe int    `toml:"critical_ge"`
	TitleRule  string `toml:"title_rule"`
}

type SyncCheck

type SyncCheck struct {
	Severity  string `toml:"severity"`
	TitleRule string `toml:"title_rule"`
}

Jump to

Keyboard shortcuts

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