Documentation ¶
Index ¶
- type 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))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 ¶ added in v1.32.0
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 ¶ added in v1.21.13
func (cm ContainerMap) Visit(visitor func(podUID, containerName, containerID string))
Visit invoke visitor function to walks all of the entries in the container map