containermap

package
v1.30.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL