contiv

package
v0.0.0-...-792cabc Latest Latest
Warning

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

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

Documentation

Overview

Package contiv implements plugin providing GRPC-server that accepts requests from CNI plugin.

+-------------------------------------------------+ | vSwitch VPP host.go | +--------------+ | +--------------+ | | vethVPP |____________| veth Host | | routing | | | | | | +--------------+ | +--------------+ | +------+ +------+ | | | AF1 | | AFn | | | | | ... | | | | +------+ +------+ | | ^ | | | | +------|------------------------------------------+

v

+------------+ | | | Veth2 | | | +------------+

^
|                   pod.go

+------|------------+ | NS1 v | | +------------+ | | | | | | | Veth1 | | | | | | | +------------+ | | | +-------------------+

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// GetIfName looks up logical interface name that corresponds to the interface
	// associated with the given pod.
	GetIfName(podNamespace string, podName string) (name string, exists bool)
}

API for other plugins to query network-related information.

type Config

type Config struct {
	IPAMConfig ipam.Config
}

Config is configuration for Contiv plugin. It can be injected or loaded from external config. Injection has priority to external config. To use external config add `<Contiv plugin name> + "-config="<absolute path to config>` in go run command flags.

type Deps

Deps groups the dependencies of the Plugin.

type Plugin

type Plugin struct {
	Deps

	Config *Config
	// contains filtered or unexported fields
}

Plugin transforms GRPC requests into configuration for the VPP in order to connect a container into the network.

func (*Plugin) AfterInit

func (plugin *Plugin) AfterInit() error

AfterInit registers to the ResyncOrchestrator. The registration is done in this phase in order to trigger the resync for this plugin once the resync of defaultVPP plugins is finished.

func (*Plugin) Close

func (plugin *Plugin) Close() error

Close cleans up the resources allocated by the plugin

func (*Plugin) GetIfName

func (plugin *Plugin) GetIfName(podNamespace string, podName string) (name string, exists bool)

GetIfName looks up logical interface name that corresponds to the interface associated with the given pod.

func (*Plugin) Init

func (plugin *Plugin) Init() error

Init initializes the grpc server handling the request from the CNI.

Directories

Path Synopsis
bin_api
session
Code generated by govpp binapi-generator DO NOT EDIT.
Code generated by govpp binapi-generator DO NOT EDIT.
stn
Code generated by govpp binapi-generator DO NOT EDIT.
Code generated by govpp binapi-generator DO NOT EDIT.
Package containeridx implements a mapping structure that allows to store configured container networking.
Package containeridx implements a mapping structure that allows to store configured container networking.
Package ipam is responsible for IP addresses management
Package ipam is responsible for IP addresses management
model
cni
Package cni is a generated protocol buffer package.
Package cni is a generated protocol buffer package.
uid
Package uid is a generated protocol buffer package.
Package uid is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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