Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkStats ¶
type NetworkStats struct { Name string `json:"name"` // network interface name Received uint64 `json:"received"` // total number of bytes of data received Transmitted uint64 `json:"transmitted"` // total number of bytes of data transmitted }
NetworkStats represents network statistics
func (*NetworkStats) String ¶
func (ns *NetworkStats) String() string
func (*NetworkStats) Subtract ¶
func (ns *NetworkStats) Subtract(s *NetworkStats)
type NetworkUsage ¶
type NetworkUsage struct { NetworkStats Delta time.Duration }
func (*NetworkUsage) ReceiveSpeed ¶
func (nu *NetworkUsage) ReceiveSpeed() float64
ReceiveSpeed get receive speed bytes/second
func (*NetworkUsage) String ¶
func (nu *NetworkUsage) String() string
func (*NetworkUsage) TransmitSpeed ¶
func (nu *NetworkUsage) TransmitSpeed() float64
TransmitSpeed get transmit speed bytes/second
type NetworksStats ¶
type NetworksStats []NetworkStats
func GetNetworksStats ¶
func GetNetworksStats() (NetworksStats, error)
GetNetworksStats get network statistics
func (NetworksStats) Subtract ¶
func (nss NetworksStats) Subtract(ss NetworksStats)
type NetworksUsage ¶
type NetworksUsage []NetworkUsage
func GetNetworksUsage ¶
func GetNetworksUsage(delta time.Duration) (nsu NetworksUsage, err error)
GetNetworksUsage get networks usage between delta duration
Click to show internal directories.
Click to hide internal directories.