Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStopped = errors.New("monitor has been stopped")
Functions ¶
This section is empty.
Types ¶
type NetworkMonitor ¶ added in v0.27.8
type NetworkMonitor struct {
// contains filtered or unexported fields
}
NetworkMonitor watches for changes in network configuration.
func (*NetworkMonitor) Start ¶ added in v0.27.8
func (nw *NetworkMonitor) Start(ctx context.Context, callback func()) (err error)
Start begins monitoring network changes. When a change is detected, it calls the callback asynchronously and returns.
func (*NetworkMonitor) Stop ¶ added in v0.27.8
func (nw *NetworkMonitor) Stop()
Stop stops the network monitor.
Click to show internal directories.
Click to hide internal directories.