package containermap
import "k8s.io/kubernetes/pkg/kubelet/cm/containermap"
Index ¶
- type ContainerMap
- func NewContainerMap() ContainerMap
- func (cm ContainerMap) Add(podUID, containerName, containerID string)
- func (cm ContainerMap) Clone() ContainerMap
- func (cm ContainerMap) GetContainerID(podUID, containerName string) (string, error)
- func (cm ContainerMap) GetContainerRef(containerID string) (string, string, error)
- func (cm ContainerMap) RemoveByContainerID(containerID string)
- func (cm ContainerMap) RemoveByContainerRef(podUID, containerName string)
- func (cm ContainerMap) Visit(visitor func(podUID, containerName, containerID string))
Types ¶
type ContainerMap ¶
type ContainerMap map[string]cmItem
ContainerMap maps (containerID)->(podUID, containerName)
func NewContainerMap ¶
func NewContainerMap() ContainerMap
NewContainerMap creates a new ContainerMap struct
func (ContainerMap) Add ¶
func (cm ContainerMap) Add(podUID, containerName, containerID string)
Add adds a mapping of (containerID)->(podUID, containerName) to the ContainerMap
func (ContainerMap) Clone ¶
func (cm ContainerMap) Clone() ContainerMap
Clone creates a deep copy of the ContainerMap
func (ContainerMap) GetContainerID ¶
func (cm ContainerMap) GetContainerID(podUID, containerName string) (string, error)
GetContainerID retrieves a ContainerID from the ContainerMap
func (ContainerMap) GetContainerRef ¶
func (cm ContainerMap) GetContainerRef(containerID string) (string, string, error)
GetContainerRef retrieves a (podUID, containerName) pair from the ContainerMap
func (ContainerMap) RemoveByContainerID ¶
func (cm ContainerMap) RemoveByContainerID(containerID string)
RemoveByContainerID removes a mapping of (containerID)->(podUID, containerName) from the ContainerMap
func (ContainerMap) RemoveByContainerRef ¶
func (cm ContainerMap) RemoveByContainerRef(podUID, containerName string)
RemoveByContainerRef removes a mapping of (containerID)->(podUID, containerName) from the ContainerMap
func (ContainerMap) Visit ¶
func (cm ContainerMap) Visit(visitor func(podUID, containerName, containerID string))
Visit invoke visitor function to walks all of the entries in the container map
Source Files ¶
container_map.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 3 hours ago –
Tools for package owners.