Documentation ¶
Index ¶
- Constants
- func IsFailed(status apiv1.JobStatus) bool
- func IsFinished(status apiv1.JobStatus) bool
- func IsRunning(status apiv1.JobStatus) bool
- func IsSucceeded(status apiv1.JobStatus) bool
- func IsSuspended(status apiv1.JobStatus) bool
- func LoggerForJob(job metav1.Object) *log.Entry
- func LoggerForKey(key string) *log.Entry
- func LoggerForPod(pod *v1.Pod, kind string) *log.Entry
- func LoggerForReplica(job metav1.Object, rtype string) *log.Entry
- func LoggerForService(svc *v1.Service, kind string) *log.Entry
- func LoggerForUnstructured(obj *metav1unstructured.Unstructured, kind string) *log.Entry
- func NewReason(kind, reason string) string
- func UpdateJobConditions(jobStatus *apiv1.JobStatus, conditionType apiv1.JobConditionType, ...)
- type Counter
Constants ¶
View Source
const ( // JobCreatedReason is added in a job when it is created. JobCreatedReason = "Created" // JobSucceededReason is added in a job when it is succeeded. JobSucceededReason = "Succeeded" // JobRunningReason is added in a job when it is running. JobRunningReason = "Running" // JobFailedReason is added in a job when it is failed. JobFailedReason = "Failed" // JobRestartingReason is added in a job when it is restarting. JobRestartingReason = "Restarting" // JobFailedValidationReason is added in a job when it failed validation JobFailedValidationReason = "FailedValidation" // JobSuspendedReason is added in a job when it is suspended. JobSuspendedReason = "Suspended" // JobResumedReason is added in a job when it is unsuspended. JobResumedReason = "Resumed" )
Variables ¶
This section is empty.
Functions ¶
func IsFinished ¶
IsFinished checks if the job is succeeded or failed
func IsSucceeded ¶
IsSucceeded checks if the job is succeeded
func IsSuspended ¶
func LoggerForKey ¶
func LoggerForUnstructured ¶
func LoggerForUnstructured(obj *metav1unstructured.Unstructured, kind string) *log.Entry
func UpdateJobConditions ¶
func UpdateJobConditions( jobStatus *apiv1.JobStatus, conditionType apiv1.JobConditionType, conditionStatus v1.ConditionStatus, reason, message string, )
UpdateJobConditions adds to the jobStatus a new condition if needed, with the conditionType, reason, and message
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func NewCounter ¶
func NewCounter() *Counter
Click to show internal directories.
Click to hide internal directories.