jobs

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Helper = "acorn-job-output-helper"
)

Variables

View Source
var (
	ErrJobNotDone  = errors.New("job not complete")
	ErrJobNoOutput = errors.New("job has no output")
)

Functions

func GetEvent

func GetEvent(jobName string, appInstance *v1.AppInstance) string

GetEvent determines the event type for the job based on the app's status.

func GetJobOutputSecretName

func GetJobOutputSecretName(ctx context.Context, namespace, jobName string) string

func GetOutputFor

func GetOutputFor(ctx context.Context, c kclient.Client, appInstance *v1.AppInstance, name, serviceName string, obj interface{}) (err error)

GetOutputFor obj must be acorn internal v1.Secret, v1.Service, or string

func ShouldRun

func ShouldRun(jobName string, appInstance *v1.AppInstance) bool

ShouldRun determines if the job should run based on the app's status.

func ShouldRunForEvent

func ShouldRunForEvent(eventName string, container v1.Container) bool

ShouldRunForEvent returns true if the job is configured to run for the given event.

Types

This section is empty.

Jump to

Keyboard shortcuts

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