job

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: eliminate it, use jsonstore.ErrNotFound
	NotFoundSuffix = "not found"
)
View Source
const (
	RetainNamespace = "RETAIN_NAMESPACE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job interface {
	Create(apistructs.JobCreateRequest) (apistructs.Job, error)
	Start(namespace, name string, env map[string]string) (apistructs.Job, error)
	Stop(namespace, name string) error
	Delete(job apistructs.Job) error
	Inspect(namespace, name string) (apistructs.Job, error)
	List(namespace string) ([]apistructs.Job, error)

	Pipeline(namespace string, names []string) ([]apistructs.Job, error)
	Concurrent(namespace string, names []string) ([]apistructs.Job, error)

	CreateJobVolume(apistructs.JobVolume) (string, error)
}

func NewJobImpl

func NewJobImpl(js jsonstore.JsonStore, sched *task.Sched) Job

type JobImpl

type JobImpl struct {
	// contains filtered or unexported fields
}

func (*JobImpl) Concurrent

func (j *JobImpl) Concurrent(namespace string, names []string) ([]apistructs.Job, error)

func (*JobImpl) Create

func (j *JobImpl) Create(create apistructs.JobCreateRequest) (apistructs.Job, error)

func (*JobImpl) CreateJobVolume

func (j *JobImpl) CreateJobVolume(req apistructs.JobVolume) (string, error)

func (*JobImpl) Delete

func (j *JobImpl) Delete(job apistructs.Job) error

func (*JobImpl) Inspect

func (j *JobImpl) Inspect(namespace, name string) (apistructs.Job, error)

func (*JobImpl) List

func (j *JobImpl) List(namespace string) ([]apistructs.Job, error)

func (*JobImpl) Pipeline

func (j *JobImpl) Pipeline(namespace string, names []string) ([]apistructs.Job, error)

func (*JobImpl) Start

func (j *JobImpl) Start(namespace, name string, env map[string]string) (apistructs.Job, error)

func (*JobImpl) Stop

func (j *JobImpl) Stop(namespace, name string) error

Jump to

Keyboard shortcuts

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