Documentation
¶
Overview ¶
Package platform regroups collecting information about the platform
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶ added in v0.48.0
type Info struct {
// GoVersion is the golang version.
GoVersion utils.Value[string] `json:"goV"`
// GoOS is equal to "runtime.GOOS"
GoOS utils.Value[string] `json:"GOOS"`
// GoArch is equal to "runtime.GOARCH"
GoArch utils.Value[string] `json:"GOOARCH"`
// KernelName is the kernel name (ex: "windows", "Linux", ...)
KernelName utils.Value[string] `json:"kernel_name"`
// KernelRelease the kernel release (ex: "10.0.20348", "4.15.0-1080-gcp", ...)
KernelRelease utils.Value[string] `json:"kernel_release"`
// Hostname is the hostname for the host
Hostname utils.Value[string] `json:"hostname"`
// Machine the architecture for the host (is: x86_64 vs arm).
Machine utils.Value[string] `json:"machine"`
// OS is the os name description (ex: "GNU/Linux", "Windows Server 2022 Datacenter", ...)
OS utils.Value[string] `json:"os"`
// Family is the OS family (Windows only)
Family utils.Value[string] `json:"family"`
// KernelVersion the kernel version, Unix only
KernelVersion utils.Value[string] `json:"kernel_version"`
// Processor is the processor type, Unix only (ex "x86_64", "arm", ...)
Processor utils.Value[string] `json:"processor"`
// HardwarePlatform is the hardware name, Linux only (ex "x86_64")
HardwarePlatform utils.Value[string] `json:"hardware_platform"`
}
Info holds metadata about the host
func CollectInfo ¶ added in v0.48.0
func CollectInfo() *Info
CollectInfo returns an Info struct with every field initialized either to a value or an error. The method will try to collect as many fields as possible.
Click to show internal directories.
Click to hide internal directories.