hostprobe

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package hostprobe reads host facts an executor reports about itself: the kernel clock discipline and the host platform. Every probe is read-only and local; none changes host state, contacts a time source or sends a packet.

Index

Constants

View Source
const (
	ClockSynced   = "synced"
	ClockUnsynced = "unsynced"
	ClockUnknown  = "unknown"
)

Clock states.

View Source
const (
	ReadinessReady    = "ready"
	ReadinessDegraded = "degraded"
	ReadinessUnknown  = "unknown"

	ReasonUnsynced          = "unsynced"
	ReasonErrorExceedsBound = "error_exceeds_bound"
)

Clock readiness and its degraded reasons.

View Source
const DefaultClockErrorBound = 100 * time.Millisecond

DefaultClockErrorBound is the estimated clock error above which an executor reports its clock readiness as degraded unless the operator configures a different bound.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock struct {
	State          string
	EstimatedError *time.Duration
	MaxError       *time.Duration
	Bound          time.Duration
	Readiness      string
	Reason         string
}

Clock is the kernel's view of its own clock discipline. EstimatedError and MaxError are the kernel's esterror and maxerror, maintained by a time daemon such as chrony or ntpd; they are estimates, not measured bounds.

func ReadClock

func ReadClock(bound time.Duration) Clock

ReadClock reads the kernel clock state and grades it against bound. A non-positive bound uses DefaultClockErrorBound.

type Platform

type Platform struct {
	OS            string
	Arch          string
	KernelRelease string
	CPUs          int
	MemoryBytes   uint64
	BuildVersion  string
}

Platform describes the host an executor runs on. Empty and zero values are unknown. It is operator-only data: the dispatcher never lists it publicly.

func ReadPlatform

func ReadPlatform() Platform

ReadPlatform reads the platform facts. It never fails; a fact that cannot be read is left unknown.

Jump to

Keyboard shortcuts

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