Documentation ¶
Index ¶
- func CopyJob(ctx context.Context, handlerApiV2 apiv2.Handler, ...) (*modelsv2.RadixBatch, error)
- func GetBatchJob(ctx context.Context, handlerApiV2 apiv2.Handler, batchName, jobName string) (*modelsv1.JobStatus, error)
- func GetJobStatusFromRadixBatchJobsStatus(batchName string, jobStatus modelsv2.RadixBatchJobStatus) modelsv1.JobStatus
- func GetJobStatusFromRadixBatchJobsStatuses(radixBatches ...modelsv2.RadixBatch) []modelsv1.JobStatus
- func GetLabelSelectorForAllRadixBatchesPods(componentName string) string
- func GetLabelSelectorForBatches(componentName string) string
- func GetLabelSelectorForRadixBatchesPods(componentName, batchName string) string
- func GetPodsToJobNameMap(pods []corev1.Pod) map[string][]corev1.Pod
- func ParseBatchAndJobNameFromScheduledJobName(scheduleJobName string) (batchName, batchJobName string, ok bool)
- func SetBatchJobEventMessageToBatchJobStatus(jobStatus *modelsv1.JobStatus, batchJobPodsMap map[string]corev1.Pod, ...)
- func StopJob(ctx context.Context, handlerApiV2 apiv2.Handler, jobName string) error
- type Handler
- func (handler *Handler) DeleteSecret(ctx context.Context, secret *corev1.Secret) error
- func (handler *Handler) DeleteService(ctx context.Context, service *corev1.Service) error
- func (handler *Handler) GetBatch(ctx context.Context, batchName string) (*batchv1.Job, error)
- func (handler *Handler) GetLastEventMessageForPods(ctx context.Context, pods []corev1.Pod) (map[string]string, error)
- func (handler *Handler) GetPodsForLabelSelector(ctx context.Context, labelSelector string) ([]corev1.Pod, error)
- func (handler *Handler) GetRadixBatchJobMessagesAndPodMaps(ctx context.Context, selectorForRadixBatchPods string) (map[string]string, map[string]corev1.Pod, error)
- func (handler *Handler) GetSecretsForJob(ctx context.Context, jobName string) (*corev1.SecretList, error)
- func (handler *Handler) GetServiceForJob(ctx context.Context, jobName string) (*corev1.ServiceList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyJob ¶ added in v1.8.0
func CopyJob(ctx context.Context, handlerApiV2 apiv2.Handler, jobName, deploymentName string) (*modelsv2.RadixBatch, error)
CopyJob Copy a job
func GetBatchJob ¶ added in v1.7.6
func GetBatchJob(ctx context.Context, handlerApiV2 apiv2.Handler, batchName, jobName string) (*modelsv1.JobStatus, error)
GetBatchJob Get batch job
func GetJobStatusFromRadixBatchJobsStatus ¶
func GetJobStatusFromRadixBatchJobsStatus(batchName string, jobStatus modelsv2.RadixBatchJobStatus) modelsv1.JobStatus
GetJobStatusFromRadixBatchJobsStatus Get Job status from RadixBatchJob
func GetJobStatusFromRadixBatchJobsStatuses ¶ added in v1.7.6
func GetJobStatusFromRadixBatchJobsStatuses(radixBatches ...modelsv2.RadixBatch) []modelsv1.JobStatus
GetJobStatusFromRadixBatchJobsStatuses Get JobStatuses from RadixBatch job statuses v2
func GetLabelSelectorForAllRadixBatchesPods ¶ added in v1.8.0
GetLabelSelectorForAllRadixBatchesPods Gets a label selector for all radix batches pods
func GetLabelSelectorForBatches ¶
GetLabelSelectorForBatches Gets a label selector for a batch scheduler job
func GetLabelSelectorForRadixBatchesPods ¶ added in v1.8.0
GetLabelSelectorForRadixBatchesPods Gets a label selector for a radix batch pods
func GetPodsToJobNameMap ¶
GetPodsToJobNameMap Gets a map of pods to K8sJobNameLabel label as keys
func ParseBatchAndJobNameFromScheduledJobName ¶
func ParseBatchAndJobNameFromScheduledJobName(scheduleJobName string) (batchName, batchJobName string, ok bool)
ParseBatchAndJobNameFromScheduledJobName Decompose V2 batch name and jobs name from V1 job-name
func SetBatchJobEventMessageToBatchJobStatus ¶ added in v1.8.0
func SetBatchJobEventMessageToBatchJobStatus(jobStatus *modelsv1.JobStatus, batchJobPodsMap map[string]corev1.Pod, eventMessageForPods map[string]string)
SetBatchJobEventMessageToBatchJobStatus sets the event message for the batch job status
Types ¶
type Handler ¶
func (*Handler) DeleteSecret ¶
DeleteSecret Delete the service for the job
func (*Handler) DeleteService ¶
DeleteService Deletes a service
func (*Handler) GetLastEventMessageForPods ¶ added in v1.8.0
func (handler *Handler) GetLastEventMessageForPods(ctx context.Context, pods []corev1.Pod) (map[string]string, error)
GetLastEventMessageForPods returns the last event message for pods
func (*Handler) GetPodsForLabelSelector ¶
func (*Handler) GetRadixBatchJobMessagesAndPodMaps ¶ added in v1.8.0
func (handler *Handler) GetRadixBatchJobMessagesAndPodMaps(ctx context.Context, selectorForRadixBatchPods string) (map[string]string, map[string]corev1.Pod, error)
GetRadixBatchJobMessagesAndPodMaps returns the event messages for the batch job statuses
func (*Handler) GetSecretsForJob ¶
func (handler *Handler) GetSecretsForJob(ctx context.Context, jobName string) (*corev1.SecretList, error)
GetSecretsForJob Get secrets for the job
func (*Handler) GetServiceForJob ¶
func (handler *Handler) GetServiceForJob(ctx context.Context, jobName string) (*corev1.ServiceList, error)
GetServiceForJob Get the service for the job