time

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package time provides time-related resources.

Index

Constants

View Source
const StatusID = resource.ID("node")

StatusID is the ID of the singletone resource.

View Source
const StatusType = resource.Type("TimeStatuses.v1alpha1.talos.dev")

StatusType is type of TimeSync resource.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

Status describes running current time sync status.

func NewStatus

func NewStatus() *Status

NewStatus initializes a TimeSync resource.

type StatusExtension added in v1.4.0

type StatusExtension struct{}

StatusExtension provides auxiliary methods for Status.

func (StatusExtension) ResourceDefinition added in v1.4.0

func (StatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

type StatusSpec

type StatusSpec struct {
	// Synced indicates whether time is in sync.
	Synced bool `yaml:"synced" protobuf:"1"`

	// Epoch is incremented every time clock jumps more than 15min.
	Epoch int `yaml:"epoch" protobuf:"2"`

	// SyncDisabled indicates if time sync is disabled.
	SyncDisabled bool `yaml:"syncDisabled" protobuf:"3"`
}

StatusSpec describes time sync state.

func (StatusSpec) DeepCopy

func (o StatusSpec) DeepCopy() StatusSpec

DeepCopy generates a deep copy of StatusSpec.

type SyncCondition

type SyncCondition struct {
	// contains filtered or unexported fields
}

SyncCondition implements condition which waits for the time to be in sync.

func NewSyncCondition

func NewSyncCondition(state state.State) *SyncCondition

NewSyncCondition builds a coondition which waits for the time to be in sync.

func (*SyncCondition) String

func (condition *SyncCondition) String() string

func (*SyncCondition) Wait

func (condition *SyncCondition) Wait(ctx context.Context) error

Wait implements condition interface.

Jump to

Keyboard shortcuts

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