job

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package job provides Registry interface and it's RESTStorage implementation for storing Job api objects.

Index

Constants

This section is empty.

Variables

View Source
var StatusStrategy = jobStatusStrategy{Strategy}
View Source
var Strategy = jobStrategy{api.Scheme, api.SimpleNameGenerator}

Strategy is the default logic that applies when creating and updating Replication Controller objects.

Functions

func JobToSelectableFields

func JobToSelectableFields(job *experimental.Job) fields.Set

JobSelectableFields returns a field set that represents the object for matching purposes.

func MatchJob

func MatchJob(label labels.Selector, field fields.Selector) generic.Matcher

MatchJob is the filter used by the generic etcd backend to route watch events from etcd to clients of the apiserver only interested in specific labels/fields.

Types

type Registry

type Registry interface {
	// ListJobs obtains a list of Jobs having labels and fields which match selector.
	ListJobs(ctx api.Context, label labels.Selector, field fields.Selector) (*experimental.JobList, error)
	// WatchJobs watch for new/changed/deleted Jobs.
	WatchJobs(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
	// GetJobs gets a specific Job.
	GetJob(ctx api.Context, name string) (*experimental.Job, error)
	// CreateJob creates a Job based on a specification.
	CreateJob(ctx api.Context, job *experimental.Job) (*experimental.Job, error)
	// UpdateJob updates an existing Job.
	UpdateJob(ctx api.Context, job *experimental.Job) (*experimental.Job, error)
	// DeleteJob deletes an existing Job.
	DeleteJob(ctx api.Context, name string) error
}

Registry is an interface for things that know how to store Jobs.

func NewRegistry

func NewRegistry(s rest.StandardStorage) Registry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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