Documentation
¶
Index ¶
- type Action
- 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 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"`
}
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.