route

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package route provides the Cilium specific abstraction and useful helpers to manage network routes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(route Route) error

Delete removes a route. Does nothing for Darwin-based builds.

func Replace

func Replace(route Route, mtuConfig mtu.Configuration) error

Replace adds or replaces the specified route if necessary. Does nothing for Darwin-based builds.

Types

type ByMask

type ByMask []Route

ByMask is used to sort an array of routes by mask, narrow first.

func (ByMask) Len

func (a ByMask) Len() int

func (ByMask) Less

func (a ByMask) Less(i, j int) bool

func (ByMask) Swap

func (a ByMask) Swap(i, j int)

type Route

type Route struct {
	Prefix  net.IPNet
	Nexthop *net.IP
	Local   net.IP
	Device  string
	MTU     int
	Proto   int
	Scope   netlink.Scope
	Table   int
	Type    int
}

func (*Route) LogFields

func (r *Route) LogFields() logrus.Fields

LogFields returns the route attributes as logrus.Fields map

func (*Route) ToIPCommand

func (r *Route) ToIPCommand(dev string) []string

ToIPCommand converts the route into a full "ip route ..." command

Jump to

Keyboard shortcuts

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