cni

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultNetDir default directory for the cni config
	DefaultNetDir = "/etc/cni/net.d"
	// DefaultCNIDir default directory for the cni binary
	DefaultCNIDir = "/opt/cni/bin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentTuple added in v0.1.9

type AttachmentTuple struct {
	PodName     string
	NetworkName string
}

AttachmentTuple the attachment tuple for the cni-plugin

type NetworkPlugin

type NetworkPlugin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NetworkPlugin object to export

func NewCNIPlugin

func NewCNIPlugin(cniBinPath, cniConfPath, cniVendorName string) (*NetworkPlugin, error)

NewCNIPlugin instantiate a cni plugin object

func (*NetworkPlugin) AddNetwork

func (plugin *NetworkPlugin) AddNetwork(cniParams *Parameters) error

AddNetwork add a network attachment off cniParams

func (*NetworkPlugin) DeleteNetwork

func (plugin *NetworkPlugin) DeleteNetwork(cniParams *Parameters) error

DeleteNetwork delete a network attachment off cniParams

type Parameters

type Parameters struct {
	Namespace   string
	PodName     string
	SandboxID   string
	NetnsPath   string
	NetworkName string
	IfMAC       string
}

Parameters the params struct for the cni-plugin

Jump to

Keyboard shortcuts

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