Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNTPGoogleConfig ¶
NewNTPGoogleConfig creates an NTPConfig object that configures NTP to use time.google.com. This is a useful default for tests, for example, to avoid loading a configuration file just to have an NTPConfig.
func NewSyncTime ¶
func NewSyncTime(ntpConfig config.NTPConfig, syncPeriod time.Duration, customQueryFunc func(options NTPOptions) (*ntp.Response, error)) *syncTime
NewSyncTime creates a syncTime object. The customQueryFunc argument allows the caller to set a different NTP-querying callback, if desired. If set to nil, then the default queryNTP is used.
Types ¶
type NTPOptions ¶
type NTPOptions struct { Host string Version int LocalAddress string Timeout time.Duration Port int }
NTPOptions defines configuration options for an NTP query
func NewNTPOptions ¶
func NewNTPOptions(ntpConfig config.NTPConfig) NTPOptions
NewNTPOptions creates a new NTPOptions object.
Click to show internal directories.
Click to hide internal directories.