ifacemonitor

package
v0.0.0-...-27ed809 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 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

This section is empty.

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