Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
NICs []*NIC `json:"nics"`
// contains filtered or unexported fields
}
func New ¶
New returns a pointer to an Info struct that contains information about the network interface controllers (NICs) on the host system
func (*Info) JSONString ¶
JSONString returns a string with the net information formatted as JSON under a top-level "net:" key
func (*Info) YAMLString ¶
YAMLString returns a string with the net information formatted as YAML under a top-level "net:" key
type NIC ¶
type NIC struct {
Name string `json:"name"`
MacAddress string `json:"mac_address"`
IsVirtual bool `json:"is_virtual"`
Capabilities []*NICCapability `json:"capabilities"`
PCIAddress *string `json:"pci_address,omitempty"`
Speed string `json:"speed"`
Duplex string `json:"duplex"`
SupportedLinkModes []string `json:"supported_link_modes,omitempty"`
SupportedPorts []string `json:"supported_ports,omitempty"`
SupportedFECModes []string `json:"supported_fec_modes,omitempty"`
AdvertisedLinkModes []string `json:"advertised_link_modes,omitempty"`
AdvertisedFECModes []string `json:"advertised_fec_modes,omitempty"`
}
type NICCapability ¶
type NICCapability struct {
Name string `json:"name"`
IsEnabled bool `json:"is_enabled"`
CanEnable bool `json:"can_enable"`
}
func (*NICCapability) String ¶
func (nc *NICCapability) String() string
Click to show internal directories.
Click to hide internal directories.