Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TaskName = "run_task_background" TaskDescriptor = &types.TaskDescriptor{ Name: TaskName, Description: "Runs foreground and background task with configurable dependencies.", Config: DefaultConfig(), NewTask: NewTask, } )
Functions ¶
func NewTask ¶
func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)
Types ¶
type Config ¶
type Config struct {
ForegroundTask *helper.RawMessage `yaml:"foregroundTask" json:"foregroundTask"`
BackgroundTask *helper.RawMessage `yaml:"backgroundTask" json:"backgroundTask"`
ExitOnForegroundSuccess bool `yaml:"exitOnForegroundSuccess" json:"exitOnForegroundSuccess"`
ExitOnForegroundFailure bool `yaml:"exitOnForegroundFailure" json:"exitOnForegroundFailure"`
// action when background task stops
// "ignore" - do nothing (default)
// "fail" - exit with failure
// "succeed" - exit with success
// "failOrIgnore" - exit with failure if background task failed, ignore on success
OnBackgroundComplete string `yaml:"onBackgroundComplete" json:"onBackgroundComplete"`
NewVariableScope bool `yaml:"newVariableScope" json:"newVariableScope"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) Description ¶
func (*Task) LoadConfig ¶
func (*Task) Logger ¶
func (t *Task) Logger() logrus.FieldLogger
Click to show internal directories.
Click to hide internal directories.