time

package
v0.11.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

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 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

type NewNTPSyncerFunc func(*zap.Logger, []string) NTPSyncer

NewNTPSyncerFunc function allows to replace ntp.Syncer with the mock.

type SyncController

type SyncController struct {
	V1Alpha1Mode v1alpha1runtime.Mode
	NewNTPSyncer NewNTPSyncerFunc
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL