package libcni
import "github.com/containernetworking/cni/libcni"
Index ¶
- func ConfFiles(dir string, extensions []string) ([]string, error)
- type CNI
- type CNIConfig
- func (c *CNIConfig) AddNetwork(net *NetworkConfig, rt *RuntimeConf) (types.Result, error)
- func (c *CNIConfig) AddNetworkList(list *NetworkConfigList, rt *RuntimeConf) (types.Result, error)
- func (c *CNIConfig) DelNetwork(net *NetworkConfig, rt *RuntimeConf) error
- func (c *CNIConfig) DelNetworkList(list *NetworkConfigList, rt *RuntimeConf) error
- func (c *CNIConfig) GetVersionInfo(pluginType string) (version.PluginInfo, error)
- type NetworkConfig
- func ConfFromBytes(bytes []byte) (*NetworkConfig, error)
- func ConfFromFile(filename string) (*NetworkConfig, error)
- func InjectConf(original *NetworkConfig, newValues map[string]interface{}) (*NetworkConfig, error)
- func LoadConf(dir, name string) (*NetworkConfig, error)
- type NetworkConfigList
- func ConfListFromBytes(bytes []byte) (*NetworkConfigList, error)
- func ConfListFromConf(original *NetworkConfig) (*NetworkConfigList, error)
- func ConfListFromFile(filename string) (*NetworkConfigList, error)
- func LoadConfList(dir, name string) (*NetworkConfigList, error)
- type NoConfigsFoundError
- type NotFoundError
- type RuntimeConf
Functions ¶
func ConfFiles ¶
Types ¶
type CNI ¶
type CNI interface { AddNetworkList(net *NetworkConfigList, rt *RuntimeConf) (types.Result, error) DelNetworkList(net *NetworkConfigList, rt *RuntimeConf) error 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) AddNetworkList ¶
func (c *CNIConfig) AddNetworkList(list *NetworkConfigList, rt *RuntimeConf) (types.Result, error)
AddNetworkList executes a sequence of plugins 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) DelNetworkList ¶
func (c *CNIConfig) DelNetworkList(list *NetworkConfigList, rt *RuntimeConf) error
DelNetworkList executes a sequence of plugins with the DEL command
func (*CNIConfig) GetVersionInfo ¶
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 ¶
func ConfFromBytes ¶
func ConfFromBytes(bytes []byte) (*NetworkConfig, error)
func ConfFromFile ¶
func ConfFromFile(filename string) (*NetworkConfig, error)
func InjectConf ¶
func InjectConf(original *NetworkConfig, newValues map[string]interface{}) (*NetworkConfig, error)
func LoadConf ¶
func LoadConf(dir, name string) (*NetworkConfig, error)
type NetworkConfigList ¶
type NetworkConfigList struct { Name string CNIVersion string Plugins []*NetworkConfig Bytes []byte }
func ConfListFromBytes ¶
func ConfListFromBytes(bytes []byte) (*NetworkConfigList, error)
func ConfListFromConf ¶
func ConfListFromConf(original *NetworkConfig) (*NetworkConfigList, error)
ConfListFromConf "upconverts" a network config in to a NetworkConfigList, with the single network as the only entry in the list.
func ConfListFromFile ¶
func ConfListFromFile(filename string) (*NetworkConfigList, error)
func LoadConfList ¶
func LoadConfList(dir, name string) (*NetworkConfigList, error)
type NoConfigsFoundError ¶
type NoConfigsFoundError struct { Dir string }
func (NoConfigsFoundError) Error ¶
func (e NoConfigsFoundError) Error() string
type NotFoundError ¶
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type RuntimeConf ¶
type RuntimeConf struct { ContainerID string NetNS string IfName string Args [][2]string // A dictionary of capability-specific data passed by the runtime // to plugins as top-level keys in the 'runtimeConfig' dictionary // of the plugin's stdin data. libcni will ensure that only keys // in this map which match the capabilities of the plugin are passed // to the plugin CapabilityArgs map[string]interface{} }
Source Files ¶
- Version
- v0.6.0
- Published
- Jul 28, 2017
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- 1 day ago –
Tools for package owners.