package
Version:
v0.16.0-rc.4
Opens a new window with list of versions in this module.
Published: Apr 19, 2018
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
AreAllJobsCompleted will return true if all jobs with a common prefix in a given namespace are in a Completed State
WaitOnReady is used when you dont have a handle on a job but want to wait until its in a Succeeded state.
type Job struct {
Metadata pod.Metadata `json:"metadata"`
Spec Spec `json:"spec"`
Status Status `json:"status"`
}
Job is used to parse data from kubectl get jobs
func CreateJobFromFile(filename, name, namespace string) (*Job, error)
CreateJobFromFile will create a Job from file with a name
Get will return a job with a given name and namespace
Delete will delete a Job in a given namespace
WaitOnReady will call the static method WaitOnReady passing in p.Metadata.Name and p.Metadata.Namespace
type List struct {
Jobs []Job `json:"items"`
}
List is a container that holds all jobs returned from doing a kubectl get jobs
GetAll will return all jobs in a given namespace
type Spec struct {
Completions int `json:"completions"`
Parallelism int `json:"parallelism"`
}
Spec holds job spec metadata
type Status struct {
Active int `json:"active"`
Succeeded int `json:"succeeded"`
}
Status holds job status information
Source Files
¶
Click to show internal directories.
Click to hide internal directories.