mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-21 07:56:07 +01:00
b62c7bc0ad
The github.com/beevik/ntp package was recently updated with some API changes that broke node_exporter. This commit fetches the latest version of the ntp package and brings node_exporter in line with the latest API. |
||
---|---|---|
.. | ||
CONTRIBUTORS | ||
LICENSE | ||
ntp.go | ||
README.md | ||
RELEASE_NOTES.md |
ntp
The ntp package is an implementation of a Simple NTP (SNTP) client based on RFC5905. It allows you to connect to a remote NTP server and request the current time.
If all you care about is the current time according to a known remote NTP
server, simply use the Time
function:
time, err := ntp.Time("0.beevik-ntp.pool.ntp.org")
If you want the time as well as additional metadata about the time, use the
Query
function instead:
response, err := ntp.Query("0.beevik-ntp.pool.ntp.org")
To use the NTP pool in your application, please request your own
vendor zone. Avoid using
the [number].pool.ntp.org
zone names in your applications.