Documentation ¶
Overview ¶
Package time contains controllers managing time, synchronization, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjtimeStatusController ¶
type AdjtimeStatusController struct {
V1Alpha1Mode v1alpha1runtime.Mode
}
AdjtimeStatusController manages time.AdjtimeStatus based on Linux kernel info.
func (*AdjtimeStatusController) Inputs ¶
func (ctrl *AdjtimeStatusController) Inputs() []controller.Input
Inputs implements controller.Controller interface.
func (*AdjtimeStatusController) Name ¶
func (ctrl *AdjtimeStatusController) Name() string
Name implements controller.Controller interface.
func (*AdjtimeStatusController) Outputs ¶
func (ctrl *AdjtimeStatusController) Outputs() []controller.Output
Outputs implements controller.Controller interface.
func (*AdjtimeStatusController) Run ¶
func (ctrl *AdjtimeStatusController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error
Run implements controller.Controller interface.
type NTPSyncer ¶
type NTPSyncer interface { Run(ctx context.Context) Synced() <-chan struct{} EpochChange() <-chan struct{} SetTimeServers([]string) }
NTPSyncer interface is implemented by ntp.Syncer, interface for mocking.
type NewNTPSyncerFunc ¶
NewNTPSyncerFunc function allows to replace ntp.Syncer with the mock.
type SyncController ¶
type SyncController struct { V1Alpha1Mode v1alpha1runtime.Mode NewNTPSyncer NewNTPSyncerFunc // contains filtered or unexported fields }
SyncController manages v1alpha1.TimeSync based on configuration and NTP sync process.
func (*SyncController) Inputs ¶
func (ctrl *SyncController) Inputs() []controller.Input
Inputs implements controller.Controller interface.
func (*SyncController) Name ¶
func (ctrl *SyncController) Name() string
Name implements controller.Controller interface.
func (*SyncController) Outputs ¶
func (ctrl *SyncController) Outputs() []controller.Output
Outputs implements controller.Controller interface.
func (*SyncController) Run ¶
func (ctrl *SyncController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error
Run implements controller.Controller interface.