hostinfo

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package hostinfo reads the platform the node runs on: the kernel release and the operating system's name, which the heartbeat reports beside the GOOS and GOARCH of the running binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KernelRelease

func KernelRelease() (string, error)

KernelRelease returns the release of the running kernel, as uname -r prints it. macOS gives Darwin's release (25.1.0).

func Read

func Read(logger *slog.Logger) api.NodePlatform

Read returns the platform of the running binary and its host. OS and Arch are runtime.GOOS and runtime.GOARCH. Kernel is the kernel release, and Distribution the operating system's name: the PRETTY_NAME of /etc/os-release on Linux, "macOS <version>" on macOS, and the product name and display version from the registry on Windows. Each value is held to the control plane's rules before it is returned, so a source that fails or gives a value the control plane refuses costs that member, never the heartbeat. Read logs what it leaves off, and never the refused value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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