type ContainerMap … // NewContainerMap creates a new ContainerMap struct func NewContainerMap() ContainerMap { … } // Add adds a mapping of (containerID)->(podUID, containerName) to the ContainerMap func (cm ContainerMap) Add(podUID, containerName, containerID string) { … } // RemoveByContainerID removes a mapping of (containerID)->(podUID, containerName) from the ContainerMap func (cm ContainerMap) RemoveByContainerID(containerID string) { … } // RemoveByContainerRef removes a mapping of (containerID)->(podUID, containerName) from the ContainerMap func (cm ContainerMap) RemoveByContainerRef(podUID, containerName string) { … } // GetContainerID retrieves a ContainerID from the ContainerMap func (cm ContainerMap) GetContainerID(podUID, containerName string) (string, error) { … } // GetContainerRef retrieves a (podUID, containerName) pair from the ContainerMap func (cm ContainerMap) GetContainerRef(containerID string) (string, string, error) { … } // Visit invoke visitor function to walks all of the entries in the container map func (cm ContainerMap) Visit(visitor func(podUID, containerName, containerID string)) { … }