testutils

package
v0.0.0-...-073df9a Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdAdd

func CmdAdd(cniNetns, cniContainerID, cniIfname string, conf []byte, f func() error) (types.Result, []byte, error)

func CmdAddWithArgs

func CmdAddWithArgs(args *skel.CmdArgs, f func() error) (types.Result, []byte, error)

func CmdDel

func CmdDel(cniNetns, cniContainerID, cniIfname string, f func() error) error

func CmdDelWithArgs

func CmdDelWithArgs(args *skel.CmdArgs, f func() error) error

func NewNS

func NewNS() (ns.NetNS, error)

Creates a new persistent (bind-mounted) network namespace and returns an object representing that namespace, without switching to it.

func Ping

func Ping(saddr, daddr string, isV6 bool, timeoutSec int) error

Ping shells out to the `ping` command. Returns nil if successful.

func UnmountNS

func UnmountNS(ns ns.NetNS) error

UnmountNS unmounts the NS held by the netns object

Types

type BadReader

type BadReader struct {
	Error error
}

BadReader is an io.Reader which always errors

func (*BadReader) Close

func (r *BadReader) Close() error

func (*BadReader) Read

func (r *BadReader) Read(buffer []byte) (int, error)

Directories

Path Synopsis
Echosvr is a simple TCP echo server
Echosvr is a simple TCP echo server

Jump to

Keyboard shortcuts

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