Documentation ¶
Index ¶
- type CNIConfigInfo
- type CNIPodInfoCache
- func (c *CNIPodInfoCache) AddCNIConfigInfo(CNIConfig *CNIConfigInfo)
- func (c *CNIPodInfoCache) DeleteCNIConfigInfo(CNIConfig *CNIConfigInfo)
- func (c *CNIPodInfoCache) GetAllCNIConfigInfoPerPod(podName, podNamespace string) []*CNIConfigInfo
- func (c *CNIPodInfoCache) GetCNIConfigInfoByContainerID(podName, podNamespace, containerID string) *CNIConfigInfo
- func (c *CNIPodInfoCache) GetValidCNIConfigInfoPerPod(podName, podNamespace string) *CNIConfigInfo
- func (c *CNIPodInfoCache) SetPodCNIDeleted(CNIConfig *CNIConfigInfo)
- type CNIPodInfoStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CNIConfigInfo ¶
type CNIConfigInfo struct { CNIVersion string PodName string PodNameSpace string ContainerID string ContainerNetNS string MTU int PodCNIDeleted bool // Uses interface name as a key and the network/CNI config (obtained from network-attachment-definition) as value. // NOTE: Interface specific network/CNI config required to be maintained for IPAM clean-up needs. NetworkConfig map[string][]byte }
type CNIPodInfoCache ¶
type CNIPodInfoCache struct { // Mutex to protect CNIConfigInfo.PodCNIDeleted which is written by CNIServer, and read by // the secondary network Pod controller. sync.RWMutex // contains filtered or unexported fields }
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) }
func NewCNIPodInfoStore ¶
func NewCNIPodInfoStore() CNIPodInfoStore
Click to show internal directories.
Click to hide internal directories.