graph

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 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 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"`
}

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