v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromJobHandlerToHandler

func FromJobHandlerToHandler(sync JobHandler) generic.Handler

Types

type Interface

type Interface interface {
	Job() JobController
}

func New

func New(controllerManager *generic.ControllerManager, client clientset.BatchV1Interface,
	informers informers.Interface) Interface

type JobCache

type JobCache interface {
	Get(namespace, name string) (*v1.Job, error)
	List(namespace string, selector labels.Selector) ([]*v1.Job, error)

	AddIndexer(indexName string, indexer JobIndexer)
	GetByIndex(indexName, key string) ([]*v1.Job, error)
}

type JobClient

type JobClient interface {
	Create(*v1.Job) (*v1.Job, error)
	Update(*v1.Job) (*v1.Job, error)
	UpdateStatus(*v1.Job) (*v1.Job, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Job, error)
	List(namespace string, opts metav1.ListOptions) (*v1.JobList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
}

type JobController

type JobController interface {
	JobClient

	OnChange(ctx context.Context, name string, sync JobHandler)
	OnRemove(ctx context.Context, name string, sync JobHandler)
	Enqueue(namespace, name string)

	Cache() JobCache

	Informer() cache.SharedIndexInformer
	GroupVersionKind() schema.GroupVersionKind

	AddGenericHandler(ctx context.Context, name string, handler generic.Handler)
	AddGenericRemoveHandler(ctx context.Context, name string, handler generic.Handler)
	Updater() generic.Updater
}

func NewJobController

func NewJobController(gvk schema.GroupVersionKind, controllerManager *generic.ControllerManager, clientGetter clientset.JobsGetter, informer informers.JobInformer) JobController

type JobHandler

type JobHandler func(string, *v1.Job) (*v1.Job, error)

func UpdateJobOnChange

func UpdateJobOnChange(updater generic.Updater, handler JobHandler) JobHandler

type JobIndexer

type JobIndexer func(obj *v1.Job) ([]string, error)

Jump to

Keyboard shortcuts

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