netmonitor

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package netmonitor is a package that allows to monitor changes in the network interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterfacesMonitoring

func InterfacesMonitoring(ctx context.Context, eventChannel chan event.GenericEvent, options *Options) error

InterfacesMonitoring starts the monitoring of the network interfaces. If there is a change in the network interfaces, it will send a message to the channel. With the options, you can choose to monitor only the link, address, or route changes (default: all options are true).

Types

type Options

type Options struct {
	Link  bool
	Addr  bool
	Route bool
}

Options defines the options for the interfaces monitoring. If the option is true, the monitoring will be enabled for that type of change. Possible options are: link, address, route.

Jump to

Keyboard shortcuts

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