routetable

package
v0.0.0-...-712e5b7 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetFailed       = errors.New("netlink get operation failed")
	ListFailed      = errors.New("netlink list operation failed")
	UpdateFailed    = errors.New("netlink update operation failed")
	IfaceNotPresent = errors.New("interface not present")
	IfaceDown       = errors.New("interface down")
	IfaceGrace      = errors.New("interface in cleanup grace period")
)

Functions

This section is empty.

Types

type RouteTable

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

func New

func New(interfacePrefixes []string, ipVersion uint8) *RouteTable

func NewWithShims

func NewWithShims(interfacePrefixes []string, ipVersion uint8, dpShim dataplaneIface, timeShim timeIface) *RouteTable

NewWithShims is a test constructor, which allows netlink, arp and time to be replaced by shims.

func (*RouteTable) Apply

func (r *RouteTable) Apply() error

func (*RouteTable) OnIfaceStateChanged

func (r *RouteTable) OnIfaceStateChanged(ifaceName string, state ifacemonitor.State)

func (*RouteTable) QueueResync

func (r *RouteTable) QueueResync()

func (*RouteTable) SetRoutes

func (r *RouteTable) SetRoutes(ifaceName string, targets []Target)

type Target

type Target struct {
	CIDR    ip.CIDR
	DestMAC net.HardwareAddr
}

Jump to

Keyboard shortcuts

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