ifacemonitor

package
v3.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateUp   = "up"
	StateDown = "down"
)

Variables

This section is empty.

Functions

func IsInterfacePresent

func IsInterfacePresent(name string) bool

Types

type AddrStateCallback

type AddrStateCallback func(ifaceName string, addrs set.Set)

type Config

type Config struct {
	// List of interface names that dataplane receives no callbacks from them.
	InterfaceExcludes []string
}

type InterfaceMonitor

type InterfaceMonitor struct {
	Config

	Callback     InterfaceStateCallback
	AddrCallback AddrStateCallback
	// contains filtered or unexported fields
}

func New

func New(config Config) *InterfaceMonitor

func NewWithStubs

func NewWithStubs(config Config, netlinkStub netlinkStub, resyncC <-chan time.Time) *InterfaceMonitor

func (*InterfaceMonitor) MonitorInterfaces

func (m *InterfaceMonitor) MonitorInterfaces()

type InterfaceStateCallback

type InterfaceStateCallback func(ifaceName string, ifaceState State)

type State

type State string

Jump to

Keyboard shortcuts

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