job

package
v1.6.20 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 20 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
	Namespace       string
	ServiceAccount  string
	Labels          map[string]string
	Annotations     map[string]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
	NoTeardown      bool
	Secrets         map[string]string
}

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 NewNamespace

func NewNamespace(namespace string) *Runner

NewNamespace returns a new job 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