Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClockDrift ¶
type ClockDrift interface {
// GetDrift returns the current clock drift.
GetDrift() time.Duration
// Now returns the current time adjusted for clock drift.
Now() time.Time
}
ClockDrift is the interface that wraps the methods for the clock drift service.
type ClockDriftConfig ¶
type ClockDriftConfig struct {
// NTP server to use for syncing
NTPServer string `yaml:"ntpServer" default:"pool.ntp.org"`
// How often to sync clock drift
SyncInterval time.Duration `yaml:"syncInterval" default:"5m"`
}
ClockDriftConfig is the configuration for the clock drift service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the clock drift service.
func NewService ¶
func NewService(log logrus.FieldLogger, config *ClockDriftConfig) *Service
NewService creates a new clock drift service.
Click to show internal directories.
Click to hide internal directories.