Updated vendored ntp package (#681)

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.
This commit is contained in:
Brett Vickers 2017-10-03 23:33:49 -07:00 committed by Ben Kochie
commit b62c7bc0ad
6 changed files with 390 additions and 257 deletions

View file

@ -4,21 +4,22 @@
ntp
===
The ntp package is an implementation of a simple NTP client. It allows you
to connect to a remote NTP server and request the current time.
The ntp package is an implementation of a Simple NTP (SNTP) client based on
[RFC5905](https://tools.ietf.org/html/rfc5905). It allows you to connect to
a remote NTP server and request the current time.
To request the current time, simply do the following:
If all you care about is the current time according to a known remote NTP
server, simply use the `Time` function:
```go
time, err := ntp.Time("0.beevik-ntp.pool.ntp.org")
```
To request the current time along with additional metadata, use the Query
function:
If you want the time as well as additional metadata about the time, use the
`Query` function instead:
```go
response, err := ntp.Query("0.beevik-ntp.pool.ntp.org")
```
NB: if you want to use the NTP Pool in your software you should request your
own [vendor zone](http://www.pool.ntp.org/en/vendors.html). You **must
absolutely not use the default pool.ntp.org zone names** as the default
configuration in your application or appliance.
To use the NTP pool in your application, please request your own
[vendor zone](http://www.pool.ntp.org/en/vendors.html). Avoid using
the `[number].pool.ntp.org` zone names in your applications.