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 ¶
OptionsAddr defines the options for the addresses monitoring.
type OptionsLink ¶
OptionsLink defines the options for the links monitoring.
type OptionsNftables ¶
OptionsNftables defines the options for the nftables monitoring.
type OptionsRoute ¶
OptionsRoute defines the options for the routes monitoring.