Documentation ¶
Index ¶
- Variables
- func ExtractFullData(systemData HostInfo) map[string]interface{}
- func ExtractLabels(systemData HostInfo) map[string]interface{}
- func ExtractLabelsLegacy(systemData HostInfo) map[string]interface{}
- func FillData(data []byte) (map[string]interface{}, error)
- func Prune(data *HostInfo)
- type HostInfo
Constants ¶
This section is empty.
Variables ¶
var ErrCouldNotReadHostInfo = errors.New("could not read host info")
Functions ¶
func ExtractFullData ¶ added in v1.7.0
ExtractFullData returns all the available hostinfo data without any check or post elaboration as a map[string]interface{}, where the interface{} is either a string or an embedded map[string]interface{}
func ExtractLabels ¶ added in v1.6.3
func ExtractLabelsLegacy ¶ added in v1.7.0
func Prune ¶ added in v1.5.3
func Prune(data *HostInfo)
Deprecated. Remove me together with 'MsgSystemData' type. Prune() filters out new Disks and Controllers introduced in ghw/pkg/block > 0.9.0 see: https://github.com/rancher/elemental-operator/issues/733
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