libcni

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfFiles

func ConfFiles(dir string) ([]string, error)

Types

type CNI

type CNI interface {
	AddNetwork(net *NetworkConfig, rt *RuntimeConf) (*types.Result, error)
	DelNetwork(net *NetworkConfig, rt *RuntimeConf) error
}

type CNIConfig

type CNIConfig struct {
	Path []string
}

func (*CNIConfig) AddNetwork

func (c *CNIConfig) AddNetwork(net *NetworkConfig, rt *RuntimeConf) (*types.Result, error)

AddNetwork executes the plugin with the ADD command

func (*CNIConfig) DelNetwork

func (c *CNIConfig) DelNetwork(net *NetworkConfig, rt *RuntimeConf) error

DelNetwork executes the plugin with the DEL command

func (*CNIConfig) GetVersionInfo added in v0.4.0

func (c *CNIConfig) GetVersionInfo(pluginType string) (version.PluginInfo, error)

GetVersionInfo reports which versions of the CNI spec are supported by the given plugin.

type NetworkConfig

type NetworkConfig struct {
	Network *types.NetConf
	Bytes   []byte
}

func ConfFromBytes

func ConfFromBytes(bytes []byte) (*NetworkConfig, error)

func ConfFromFile

func ConfFromFile(filename string) (*NetworkConfig, error)

func InjectConf added in v0.4.0

func InjectConf(original *NetworkConfig, key string, newValue interface{}) (*NetworkConfig, error)

func LoadConf

func LoadConf(dir, name string) (*NetworkConfig, error)

type RuntimeConf

type RuntimeConf struct {
	ContainerID string
	NetNS       string
	IfName      string
	Args        [][2]string
}

Jump to

Keyboard shortcuts

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