job

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const (

	// Name  name etc below key words are used in job print format
	Name string = "Name"
	// Creation create
	Creation string = "Creation"
	// Phase phase
	Phase string = "Phase"
	// Replicas  replicas
	Replicas string = "Replicas"
	// Min  minimum
	Min string = "Min"
	// Scheduler scheduler
	Scheduler string = "Scheduler"
	// Pending  pending
	Pending string = "Pending"
	// Running running
	Running string = "Running"
	// Succeeded success
	Succeeded string = "Succeeded"
	// Terminating terminating
	Terminating string = "Terminating"
	// Version version
	Version string = "Version"
	// Failed  failed
	Failed string = "Failed"
	// Unknown pod
	Unknown string = "Unknown"
	// RetryCount retry count
	RetryCount string = "RetryCount"
	// JobType  job type
	JobType string = "JobType"
	// Namespace job namespace
	Namespace string = "Namespace"
)
View Source
const (
	Level0 = iota
	Level1
	Level2
)

level of print indent.

Variables

This section is empty.

Functions

func DeleteJob

func DeleteJob() error

DeleteJob delete the job.

func GetEvents

func GetEvents(config *rest.Config, job *v1alpha1.Job) []coreV1.Event

GetEvents get the job event by config.

func HumanDuration

func HumanDuration(d time.Duration) string

HumanDuration translate time.Duration to human readable time string.

func InitDeleteFlags

func InitDeleteFlags(cmd *cobra.Command)

InitDeleteFlags init the delete command flags.

func InitListFlags

func InitListFlags(cmd *cobra.Command)

InitListFlags init list command flags.

func InitResumeFlags

func InitResumeFlags(cmd *cobra.Command)

InitResumeFlags init resume command flags.

func InitRunFlags

func InitRunFlags(cmd *cobra.Command)

InitRunFlags init the run flags.

func InitSuspendFlags

func InitSuspendFlags(cmd *cobra.Command)

InitSuspendFlags init suspend related flags.

func InitViewFlags

func InitViewFlags(cmd *cobra.Command)

InitViewFlags init the view command flags.

func ListJobs

func ListJobs() error

ListJobs lists all jobs details.

func PrintEvents

func PrintEvents(events []coreV1.Event, writer io.Writer)

PrintEvents print event info to writer.

func PrintJobInfo

func PrintJobInfo(job *v1alpha1.Job, writer io.Writer)

PrintJobInfo print the job detailed info into writer.

func PrintJobs

func PrintJobs(jobs *v1alpha1.JobList, writer io.Writer)

PrintJobs prints all jobs details.

func ResumeJob

func ResumeJob() error

ResumeJob resumes the job.

func RunJob

func RunJob() error

RunJob creates the job.

func SuspendJob

func SuspendJob() error

SuspendJob suspends the job.

func ViewJob

func ViewJob() error

ViewJob gives full details of the job.

func WriteLine

func WriteLine(writer io.Writer, spaces int, content string, params ...interface{})

WriteLine write lines with specified indent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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