netmonitor

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 8 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     *OptionsLink
	Addr     *OptionsAddr
	Route    *OptionsRoute
	Nftables *OptionsNftables
}

Options defines the options for the network monitoring.

type OptionsAddr

type OptionsAddr struct {
	Create bool
	Delete bool
}

OptionsAddr defines the options for the addresses monitoring.

type OptionsLink struct {
	Create bool
	Delete bool
	Modify bool
}

OptionsLink defines the options for the links monitoring.

type OptionsNftables

type OptionsNftables struct {
	Create bool
	Delete bool
}

OptionsNftables defines the options for the nftables monitoring.

type OptionsRoute

type OptionsRoute struct {
	Create bool
	Delete bool
}

OptionsRoute defines the options for the routes monitoring.

Jump to

Keyboard shortcuts

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