variablecontext

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	// GetAllPrefixes returns a list of prefixes that the provider would inject.
	GetAllPrefixes() []string

	// MakeVariablesFromJobConfig returns context variables for the "jobconfig"
	// context, which contains information about the parent JobConfig of a Job.
	MakeVariablesFromJobConfig(rjc *execution.JobConfig) map[string]string

	// MakeVariablesFromJob returns context variables for the "job" context, which
	// contains information about the Job.
	MakeVariablesFromJob(rj *execution.Job) map[string]string

	// MakeVariablesFromTask returns context variables for the "task" context, which
	// contains information about the Task.
	MakeVariablesFromTask(task TaskSpec) map[string]string
}

Provider supplies context variables given an object. The intention is that variables can only be provided in different "contexts" in a Job's lifecycle.

var (
	// ContextProvider is the global Provider that can supply context variables.
	ContextProvider Provider = &defaultProvider{}
)

type TaskSpec added in v0.2.0

type TaskSpec struct {
	Name          string
	Namespace     string
	RetryIndex    int64
	ParallelIndex execution.ParallelIndex
}

TaskSpec contains minimal information about a task.

Jump to

Keyboard shortcuts

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