cniapi

package
v0.0.0-...-a17b09b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CniStatusSuccess : success return code
	CniStatusSuccess = 0
	// CniStatusErrorIncompatibleVersion : error return code
	CniStatusErrorIncompatibleVersion = 1
	// CniStatusErrorUnsupportedField : error return code
	CniStatusErrorUnsupportedField = 2

	// LabelTenantName : contiv tenant label
	LabelTenantName = "io.contiv.tenant"
	// LabelNetworkName : contiv network label
	LabelNetworkName = "io.contiv.network"
	// LabelNetworkGroup : contiv group label
	LabelNetworkGroup = "io.contiv.net-group"

	// CniDefaultVersion : CNI version
	CniDefaultVersion = "0.2"

	// EnvVarMesosAgent : MESOS env. variable
	EnvVarMesosAgent = "MESOS_AGENT_ENDPOINT"

	// CniCmdAdd : CNI commands
	CniCmdAdd = "ADD"
	// CniCmdDel : CNI commands
	CniCmdDel = "DEL"
)
View Source
const ContivMesosSocket = "/run/contiv/contiv-mesos.sock"

ContivMesosSocket : netplugin socket file

View Source
const MesosNwIntfAdd = "/MesosNwIntfAdd"

MesosNwIntfAdd : endpoint handling network interface add

View Source
const MesosNwIntfDel = "/MesosNwIntfDel"

MesosNwIntfDel : endpoint handling network interface delete

View Source
const PluginPath = "/run/contiv"

PluginPath : netplugin socket dir

Variables

This section is empty.

Functions

This section is empty.

Types

type CniCmdErrorResp

type CniCmdErrorResp struct {
	CniVersion string `json:"cniVersion,omitempty"`
	ErrCode    int32  `json:"code,omitempty"`
	ErrMsg     string `json:"msg,omitempty"`
	ErrDetails string `json:"details,omitempty"`
}

CniCmdErrorResp contains error message from netplugin

type CniCmdReqAttr

type CniCmdReqAttr struct {
	CniIfname      string         `json:"cni_ifname,omitempty"`
	CniNetns       string         `json:"cni_netns,omitempty"`
	CniContainerid string         `json:"cni_containerid,omitempty"`
	Labels         NetpluginLabel `json:"labels,omitempty"`
}

CniCmdReqAttr contains CNI attributes passed to netplugin

type CniCmdSuccessResp

type CniCmdSuccessResp struct {
	CniVersion string    `json:"cniVersion,omitempty"`
	IP4        CniIpaddr `json:"ip4"`
	IP6        CniIpaddr `json:"ip6"`
	DNS        CniDNS    `json:"dns,omitempty"`
}

CniCmdSuccessResp contains the response from netplugin

type CniDNS

type CniDNS struct {
	NameServers []string `json:"nameservers,omitempty"`
	Domain      string   `json:"domain,omitempty"`
	Search      []string `json:"search,omitempty"`
	Options     []string `json:"options,omitempty"`
}

CniDNS contains DNS information from netplugin

type CniIpaddr

type CniIpaddr struct {
	IPAddress string   `json:"ip"`
	Gateway   string   `json:"gateway,omitempty"`
	Routes    []string `json:"routes,omitempty"`
}

CniIpaddr contains ip/gwy/route from netplugin

type NetpluginLabel

type NetpluginLabel struct {
	TenantName   string `json:"io.contiv.tenant,omitempty"`
	NetworkName  string `json:"io.contiv.network,omitempty"`
	NetworkGroup string `json:"io.contiv.net-group,omitempty"`
}

NetpluginLabel : netplugin labels

type NetworkLabel

type NetworkLabel struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

NetworkLabel : network labels from Mesos

Jump to

Keyboard shortcuts

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