job

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(config interface{}) error

Bootstrap bootstraps the job

func LoadConfig

func LoadConfig(config interface{}) error

LoadConfig returns the job configuration

func Run

func Run(job *Job) error

Run runs the job

Types

type Config

type Config struct {
	ID              string
	Image           string
	ImagePullPolicy corev1.PullPolicy
	Executable      string
	Context         string
	Values          map[string][]string
	ValueFiles      map[string][]string
	Args            []string
	Env             map[string]string
	Timeout         time.Duration
}

Config is a job configuration

type Job

type Job struct {
	*Config
	JobConfig interface{}
	Type      string
}

Job is a job configuration

type Runner

type Runner struct {
	kubernetes.Client
	// contains filtered or unexported fields
}

Runner manages test jobs within a namespace

func NewCoordinator

func NewCoordinator() *Runner

NewCoordinator returns a new test job coordinator

func NewNamespace

func NewNamespace(namespace string) *Runner

NewNamespace returns a new job namespace

func (*Runner) CreateNamespace

func (n *Runner) CreateNamespace() error

CreateNamespace creates the namespace

func (*Runner) DeleteNamespace

func (n *Runner) DeleteNamespace() error

DeleteNamespace deletes the namespace

func (*Runner) RunJob

func (n *Runner) RunJob(job *Job) (int, error)

RunJob runs the given job

func (*Runner) StartJob

func (n *Runner) StartJob(job *Job) error

StartJob starts the given job

func (*Runner) WaitForExit

func (n *Runner) WaitForExit(job *Job) (int, error)

WaitForExit waits for the job to exit

Jump to

Keyboard shortcuts

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