Documentation
¶
Overview ¶
Package netinfo collects a read-only snapshot of host network interfaces.
Index ¶
Constants ¶
View Source
const ( )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
CIDR string `json:"cidr"`
Family string `json:"family"`
Scope string `json:"scope"`
Zone string `json:"zone,omitempty"`
}
Address describes one IP address assigned to an interface.
type Interface ¶
type Interface struct {
Index int `json:"index,omitempty"`
Name string `json:"name"`
Up bool `json:"up"`
Running bool `json:"running"`
Loopback bool `json:"loopback"`
PointToPoint bool `json:"point_to_point,omitempty"`
MTU int `json:"mtu,omitempty"`
Addresses []Address `json:"addresses"`
CountersAvailable bool `json:"counters_available"`
RXBytes uint64 `json:"rx_bytes,omitempty"`
TXBytes uint64 `json:"tx_bytes,omitempty"`
}
Interface describes one host network interface and its cumulative counters.
type Snapshot ¶
type Snapshot struct {
Available bool `json:"available"`
CollectedTime int64 `json:"collected_time"`
Hostname string `json:"hostname,omitempty"`
OS string `json:"os"`
Arch string `json:"arch"`
Interfaces []Interface `json:"interfaces"`
Warnings []string `json:"warnings,omitempty"`
}
Snapshot is a point-in-time view of the daemon host's network interfaces. Warnings contain stable codes; raw platform errors stay in daemon logs.
Click to show internal directories.
Click to hide internal directories.