Documentation ¶
Overview ¶
Package structs defines the data structures for net.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DevUsage ¶
type DevUsage struct { Timestamp int64 `json:"timestamp"` TimeDelta int64 `json:"time_delta"` Device []Device `json:"devices"` }
DevUsage contains information about the usage of all current network devices. Usage is calculated as the delta between two /proc/net/dev snapshots; the TimeDelta field holds the time elapsed between the two snapshots used to calculate the usage.
type Device ¶
type Device struct { Name string `json:"name"` RBytes int64 `json:"receive_bytes"` RPackets int64 `json:"receive_packets"` RErrs int64 `json:"receive_errs"` RDrop int64 `json:"receive_drop"` RFIFO int64 `json:"recieve_fifo"` RFrame int64 `json:"receive_frame"` RCompressed int64 `json:"receive_compressed"` RMulticast int64 `json:"receive_multicast"` TBytes int64 `json:"transmit_bytes"` TPackets int64 `json:"transmit_packets"` TErrs int64 `json:"transmit_errs"` TDrop int64 `json:"transmit_drop"` TFIFO int64 `json:"transmit_fifo"` TColls int64 `json:"transmit_colls"` TCarrier int64 `json:"transmit_carrier"` TCompressed int64 `json:"transmit_compressed"` }
Device contains information for a given network device.
Click to show internal directories.
Click to hide internal directories.