clockchecker

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultInitialDelay     = 3 * time.Second
	DefaultSecondCheckDelay = 1 * time.Minute
	DefaultCheckInterval    = 6 * time.Hour
	DefaultWarningThreshold = 5 * time.Second
	DefaultErrorThreshold   = 10 * time.Second
	DefaultNTPServerAddress = "pool.ntp.org"
)

Variables

This section is empty.

Functions

func New

func New(opts *Options) *clockChecker

Types

type ClockChecker

type ClockChecker interface {
	// Start runs the clock synchronization check at configured intervals in a goroutine.
	Start(ctx context.Context)
}

type Options

type Options struct {
	InitialDelay     time.Duration
	SecondCheckDelay time.Duration
	CheckInterval    time.Duration
	WarningThreshold time.Duration
	ErrorThreshold   time.Duration
	NTPServerAddress string
}

Jump to

Keyboard shortcuts

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