Documentation ¶
Index ¶
- func BytesToResult(data []byte) (*cnicurrent.Result, error)
- func CreateNetNS(name string) error
- func DestroyNetNS(name string) error
- func GetPodIP(result *cnicurrent.Result) string
- func PodNetNSPath(name string) string
- func ReadConfiguration(configsDir string) (*libcni.NetworkConfig, error)
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToResult ¶
func BytesToResult(data []byte) (*cnicurrent.Result, error)
func CreateNetNS ¶
func DestroyNetNS ¶
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 ReadConfiguration ¶
func ReadConfiguration(configsDir string) (*libcni.NetworkConfig, error)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
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 ¶
Click to show internal directories.
Click to hide internal directories.