Documentation
¶
Index ¶
- Constants
- type CPU
- type Collector
- type NIC
- type NICList
- func (list *NICList) Add(nics ...*NIC)
- func (list *NICList) AppendList(l NICList)
- func (list NICList) IndexByName(name string) (int, error)
- func (list NICList) IndexByObj(n *NIC) (int, error)
- func (list NICList) IndexByPCI(pciaddr string) (int, error)
- func (list NICList) Length() int
- func (list *NICList) Remove(index int)
- func (list NICList) SortByName()
- func (list NICList) SortByPCI()
- type NUMA
- type NUMANodes
- type NicType
- type SortByName
- type SortByPCI
Constants ¶
View Source
const NoNUMA = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPU ¶
type CPU struct { Type string Capacity float64 Clock float64 Config map[string]interface{} Cap map[string]interface{} }
CPU contains CPU description and properties
type Collector ¶
type Collector struct { Run func(string) (string, error) // contains filtered or unexported fields }
func NewCollector ¶
NewCollector constructs new lshw Collector The output will be represented in JSON format
type NIC ¶
type NIC struct { // port name (eth0,br0...) Name string // NIC driver(bridge,openvswitch...) Driver string // Vendor Vendor string // Model Model string // PCI Address PCIAddr string // NUMA Node NUMANode int // Description Desc string // Port type Type NicType }
NIC information
type NICList ¶
type NICList []*NIC
func NewNICList ¶
func NewNICList() NICList
func (*NICList) AppendList ¶
func (NICList) SortByName ¶
func (list NICList) SortByName()
type NUMANodes ¶
type NUMANodes []*NUMA
func (NUMANodes) CpusOnNUMA ¶
CpusOnNUMA returns a slice of CPUs bound to the given NUMA node
func (NUMANodes) NUMAByCellID ¶
func (NUMANodes) TotalNUMAs ¶
TotalNUMAs returns amount of NUMA nodes installed on the host
type SortByName ¶
type SortByName NICList
func (SortByName) Len ¶
func (list SortByName) Len() int
func (SortByName) Less ¶
func (list SortByName) Less(i, j int) bool
func (SortByName) Swap ¶
func (list SortByName) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.