jobs

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromCronJob added in v0.7.0

func NewFromCronJob(cronJob *batchv1.CronJob, env map[string]string) *batchv1.Job

NewFromCronJob creates a job from the CronJob template. If env is given, it injects the environment variables to all containers.

func PrintYAML

func PrintYAML(job *batchv1.Job, w io.Writer)

Types

type Informer

type Informer interface {
	Shutdown()
}

func StartInformer

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

StartInformer starts an informer to receive the change of job resource. You must finally close stopCh to stop the informer. When the job is completed or failed, it is sent to finishedCh.

Jump to

Keyboard shortcuts

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