Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIndexOutOfBounds = errors.New("index is out of bounds")
ErrIndexOutOfBounds is raised when an out of bound index is used
Functions ¶
func NewNTPGoogleConfig ¶
NewNTPGoogleConfig creates an NTPConfig object that configures NTP to use a predefined list of hosts. This is useful for tests, for example, to avoid loading a configuration file just to have a NTPConfig
func NewSyncTime ¶
func NewSyncTime( ntpConfig config.NTPConfig, customQueryFunc func(options NTPOptions, hostIndex int) (*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 { Hosts []string Version int LocalAddress string Timeout time.Duration Port int }
NTPOptions defines configuration options for a 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.