Help us shape the future of Go! Take the 2026 Go Developer Survey

workflow

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionListCRDToProto

func ActionListCRDToProto(wf *v1alpha1.Workflow) *proto.WorkflowActionList

func ToWorkflowContext

func ToWorkflowContext(wf *v1alpha1.Workflow) *proto.WorkflowContext

func YAMLToStatus

func YAMLToStatus(wf *Workflow) *v1alpha1.WorkflowStatus

Types

type Action

type Action struct {
	Name        string            `yaml:"name"`
	Image       string            `yaml:"image"`
	Timeout     int64             `yaml:"timeout"`
	Command     []string          `yaml:"command,omitempty"`
	OnTimeout   []string          `yaml:"on-timeout,omitempty"`
	OnFailure   []string          `yaml:"on-failure,omitempty"`
	Volumes     []string          `yaml:"volumes,omitempty"`
	Environment map[string]string `yaml:"environment,omitempty"`
	Pid         string            `yaml:"pid,omitempty"`
}

Action is the basic executional unit for a workflow.

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler is a type for managing Workflows.

func NewReconciler

func NewReconciler(client ctrlclient.Client) *Reconciler

TODO(jacobweinstock): add functional arguments to the signature. TODO(jacobweinstock): write functional argument for customizing the backoff.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile handles Workflow objects. This includes Template rendering, optional Hardware allowPXE toggling, and optional Hardware one-time netbooting.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr manager.Manager) error

type Task

type Task struct {
	Name        string            `yaml:"name"`
	WorkerAddr  string            `yaml:"worker"`
	Actions     []Action          `yaml:"actions"`
	Volumes     []string          `yaml:"volumes,omitempty"`
	Environment map[string]string `yaml:"environment,omitempty"`
}

Task represents a task to be executed as part of a workflow.

type Workflow

type Workflow struct {
	Version       string `yaml:"version"`
	Name          string `yaml:"name"`
	ID            string `yaml:"id"`
	GlobalTimeout int    `yaml:"global_timeout"`
	Tasks         []Task `yaml:"tasks"`
}

Workflow represents a workflow to be executed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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