mocklink

package
v0.0.0-...-fcf6736 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

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

Handle provides a mock netlink handle that satisfies the netlinker interface Any method which typically reads or manipulates kernel state, should be overridden to maintain an in-memory mock state.

func NewHandle

func NewHandle() *Handle

NewHandle returns a new mocklink handle

func (*Handle) RouteAdd

func (h *Handle) RouteAdd(route *netlink.Route) error

RouteAdd adds a new route to mocklink

func (*Handle) RouteDel

func (h *Handle) RouteDel(route *netlink.Route) error

RouteDel deletes a route from mocklink

func (*Handle) RouteListFiltered

func (h *Handle) RouteListFiltered(family int, route *netlink.Route, flags uint64) ([]netlink.Route, error)

RouteListFiltered returns a filtered list of routes from mocklink

Jump to

Keyboard shortcuts

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