Documentation
¶
Index ¶
- type NetMonitor
- func (nt *NetMonitor) GetAvailableInterfaces() ([]string, error)
- func (nt *NetMonitor) GetCurrInterface() string
- func (nt *NetMonitor) SetInterface(interf string) error
- func (nt *NetMonitor) SetInterval(interval float64)
- func (nt *NetMonitor) Start(callback func(stats *NetStat))
- func (nt *NetMonitor) Stop()
- type NetStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetMonitor ¶
type NetMonitor struct { Running bool // Hold error if exists Err error LinuxNetDevDir string Interfaces []string // contains filtered or unexported fields }
NetMonitor: structure that hold methods to monitoring newtwork interfaces bandwidth.
func NetMonitorNew ¶
func NetMonitorNew(interf string, interval float64) (nt *NetMonitor, err error)
NetMonitorNew: Create a new structure that hold methods to monitoring newtwork interfaces.
func (*NetMonitor) GetAvailableInterfaces ¶
func (nt *NetMonitor) GetAvailableInterfaces() ([]string, error)
GetAvailableInterfaces: Getting all available interfaces
func (*NetMonitor) GetCurrInterface ¶
func (nt *NetMonitor) GetCurrInterface() string
func (*NetMonitor) SetInterface ¶
func (nt *NetMonitor) SetInterface(interf string) error
func (*NetMonitor) SetInterval ¶
func (nt *NetMonitor) SetInterval(interval float64)
func (*NetMonitor) Start ¶
func (nt *NetMonitor) Start(callback func(stats *NetStat))
func (*NetMonitor) Stop ¶
func (nt *NetMonitor) Stop()
Click to show internal directories.
Click to hide internal directories.