hostinfo

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillData added in v1.1.4

func FillData(data []byte) (map[string]interface{}, error)

Types

type HostInfo

type HostInfo struct {
	Memory    *memory.Info    `json:"memory"`
	Block     *block.Info     `json:"block"`
	CPU       *cpu.Info       `json:"cpu"`
	Topology  *topology.Info  `json:"topology"`
	Network   *net.Info       `json:"network"`
	GPU       *gpu.Info       `json:"gpu"`
	Chassis   *chassis.Info   `json:"chassis"`
	BIOS      *bios.Info      `json:"bios"`
	Baseboard *baseboard.Info `json:"baseboard"`
	Product   *product.Info   `json:"product"`
	Runtime   *runtime.Info   `json:"runtime"`
	// contains filtered or unexported fields
}

HostInfo represents all the host info minus the PCI devices We cannot use ghw.HostInfo directly as that tries to gather the local pci-ids database, which we don't have And fallbacks to download it from the network. Unfortunately that returns an error instead of a warning and prevents us from gathering the rest of the data. Thus, the necessity of having our own struct :/ We could drop this if we include the hwdata package in the base OS

func Host

func Host() (*HostInfo, error)

Host returns a pointer to a HostInfo struct that contains fields with information about the host system's CPU, memory, network devices, etc

Jump to

Keyboard shortcuts

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