Documentation ¶
Overview ¶
Package time provides time-related resources.
Index ¶
Constants ¶
const AdjtimeStatusID = resource.ID("node")
AdjtimeStatusID is the ID of the singletone resource.
const AdjtimeStatusType = resource.Type("AdjtimeStatuses.v1alpha1.talos.dev")
AdjtimeStatusType is type of AdjtimeStatus resource.
const StatusID = resource.ID("node")
StatusID is the ID of the singletone resource.
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 AdjtimeStatus ¶ added in v1.6.0
type AdjtimeStatus = typed.Resource[AdjtimeStatusSpec, AdjtimeStatusExtension]
AdjtimeStatus describes running current time sync AdjtimeStatus.
func NewAdjtimeStatus ¶ added in v1.6.0
func NewAdjtimeStatus() *AdjtimeStatus
NewAdjtimeStatus initializes a TimeSync resource.
type AdjtimeStatusExtension ¶ added in v1.6.0
type AdjtimeStatusExtension struct{}
AdjtimeStatusExtension provides auxiliary methods for AdjtimeStatus.
func (AdjtimeStatusExtension) ResourceDefinition ¶ added in v1.6.0
func (AdjtimeStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements meta.ResourceDefinitionProvider interface.
type AdjtimeStatusSpec ¶ added in v1.6.0
type AdjtimeStatusSpec struct { Offset time.Duration `yaml:"offset" protobuf:"1"` FrequencyAdjustmentRatio float64 `yaml:"frequencyAdjustmentRatio" protobuf:"2"` MaxError time.Duration `yaml:"maxError" protobuf:"3"` EstError time.Duration `yaml:"estError" protobuf:"4"` Status string `yaml:"status" protobuf:"5"` Constant int `yaml:"constant" protobuf:"6"` SyncStatus bool `yaml:"syncStatus" protobuf:"7"` State string `yaml:"state" protobuf:"8"` }
AdjtimeStatusSpec describes Linux internal adjtime state.
func (AdjtimeStatusSpec) DeepCopy ¶ added in v1.6.0
func (o AdjtimeStatusSpec) DeepCopy() AdjtimeStatusSpec
DeepCopy generates a deep copy of AdjtimeStatusSpec.
type Status ¶
type Status = typed.Resource[StatusSpec, StatusExtension]
Status describes running current time sync status.
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