Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GraphicsCard ¶
type GraphicsCard struct { // the PCI address where the graphics card can be found Address string `json:"address"` // The "index" of the card on the bus (generally not useful information, // but might as well include it) Index int `json:"index"` // pointer to a PCIDevice struct that describes the vendor and product // model, etc // TODO(jaypipes): Rename this field to PCI, instead of DeviceInfo DeviceInfo *pci.Device `json:"pci"` // Topology node that the graphics card is affined to. Will be nil if the // architecture is not NUMA. Node *topology.Node `json:"node,omitempty"` }
func (*GraphicsCard) String ¶
func (card *GraphicsCard) String() string
type Info ¶
type Info struct { GraphicsCards []*GraphicsCard `json:"cards"` // contains filtered or unexported fields }
func New ¶
New returns a pointer to an Info struct that contains information about the graphics cards on the host system
func (*Info) JSONString ¶
JSONString returns a string with the gpu information formatted as JSON under a top-level "gpu:" key
func (*Info) YAMLString ¶
YAMLString returns a string with the gpu information formatted as YAML under a top-level "gpu:" key
Click to show internal directories.
Click to hide internal directories.