Documentation
¶
Index ¶
- type Action
- type AwaitSpec
- type EmitSpec
- type Retry
- type Task
- func (t *Task) AddSubTask(name string) *Task
- func (t *Task) Clone() *Task
- func (t *Task) CreateSubTask(name string, options ...func(*Task) *Task) *Task
- func (t *Task) IsAsync() bool
- func (t *Task) IsAutoPause() bool
- func (t *Task) WithAction(service string, method string, input interface{}) *Task
- func (t *Task) WithAsync(async bool) *Task
- func (t *Task) WithAutoPause(autoPause bool) *Task
- func (t *Task) WithDependsOn(taskID string) *Task
- func (t *Task) WithGoto(when string, taskName string) *Task
- func (t *Task) WithInit(name string, value interface{}) *Task
- func (t *Task) WithPost(name string, value interface{}) *Task
- type Template
- type Transition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
AddSubTask adds a subtask to the task
func (*Task) CreateSubTask ¶
CreateSubTask creates a subtask with the given properties and adds it to the task
func (*Task) IsAutoPause ¶
func (*Task) WithAction ¶
WithAction sets the action for the task
func (*Task) WithAutoPause ¶
WithAutoPause sets the auto-pause flag for the task
func (*Task) WithDependsOn ¶
WithDependsOn adds a dependency 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 ¶
Click to show internal directories.
Click to hide internal directories.