netmon

package
v3.0.0-rc21 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package netmon is responsible for monitoring network link and IP address changes via netlink and publishing them as pubsub events.

It starts after nmon and waits for node.StatusData.GetByNode(t.localhost) to return a non-nil and non-zero value before starting the netlink listener.

The netlink monitor subscribes to RTMGRP_LINK, RTMGRP_IPV4_IFADDR, and RTMGRP_IPV6_IFADDR groups to receive real-time notifications of link and address changes, equivalent to "ip monitor link address label".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalIPs

func GetLocalIPs() ([]net.IP, error)

GetLocalIPs returns all non-loopback IP addresses assigned to the local node

Types

type Manager

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

func NewManager

func NewManager(drainDuration time.Duration, subQS pubsub.QueueSizer) *Manager

func (*Manager) Start

func (t *Manager) Start(parent context.Context) error

Start launches the netmon worker goroutine

func (*Manager) Stop

func (t *Manager) Stop() error

Jump to

Keyboard shortcuts

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