jobs

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJobStatusFromJob

func GetJobStatusFromJob(kubeClient kubernetes.Interface, job *v1.Job, jobPods []corev1.Pod) *models.JobStatus

GetJobStatusFromJob Gets job from a k8s job

Types

type JobHandler added in v1.5.8

type JobHandler interface {
	//GetJobs Get status of all jobs
	GetJobs() ([]models.JobStatus, error)
	//GetJob Get status of a job
	GetJob(name string) (*models.JobStatus, error)
	//CreateJob Create a job with parameters. `batchName` is optional.
	CreateJob(jobScheduleDescription *models.JobScheduleDescription, batchName string) (*models.JobStatus, error)
	//MaintainHistoryLimit Delete outdated jobs
	MaintainHistoryLimit() error
	//DeleteJob Delete a job
	DeleteJob(jobName string) error
}

func New

func New(env *models.Env, kube *kube.Kube) JobHandler

New Constructor for job handler

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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