testing

package
v1.7.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCNIPlugin

type FakeCNIPlugin struct {
	StatusErr error
	LoadErr   error
}

FakeCNIPlugin is a fake plugin used for test.

func NewFakeCNIPlugin

func NewFakeCNIPlugin() *FakeCNIPlugin

NewFakeCNIPlugin create a FakeCNIPlugin.

func (*FakeCNIPlugin) Check added in v1.6.0

func (f *FakeCNIPlugin) Check(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) error

Check the network of PodSandbox.

func (*FakeCNIPlugin) GetConfig

func (f *FakeCNIPlugin) GetConfig() *cni.ConfigResult

GetConfig returns a copy of the CNI plugin configurations as parsed by CNI

func (*FakeCNIPlugin) Load

func (f *FakeCNIPlugin) Load(opts ...cni.Opt) error

Load loads the network config.

func (*FakeCNIPlugin) Remove

func (f *FakeCNIPlugin) Remove(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) error

Remove teardown the network of PodSandbox.

func (*FakeCNIPlugin) Setup

func (f *FakeCNIPlugin) Setup(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error)

Setup setups the network of PodSandbox.

func (*FakeCNIPlugin) SetupSerially added in v1.6.5

func (f *FakeCNIPlugin) SetupSerially(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error)

SetupSerially sets up the network of PodSandbox without doing the interfaces in parallel.

func (*FakeCNIPlugin) Status

func (f *FakeCNIPlugin) Status() error

Status get the status of the plugin.

Jump to

Keyboard shortcuts

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