network

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: EPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages network interface detection and IP address management

func GetInstance

func GetInstance() *Manager

GetInstance returns the singleton Network Interface Manager instance

func (*Manager) GetAvailableNetworkInterfaces

func (m *Manager) GetAvailableNetworkInterfaces() []string

GetAvailableNetworkInterfaces returns available non-loopback interface names.

func (*Manager) GetCurrentIPAddress

func (m *Manager) GetCurrentIPAddress() string

GetCurrentIPAddress returns the current IP address

func (*Manager) GetHostName

func (m *Manager) GetHostName() string

GetHostName returns the hostname

func (*Manager) GetModuleIndex

func (m *Manager) GetModuleIndex() int

GetModuleIndex returns the module index (Network Interface Manager doesn't have a specific index)

func (*Manager) GetName

func (m *Manager) GetName() string

GetName returns the module name

func (*Manager) GetNetworkInterface

func (m *Manager) GetNetworkInterface() *NetworkInterfaceInfo

GetNetworkInterface returns the network interface information

func (*Manager) GetPID

func (m *Manager) GetPID() int

GetPID returns the process ID

func (*Manager) Start

func (m *Manager) Start() error

Start starts the Network Interface Manager

func (*Manager) Stop

func (m *Manager) Stop() error

Stop stops the Network Interface Manager

func (*Manager) UpdateNetworkInterface

func (m *Manager) UpdateNetworkInterface() error

UpdateNetworkInterface updates the network interface information

func (*Manager) ValidateNetworkInterfaceConfig

func (m *Manager) ValidateNetworkInterfaceConfig(controllerURL, networkInterfaceConfig string) error

ValidateNetworkInterfaceConfig validates whether a config update can use the requested network interface without mutating manager state.

type NetworkInterfaceInfo

type NetworkInterfaceInfo struct {
	Interface *net.Interface
	Address   net.IP
}

NetworkInterfaceInfo contains information about a network interface NetworkInterfaceInfo describes a network interface on the host.

Jump to

Keyboard shortcuts

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