power

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCollector

func NewCollector() collector.RPCCollector

NewCollector creates a new collector

Types

type ChassisHardwareResult added in v0.15.3

type ChassisHardwareResult struct {
	XMLName  xml.Name `xml:"rpc-reply"`
	Platform string   `xml:"chassis-inventory>chassis>description"`
}

type PSU added in v0.15.3

type PSU struct {
	Slot          int    `xml:"psu-slot"`
	Type          string `xml:"psu-type"`
	PowerSupplied int    `xml:"power-supplied"`
	State         string `xml:"state"`
}

type PowerBudgetInformation added in v0.15.3

type PowerBudgetInformation struct {
	LineCardSlot        string `xml:"line-card-slot"`
	PSUs                []PSU
	PsuRedundancyConfig string `xml:"psu-redundancy-config"`
	TotalPowerSupplied  int    `xml:"total-power-supplied"`
	BasePower           int    `xml:"base-power"`
	ActualPowerUsed     int    `xml:"actual-power-used"`
}

func (*PowerBudgetInformation) UnmarshalXML added in v0.15.3

func (p *PowerBudgetInformation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML handles the flat, ungrouped PSU sibling elements by accumulating PSU fields into a new PSU each time a <psu-slot> is encountered.

Jump to

Keyboard shortcuts

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