Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultNTPServerHostnames = []string{
"time.apple.com",
"time.aws.com",
"time.windows.com",
"time.google.com",
"time.cloudflare.com",
"pool.ntp.org",
}
View Source
var DefaultNTPServerIPs = []string{
"162.159.200.1",
"162.159.200.123",
"2606:4700:f1::1",
"2606:4700:f1::123",
"216.239.35.0",
"216.239.35.4",
"216.239.35.8",
"216.239.35.12",
"2001:4860:4806::",
"2001:4860:4806:4::",
"2001:4860:4806:8::",
"2001:4860:4806:c::",
}
Functions ¶
Types ¶
type PreCheckFunc ¶
type TimeSync ¶
type TimeSync struct {
// contains filtered or unexported fields
}
func NewTimeSync ¶
func NewTimeSync(opts *TimeSyncOptions) *TimeSync
func (*TimeSync) IsSyncSuccess ¶
IsSyncSuccess returns true if the system time is synchronized
func (*TimeSync) SetDhcpNtpAddresses ¶
type TimeSyncOptions ¶
type TimeSyncOptions struct {
PreCheckFunc PreCheckFunc
PreCheckIPv4 PreCheckFunc
PreCheckIPv6 PreCheckFunc
Logger *zerolog.Logger
NetworkConfig *types.NetworkConfig
}
Click to show internal directories.
Click to hide internal directories.