route

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouterRoute

func RegisterRouterRoute(router *mux.Router)

Types

type Route

type Route struct {
	Action  string `json:"action"`
	Link    string `json:"link"`
	Gateway string `json:"gateway"`
	OnLink  string `json:"onlink"`
}

func (*Route) AddDefaultGateWay

func (rt *Route) AddDefaultGateWay() error

func (*Route) Configure

func (rt *Route) Configure() error

func (*Route) RemoveGateWay

func (rt *Route) RemoveGateWay() error

func (*Route) ReplaceDefaultGateWay

func (rt *Route) ReplaceDefaultGateWay() error

type RouteInfo

type RouteInfo struct {
	LinkName   string `json:"LinkName"`
	LinkIndex  int    `json:"LinkIndex"`
	ILinkIndex int    `json:"ILinkIndex"`
	Scope      int    `json:"Scope"`
	Dst        struct {
		IP   string `json:"IP"`
		Mask int    `json:"Mask"`
	} `json:"Dst"`
	Src       string   `json:"Src"`
	Gw        string   `json:"Gw"`
	MultiPath string   `json:"MultiPath"`
	Protocol  int      `json:"Protocol"`
	Priority  int      `json:"Priority"`
	Table     int      `json:"Table"`
	Type      int      `json:"Type"`
	Tos       int      `json:"Tos"`
	Flags     []string `json:"Flags"`
	MPLSDst   string   `json:"MPLSDst"`
	NewDst    string   `json:"NewDst"`
	Encap     string   `json:"Encap"`
	Mtu       int      `json:"MTU"`
	AdvMSS    int      `json:"AdvMSS"`
	Hoplimit  int      `json:"Hoplimit"`
}

func AcquireRoutes

func AcquireRoutes() ([]RouteInfo, error)

Jump to

Keyboard shortcuts

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