cni

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToResult

func BytesToResult(data []byte) (*cnicurrent.Result, error)

func CreateNetNS

func CreateNetNS(name string) error

func DestroyNetNS

func DestroyNetNS(name string) error

func GetPodIP added in v0.8.0

func GetPodIP(result *cnicurrent.Result) string

GetPodIP retrieves the IP address of the pod as a string. It uses the first IPv4 address if finds. If it fails to determine the pod IP or the result argument is nil, it returns an empty string.

func PodNetNSPath

func PodNetNSPath(name string) string

func ReadConfiguration

func ReadConfiguration(configsDir string) (*libcni.NetworkConfig, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(pluginsDir, configsDir string) (*Client, error)

func (*Client) AddSandboxToNetwork

func (c *Client) AddSandboxToNetwork(podId, podName, podNs string) (*cnicurrent.Result, error)

func (*Client) GetDummyNetwork added in v0.9.0

func (c *Client) GetDummyNetwork() (*cnicurrent.Result, error)

GetDummyNetwork creates a dummy network using CNI plugin. It's used for making a dummy gateway for Calico CNI plugin.

func (*Client) RemoveSandboxFromNetwork

func (c *Client) RemoveSandboxFromNetwork(podId, podName, podNs string) error

func (*Client) Type added in v0.9.0

func (c *Client) Type() string

Jump to

Keyboard shortcuts

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