Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxAllowablePoll is the 'recommended' interval for querying a time server MaxAllowablePoll = 1024 // MinAllowablePoll is the minimum time allowed for a client to query a time server MinAllowablePoll = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NTP ¶
NTP contains a server address
func NewNTPClient ¶
NewNTPClient instantiates a new ntp client for the specified server.
func (*NTP) Daemon ¶
Daemon runs the control loop for query and set time We dont ever want the daemon to stop, so we only log errors.
func (*NTP) QueryAndSetTime ¶ added in v0.3.0
QueryAndSetTime queries the NTP server and sets the time.
type Option ¶
Option allows for the configuration of the ntp client
func WithMaxPoll ¶
WithMaxPoll configures the ntp client MaxPoll interval
func WithMinPoll ¶
WithMinPoll configures the ntp client MinPoll interval
func WithServer ¶
WithServer configures the ntp client to use the specified server
Click to show internal directories.
Click to hide internal directories.