job

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const WatchTimeout int64 = 60

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Pod         *pod.Pod
	Name        string
	Namespace   string
	Labels      map[string]string
	Parallelism *int32
	BackOffList *int32
	TTLSeconds  *int32
}

func (*Job) Template

func (j *Job) Template() *v1.Job

func (*Job) WatchOptions

func (j *Job) WatchOptions() metav1.ListOptions

type Processor

type Processor struct {
	Job    *Job
	Client v1.JobInterface

	JobDeleteOptions metav1.DeleteOptions
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(job *Job, client v1.JobInterface) *Processor

func (*Processor) CreateWatch

func (jp *Processor) CreateWatch() error

func (*Processor) DeleteJob

func (jp *Processor) DeleteJob() error

func (*Processor) GetStatus

func (jp *Processor) GetStatus() Status

func (*Processor) GetWatch

func (jp *Processor) GetWatch() watch.Interface

func (*Processor) SubmitJob

func (jp *Processor) SubmitJob() error

func (*Processor) UpdateJob

func (jp *Processor) UpdateJob(suspend bool) error

func (*Processor) WatchCompletion

func (jp *Processor) WatchCompletion(exitChan chan Status)

type Status

type Status struct {
	Status StatusType
	Err    error
}

type StatusType

type StatusType int
const (
	Invalid StatusType = iota
	Success
	Failed
	Running
	Ready
	Finished
)

Jump to

Keyboard shortcuts

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