graph

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Service string      `json:"service,omitempty" yaml:"service,omitempty"`
	Method  string      `json:"method,omitempty" yaml:"method,omitempty"`
	Input   interface{} `json:"input,omitempty" yaml:"input,omitempty"`
}

type AwaitSpec added in v0.1.24

type AwaitSpec struct {
	Mode    string `json:"mode,omitempty" yaml:"mode,omitempty"`       // all|first|anyError (defaults to all)
	Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"` // duration string e.g. "10m"
	Group   string `json:"on,omitempty" yaml:"on,omitempty"`           // named emit group (optional)
	Merge   string `json:"merge,omitempty" yaml:"merge,omitempty"`     // append|replace
}

AwaitSpec instructs the engine to wait for completion of previously emitted executions before considering the current task finished.

type EmitSpec added in v0.1.24

type EmitSpec struct {
	ForEach string `json:"forEach,omitempty" yaml:"forEach,omitempty"` // expression resolving to slice/array
	As      string `json:"as,omitempty" yaml:"as,omitempty"`           // loop variable name
	Task    *Task  `json:"task,omitempty" yaml:"task,omitempty"`       // template task
}

EmitSpec describes a dynamic fan-out of child executions that should be emitted by the task at run-time.

type Retry added in v0.1.1

type Retry struct {
	Type       string  `json:"type,omitempty" yaml:"type,omitempty"` // fixed, exponential, none
	MaxRetries int     `json:"maxRetries,omitempty" yaml:"maxRetries,omitempty"`
	Delay      string  `json:"delay,omitempty" yaml:"delay,omitempty"`           // base delay (duration string)
	Multiplier float64 `json:"multiplier,omitempty" yaml:"multiplier,omitempty"` // exponential multiplier (>1)
	MaxDelay   string  `json:"maxDelay,omitempty" yaml:"maxDelay,omitempty"`
}

Retry strategy for task

type Task

type Task struct {
	ID         string           `json:"id,omitempty" yaml:"id,omitempty"`
	TypeName   string           `json:"typeName,omitempty" yaml:"typeName,omitempty"`
	Name       string           `json:"name,omitempty" yaml:"name,omitempty"`
	Namespace  string           `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	Init       state.Parameters `json:"init,omitempty" yaml:"init,omitempty"`
	When       string           `json:"when,omitempty" yaml:"when,omitempty"`
	Action     *Action          `json:"action,omitempty" yaml:"action,omitempty"`
	DependsOn  []string         `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty"`
	Tasks      []*Task          `json:"tasks,omitempty" yaml:"tasks,omitempty"`
	Post       state.Parameters `json:"post,omitempty" yaml:"post,omitempty"`
	Template   *Template        `json:"template,omitempty" yaml:"template,omitempty"`
	Goto       []*Transition    `json:"goto,omitempty" yaml:"goto,omitempty"`
	Async      bool             `json:"async,omitempty" yaml:"async,omitempty"`
	AutoPause  *bool            `json:"autoPause,omitempty" yaml:"autoPause,omitempty"`
	Retry      *Retry           `json:"retry,omitempty" yaml:"retry,omitempty"`
	ScheduleIn string           `json:"scheduleIn,omitempty" yaml:"scheduleIn,omitempty"`
	// Async fan-out/fan-in extensions
	Emit  *EmitSpec  `json:"emit,omitempty" yaml:"emit,omitempty"`
	Await *AwaitSpec `json:"await,omitempty" yaml:"await,omitempty"`
}

func (*Task) AddSubTask

func (t *Task) AddSubTask(name string) *Task

AddSubTask adds a subtask to the task

func (*Task) Clone

func (t *Task) Clone() *Task

Clone creates a deep copy of a task

func (*Task) CreateSubTask

func (t *Task) CreateSubTask(name string, options ...func(*Task) *Task) *Task

CreateSubTask creates a subtask with the given properties and adds it to the task

func (*Task) IsAsync

func (t *Task) IsAsync() bool

func (*Task) IsAutoPause

func (t *Task) IsAutoPause() bool

func (*Task) WithAction

func (t *Task) WithAction(service string, method string, input interface{}) *Task

WithAction sets the action for the task

func (*Task) WithAsync

func (t *Task) WithAsync(async bool) *Task

WithAsync sets the task to run asynchronously

func (*Task) WithAutoPause

func (t *Task) WithAutoPause(autoPause bool) *Task

WithAutoPause sets the auto-pause flag for the task

func (*Task) WithDependsOn

func (t *Task) WithDependsOn(taskID string) *Task

WithDependsOn adds a dependency to the task

func (*Task) WithGoto

func (t *Task) WithGoto(when string, taskName string) *Task

WithGoto adds a transition to the task

func (*Task) WithInit

func (t *Task) WithInit(name string, value interface{}) *Task

WithInit adds an initialization parameter to the task

func (*Task) WithPost

func (t *Task) WithPost(name string, value interface{}) *Task

WithPost adds a post-execution parameter to the task

type Template

type Template struct {
	Task     *Task             `json:"task,omitempty" yaml:"task,omitempty"`
	Selector *state.Parameters `json:"selector,omitempty" yaml:"selector,omitempty"`
}

type Transition

type Transition struct {
	When string `json:"when,omitempty" yaml:"when,omitempty"`
	Task string `json:"task,omitempty" yaml:"task,omitempty"`
}

Jump to

Keyboard shortcuts

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