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) 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]struct { // contains filtered or unexported fields }
ContainerMap maps (containerID)->(*v1.Pod, *v1.Container)
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) 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.26.4
- Published
- Apr 12, 2023
- Platform
- windows/amd64
- Imports
- 1 packages
- Last checked
- 7 minutes ago –
Tools for package owners.