filter

package
v0.0.0-...-b3ca37d Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: EPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MachineNameEnvVar = "CHE_MACHINE_NAME"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerFilter

type ContainerFilter interface {
	// Return list Che workspace containers.
	GetContainerList() (containersInfo []*model.ContainerInfo, err error)

	// Find container information by Che specific container identifier.
	// Return error in case fail filter operation.
	FindContainerInfo(identifier *model.MachineIdentifier) (containerInfo *model.ContainerInfo, err error)
}

Container filter to find container information if it's possible by unique Che specific container name.

type KubernetesContainerFilter

type KubernetesContainerFilter struct {
	ContainerFilter
	// contains filtered or unexported fields
}

Kubernetes specific implementation of the container information filter. Eclipse CHE workspace pod could be located in the same namespace like Eclipse CHE master or in the separated namespace. Kubernetes container filter search workspace pod by workspaceId and then search container information inside pod by machine name.

func NewKubernetesContainerFilter

func NewKubernetesContainerFilter(namespace string, podGetterApi corev1.PodsGetter) *KubernetesContainerFilter

Create new kubernetes container filter.

func (*KubernetesContainerFilter) FindContainerInfo

func (filter *KubernetesContainerFilter) FindContainerInfo(identifier *model.MachineIdentifier) (containerInfo *model.ContainerInfo, err error)

Find container information by pod label: "wsId" and container environment variables "machineName".

func (*KubernetesContainerFilter) GetContainer

func (filter *KubernetesContainerFilter) GetContainer(name string) (containerInfo *model.ContainerInfo, err error)

func (*KubernetesContainerFilter) GetContainerList

func (filter *KubernetesContainerFilter) GetContainerList() (containersInfo []*model.ContainerInfo, err error)

Jump to

Keyboard shortcuts

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