plugins

package
v0.0.0-...-8023bdc Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNetworkPlugin

func RegisterNetworkPlugin(name string, networkPlugin Factory)

RegisterNetworkPlugin registers a networkplugin.Factory by name. This is expected to happen during app startup.

Types

type Factory

type Factory func() (PluginInterface, error)

Factory is a function that returns a networkplugin.Interface. The config parameter provides an io.Reader handler to the factory in order to load specific configurations. If no configuration is provided the parameter is nil.

type PluginInterface

type PluginInterface interface {
	SetupInterface(podName, podInfraContainerID string, port *ports.Port, ipcidr, gateway, ifName, netns string) (*current.Interface, *current.Interface, error)
	DestroyInterface(podName, podInfraContainerID string, port *ports.Port) error
	Init(integrationBridge string) error
}

func GetNetworkPlugin

func GetNetworkPlugin(name string) (PluginInterface, error)

GetNetworkPlugin creates an instance of the named network plugin, or nil if the name is not known. The error return is only used if the named plugin was known but failed to initialize.

func InitNetworkPlugin

func InitNetworkPlugin(name string) (PluginInterface, error)

InitNetworkPlugin creates an instance of the named networkPlugin plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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