pods

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerStartedEvent

type ContainerStartedEvent struct {
	Namespace     string
	PodName       string
	ContainerName string
}

ContainerStartedEvent is sent when a container is started.

type Informer

type Informer interface {
	// Shutdown implements informers.SharedInformerFactory#Shutdown
	Shutdown()
}

func StartInformer

func StartInformer(
	clientset kubernetes.Interface,
	namespace, jobName string,
	stopCh <-chan struct{},
	containerStartedCh chan<- ContainerStartedEvent,
) (Informer, error)

StartInformer an informer to receive the change of pod resource. It finds the corresponding pod(s) by job name. You must finally close stopCh to stop the informer. When the status of container is changed, the event is sent to containerStartedCh.

Jump to

Keyboard shortcuts

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