Documentation ¶
Overview ¶
Package monitor provides facilities for monitoring network interface and route changes. It primarily exists to know when portable devices move between different networks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeFunc ¶
type ChangeFunc func()
ChangeFunc is a callback function that's called when an interface status changes.
type Mon ¶
type Mon struct {
// contains filtered or unexported fields
}
Mon represents a monitoring instance.
func New ¶
func New(logf logger.Logf, callback ChangeFunc) (*Mon, error)
New instantiates and starts a monitoring instance. Change notifications are propagated to the callback function. The returned monitor is inactive until it's started by the Start method.
Click to show internal directories.
Click to hide internal directories.