config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const InterfaceByIndex = 1
View Source
const InterfaceByName = 2
View Source
const InterfaceByPhysAddress = 3

Variables

This section is empty.

Functions

func GetInterfaceIndexKey

func GetInterfaceIndexKey(index int32) string

func GetInterfaceNameKey

func GetInterfaceNameKey(name string) string

func GetInterfacePhysAddressKey

func GetInterfacePhysAddressKey(physAddress string) string

Types

type Host

type Host struct {
	Name               string
	IpAddress          string
	PingEnabled        bool
	PingTimeoutSeconds int
	PingCount          int
	PingUseIcmp        bool
	SnmpEnabled        bool
	NetInterfaces      map[string]*NetInterface
}

func (*Host) AddNetInterfaceByIndex

func (h *Host) AddNetInterfaceByIndex(index int32) *NetInterface

func (*Host) AddNetInterfaceByName

func (h *Host) AddNetInterfaceByName(name string) *NetInterface

func (*Host) AddNetInterfaceByPhysicalAddress

func (h *Host) AddNetInterfaceByPhysicalAddress(physAddress string) *NetInterface

type NetInterface

type NetInterface struct {
	Index              int32
	Name               string
	PhysAddress        string
	IdentificationMode int
	// contains filtered or unexported fields
}

func (*NetInterface) AddOnIpAddressChangeListener

func (i *NetInterface) AddOnIpAddressChangeListener(eventListener func(event events.HostInterfaceAddressChangeEvent))

func (*NetInterface) OnAddressChangeListeners

func (i *NetInterface) OnAddressChangeListeners() []func(event events.HostInterfaceAddressChangeEvent)

func (*NetInterface) TrackingName

func (i *NetInterface) TrackingName() string

type PluginConfig

type PluginConfig struct {
	Hosts []Host
}

func (*PluginConfig) AddHost

func (c *PluginConfig) AddHost(name string, ipAddress string) *Host

Jump to

Keyboard shortcuts

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