v1.15.1 Latest Latest

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type CNIConfigInfo

type CNIConfigInfo struct {
	PodName        string
	PodNamespace   string
	ContainerID    string
	ContainerNetNS string
	PodCNIDeleted  bool
	// Interfaces is a map that stores the secondary interface information with interface
	// name to be the key.
	Interfaces map[string]*InterfaceInfo

type CNIPodInfoCache

type CNIPodInfoCache struct {
	// Mutex to protect CNIConfigInfo.PodCNIDeleted which is written by CNIServer, and read by
	// the secondary network Pod controller.
	// contains filtered or unexported fields

func NewCNIPodInfoStore

func NewCNIPodInfoStore() *CNIPodInfoCache

func (*CNIPodInfoCache) AddCNIConfigInfo

func (c *CNIPodInfoCache) AddCNIConfigInfo(cniConfig *CNIConfigInfo)

Add CNIPodInfo to local cache store.

func (*CNIPodInfoCache) DeleteCNIConfigInfo

func (c *CNIPodInfoCache) DeleteCNIConfigInfo(cniConfig *CNIConfigInfo)

Delete CNIPodInfo from local cache store.

func (*CNIPodInfoCache) GetAllCNIConfigInfoPerPod

func (c *CNIPodInfoCache) GetAllCNIConfigInfoPerPod(podName, podNamespace string) []*CNIConfigInfo

Retrieve all CNIConfigInfo from cacheStore for the given podName and its Namespace NOTE: In an ideal scenario, there should be one cache entry per Pod name and namespace.

func (*CNIPodInfoCache) GetCNIConfigInfoByContainerID

func (c *CNIPodInfoCache) GetCNIConfigInfoByContainerID(podName, podNamespace, containerID string) *CNIConfigInfo

func (*CNIPodInfoCache) GetValidCNIConfigInfoPerPod

func (c *CNIPodInfoCache) GetValidCNIConfigInfoPerPod(podName, podNamespace string) *CNIConfigInfo

Retrieve a valid CNI cache (PodCNIDeleted is not true) entry for the given Pod name and namespace.

func (*CNIPodInfoCache) SetPodCNIDeleted

func (c *CNIPodInfoCache) SetPodCNIDeleted(cniConfig *CNIConfigInfo)

type CNIPodInfoStore

type CNIPodInfoStore interface {
	AddCNIConfigInfo(cniConfig *CNIConfigInfo)
	DeleteCNIConfigInfo(cniConfig *CNIConfigInfo)
	GetValidCNIConfigInfoPerPod(podName, podNamespace string) *CNIConfigInfo
	GetAllCNIConfigInfoPerPod(podName, podNamespace string) []*CNIConfigInfo
	GetCNIConfigInfoByContainerID(podName, podNamespace, containerID string) *CNIConfigInfo
	SetPodCNIDeleted(CNIConfig *CNIConfigInfo)

type InterfaceInfo added in v1.14.0

type InterfaceInfo struct {
	NetworkType       NetworkType
	HostInterfaceName string
	// OVS port UUID for a VLAN interface.
	OVSPortUUID string

type NetworkType added in v1.14.0

type NetworkType string

Jump to

Keyboard shortcuts

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