cni

package
v1.20.10 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetManager

func NewNetManager(binpath, confpath string) network.NetManager

NewNetManager create cni plugin manager

func NewPlugin

func NewPlugin(binpath, confFile string) (string, network.NetworkPlugin)

NewPlugin loading config for designated cni command line tool

Types

type CNIPlugin

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

CNIPlugin plugin for cni

func (*CNIPlugin) Init

func (plugin *CNIPlugin) Init(host string) error

Init init Plugin

func (*CNIPlugin) Name

func (plugin *CNIPlugin) Name() string

Name Get plugin name

func (*CNIPlugin) SetUpPod

func (plugin *CNIPlugin) SetUpPod(podInfo container.Pod) error

SetUpPod Setup Network info for pod

func (*CNIPlugin) TearDownPod

func (plugin *CNIPlugin) TearDownPod(podInfo container.Pod) error

TearDownPod Teardown pod network info

type PluginManager

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

PluginManager manager for all cni plugins

func (*PluginManager) AddPlugin

func (manager *PluginManager) AddPlugin(name string, plugin network.NetworkPlugin) error

AddPlugin Add plugin to manager dynamic if necessary

func (*PluginManager) GetPlugin

func (manager *PluginManager) GetPlugin(name string) network.NetworkPlugin

GetPlugin get plugin by name

func (*PluginManager) Init

func (manager *PluginManager) Init() error

Init loading all configuration in directory

func (*PluginManager) SetUpPod

func (manager *PluginManager) SetUpPod(podInfo container.Pod) error

SetUpPod for setting Pod network interface

func (*PluginManager) Stop

func (manager *PluginManager) Stop()

Stop manager stop if necessary

func (*PluginManager) TearDownPod

func (manager *PluginManager) TearDownPod(podInfo container.Pod) error

TearDownPod for release pod network resource

Jump to

Keyboard shortcuts

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