job

package
v0.0.0-...-88f2d9e Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 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 Job

type Job interface {

	//create job
	Create(ctx context.Context, namespace string, job *batchV1.Job) error

	//delete job
	Delete(ctx context.Context, namespace string, name string) error

	//list jobs
	List(ctx context.Context, namespace string, selector labels.Selector) ([]*batchV1.Job, error)

	//get jobs
	Get(ctx context.Context, namespace string, name string) (*batchV1.Job, error)

	//watch event
	WatchEvent(ctx context.Context, handler JobHandlerFuncs)
}

Job job interface

func NewJob

func NewJob(clientset *kubernetes.Clientset, factory informers.SharedInformerFactory) Job

new job

type JobHandlerFuncs

type JobHandlerFuncs struct {
	AddFunc    func(obj *batchV1.Job)
	UpdateFunc func(oldObj, newObj *batchV1.Job)
	DeleteFunc func(obj *batchV1.Job)
}

JobHandlerFuncs

func (JobHandlerFuncs) OnAdd

func (j JobHandlerFuncs) OnAdd(obj interface{})

OnAdd calls AddFunc if it's not nil.

func (JobHandlerFuncs) OnDelete

func (j JobHandlerFuncs) OnDelete(obj interface{})

OnDelete calls DeleteFunc if it's not nil.

func (JobHandlerFuncs) OnUpdate

func (j JobHandlerFuncs) OnUpdate(oldObj, newObj interface{})

OnUpdate calls UpdateFunc if it's not nil.

Jump to

Keyboard shortcuts

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