simple

package
v0.0.0-...-4d712e3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SimpleDSLWorkflow

func SimpleDSLWorkflow(ctx workflow.Context, dslWorkflow Workflow) ([]byte, error)

SimpleDSLWorkflow workflow definition

Types

type ActivityInvocation

type ActivityInvocation struct {
	Name           string
	Arguments      []string
	Result         string
	Commands       []string
	ContainerImage string `yaml:"container_image"`
}

ActivityInvocation is used to express invoking an Activity. The Arguments defined expected arguments as input to the Activity, the result specify the name of variable that it will store the result as which can then be used as arguments to subsequent ActivityInvocation.

type Parallel

type Parallel struct {
	Branches []*Statement
}

Parallel can be a collection of Statements that runs in parallel.

type SampleActivities

type SampleActivities struct {
}

func (*SampleActivities) SampleActivity

func (a *SampleActivities) SampleActivity(ctx context.Context, commands []string, containerImage string) ([]string, error)

type Sequence

type Sequence struct {
	Elements []*Statement
}

Sequence consist of a collection of Statements that runs in sequential.

type Statement

type Statement struct {
	Activity *ActivityInvocation
	Sequence *Sequence
	Parallel *Parallel
}

Statement is the building block of dsl workflow. A Statement can be a simple ActivityInvocation or it could be a Sequence or Parallel.

type Workflow

type Workflow struct {
	Variables map[string]string
	Root      Statement
}

Workflow is the type used to express the workflow definition. Variables are a map of valuables. Variables can be used as input to Activity.

Jump to

Keyboard shortcuts

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