networkmonitor

package
v0.27.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkWatcher

type NetworkWatcher struct {
	// contains filtered or unexported fields
}

NetworkWatcher watches for changes in network configuration.

func New

func New() *NetworkWatcher

New creates a new network monitor.

func (*NetworkWatcher) Start

func (nw *NetworkWatcher) Start(ctx context.Context, callback func())

Start begins watching for network changes and calls the callback function and stops when a change is detected.

func (*NetworkWatcher) Stop

func (nw *NetworkWatcher) Stop()

Stop stops the network monitor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL