Documentation
¶
Index ¶
- Variables
- func EnumerateLogicalDates(schedule cron.Schedule, start, end time.Time, loc *time.Location) []time.Time
- func FilterDates(store *backfillstore.Store, jobID uuid.UUID, dates []time.Time, ...) ([]time.Time, error)
- func RunBackfill(ctx context.Context, b *models.Backfill, j *models.Job, schedule cron.Schedule, ...)
- type Job
- type JobOption
- func WithAtomPollInterval(interval time.Duration) JobOption
- func WithAtomServiceFactory(factory func(context.Context) asvc.Atom) JobOption
- func WithDispatchRunCallbacks(dispatch func(context.Context, uuid.UUID, uuid.UUID, error) error) JobOption
- func WithDockerEngineFactory(factory func(context.Context) atom.Engine) JobOption
- func WithEnvVariables(variables func() env.Environment) JobOption
- func WithKubernetesEngineFactory(factory func(context.Context) atom.Engine) JobOption
- func WithParams(params map[string]string) JobOption
- func WithPodmanEngineFactory(factory func(context.Context) atom.Engine) JobOption
- func WithPriorityOverride(priority string) JobOption
- func WithRunStoreFactory(factory func() *run.Store) JobOption
- func WithSecretResolver(resolver secret.Resolver) JobOption
- func WithTaskEdgeServiceFactory(factory func(context.Context) taskedge.TaskEdge) JobOption
- func WithTaskServiceFactory(factory func(context.Context) task.Task) JobOption
- func WithTriggerID(id *uuid.UUID) JobOption
Constants ¶
This section is empty.
Variables ¶
var ErrLocalQuarantinedReplayUnsupported = errors.New("replay requires the descriptor-aware executor")
ErrLocalQuarantinedReplayUnsupported is returned when a quarantined replay reaches the in-process executor, which is not descriptor-aware.
Functions ¶
func EnumerateLogicalDates ¶
func EnumerateLogicalDates(schedule cron.Schedule, start, end time.Time, loc *time.Location) []time.Time
EnumerateLogicalDates returns all cron fire times in [start, end). loc sets the timezone used when computing schedule boundaries; pass time.UTC when the trigger has no timezone configured.
func FilterDates ¶
func FilterDates(store *backfillstore.Store, jobID uuid.UUID, dates []time.Time, reprocess string) ([]time.Time, error)
FilterDates filters logical dates based on the reprocess policy:
"none" — skip dates that have any existing run "failed" — skip dates whose latest run succeeded "all" — keep all dates
func RunBackfill ¶
func RunBackfill( ctx context.Context, b *models.Backfill, j *models.Job, schedule cron.Schedule, loc *time.Location, )
RunBackfill executes a backfill by enumerating logical dates, filtering by the reprocess policy, and running each date through the standard job executor with a semaphore controlling max concurrency.
It honours ctx cancellation: when cancelled, no new runs are started but any in-flight runs are allowed to finish.
Types ¶
type JobOption ¶
type JobOption func(*job)
JobOption configures a job before execution.
func WithAtomPollInterval ¶
WithAtomPollInterval overrides the polling interval for atom completion checks.
func WithAtomServiceFactory ¶
WithAtomServiceFactory overrides the atom service used to look up atoms.
func WithDispatchRunCallbacks ¶
func WithDispatchRunCallbacks(dispatch func(context.Context, uuid.UUID, uuid.UUID, error) error) JobOption
WithDispatchRunCallbacks overrides the callback dispatch function.
func WithDockerEngineFactory ¶
WithDockerEngineFactory overrides the Docker engine constructor.
func WithEnvVariables ¶
func WithEnvVariables(variables func() env.Environment) JobOption
WithEnvVariables overrides the environment configuration.
func WithKubernetesEngineFactory ¶
WithKubernetesEngineFactory overrides the Kubernetes engine constructor.
func WithParams ¶
WithParams attaches run parameters to the job. Parameters are injected into each task's environment as CAESIUM_PARAM_<KEY>=<VALUE> (KEY uppercased).
func WithPodmanEngineFactory ¶
WithPodmanEngineFactory overrides the Podman engine constructor.
func WithPriorityOverride ¶
func WithRunStoreFactory ¶
WithRunStoreFactory overrides the run store used for execution state.
func WithSecretResolver ¶
WithSecretResolver configures secret:// resolution for step environment values. If omitted, Run builds the resolver from the processed environment.
func WithTaskEdgeServiceFactory ¶
WithTaskEdgeServiceFactory overrides the task edge service used to look up edges.
func WithTaskServiceFactory ¶
WithTaskServiceFactory overrides the task service used to look up tasks.