workflow_handler

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENTRYPOINT = "entryPoint"
	ONEXIT     = "exitHandler"
)

Variables

This section is empty.

Functions

func AddFilesToTemplates

func AddFilesToTemplates(templates []v1alpha1.Template, files []*git_provider.CommitFile) ([]v1alpha1.Template, error)

func ConvertToValidString added in v1.1.3

func ConvertToValidString(input string) string

func CreateDAGTemplate

func CreateDAGTemplate(fileList []*git_provider.CommitFile, name string) (*v1alpha1.Template, error)

func GetParameters

func GetParameters(paramsFile *git_provider.CommitFile) ([]v1alpha1.Parameter, error)

func IsConfigExists

func IsConfigExists(cfg *conf.WorkflowsConfig, config string) bool

func IsConfigsOnExitExists added in v1.1.2

func IsConfigsOnExitExists(cfg *conf.WorkflowsConfig, config string) bool

func ValidateDAGTasks added in v1.1.2

func ValidateDAGTasks(tasks []v1alpha1.DAGTask) error

Types

type WorkflowsClient

type WorkflowsClient interface {
	ConstructTemplates(workflowsBatch *common.WorkflowsBatch, configName string) ([]v1alpha1.Template, error)
	ConstructSpec(templates []v1alpha1.Template, params []v1alpha1.Parameter, configName string) (*v1alpha1.WorkflowSpec, error)
	CreateWorkflow(spec *v1alpha1.WorkflowSpec, workflowsBatch *common.WorkflowsBatch) (*v1alpha1.Workflow, error)
	SelectConfig(workflowsBatch *common.WorkflowsBatch) (string, error)
	Lint(wf *v1alpha1.Workflow) error
	Submit(ctx *context.Context, wf *v1alpha1.Workflow) error
	HandleWorkflowBatch(ctx *context.Context, workflowsBatch *common.WorkflowsBatch) error
	Watch(ctx *context.Context, labelSelector *metav1.LabelSelector) (watch.Interface, error)
	UpdatePiperWorkflowLabel(ctx *context.Context, workflowName string, label string, value string) error
}

func NewWorkflowsClient

func NewWorkflowsClient(cfg *conf.GlobalConfig) (WorkflowsClient, error)

type WorkflowsClientImpl

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

func (*WorkflowsClientImpl) ConstructSpec

func (wfc *WorkflowsClientImpl) ConstructSpec(templates []v1alpha1.Template, params []v1alpha1.Parameter, configName string) (*v1alpha1.WorkflowSpec, error)

func (*WorkflowsClientImpl) ConstructTemplates

func (wfc *WorkflowsClientImpl) ConstructTemplates(workflowsBatch *common.WorkflowsBatch, configName string) ([]v1alpha1.Template, error)

func (*WorkflowsClientImpl) CreateWorkflow

func (wfc *WorkflowsClientImpl) CreateWorkflow(spec *v1alpha1.WorkflowSpec, workflowsBatch *common.WorkflowsBatch) (*v1alpha1.Workflow, error)

func (*WorkflowsClientImpl) HandleWorkflowBatch

func (wfc *WorkflowsClientImpl) HandleWorkflowBatch(ctx *context.Context, workflowsBatch *common.WorkflowsBatch) error

func (*WorkflowsClientImpl) Lint

func (wfc *WorkflowsClientImpl) Lint(wf *v1alpha1.Workflow) error

func (*WorkflowsClientImpl) SelectConfig

func (wfc *WorkflowsClientImpl) SelectConfig(workflowsBatch *common.WorkflowsBatch) (string, error)

func (*WorkflowsClientImpl) Submit

func (wfc *WorkflowsClientImpl) Submit(ctx *context.Context, wf *v1alpha1.Workflow) error

func (*WorkflowsClientImpl) UpdatePiperWorkflowLabel added in v1.3.0

func (wfc *WorkflowsClientImpl) UpdatePiperWorkflowLabel(ctx *context.Context, workflowName string, label string, value string) error

func (*WorkflowsClientImpl) Watch added in v1.3.0

func (wfc *WorkflowsClientImpl) Watch(ctx *context.Context, labelSelector *metav1.LabelSelector) (watch.Interface, error)

Jump to

Keyboard shortcuts

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