Documentation ¶
Index ¶
- func ConditionCombined(conditions ...condition.Condition) condition.Condition
- func ConditionEngineStarted() condition.Condition
- func ConditionTaskEventReported(name string) condition.Condition
- func ConditionTaskFinished(task string) condition.Condition
- func ConditionTaskFinishedWithStatus(task string, status string) condition.Condition
- func HandleEngineError(err error)
- func NewEngine(opt *EngineOptions) engine.Engine
- func NewFunctionTask(name string, fn func(context.Context, task.RunOptions) ([]byte, error)) task.Task
- func NewSerivceTask(name string, service string, endpoint string, arg ...task.Argument) task.Task
- func NewTickerTask(name string, tickInterval time.Duration, totalTime time.Duration) task.Task
- type EngineOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConditionCombined ¶
ConditionCombined returns the condition that is evaluated to true when all the conditions are true
func ConditionEngineStarted ¶
ConditionEngineStarted returns the condition that is evaluated to true on engine.started event
func ConditionTaskEventReported ¶
ConditionTaskEventReported return the condition that satisfied when task reported event in format {TASK_NAME}.{EVENT}
func ConditionTaskFinished ¶
ConditionTaskFinished returns the condition that is evaluated to true on task.finished event and the task is marked as finished in the state
func ConditionTaskFinishedWithStatus ¶
ConditionTaskFinishedWithStatus returns the condition that is evaluated to true on task.finished event and the task is marked as finished in the state and the status is as given
func HandleEngineError ¶
func HandleEngineError(err error)
HandleEngineError prints the error in case the engine.Run was failed and exit
func NewFunctionTask ¶
func NewFunctionTask(name string, fn func(context.Context, task.RunOptions) ([]byte, error)) task.Task
NewFunctionTask build task that will be executed in same process
func NewSerivceTask ¶
NewSerivceTask build task task calls a service with arguments
Types ¶
type EngineOptions ¶
type EngineOptions struct { Pipeline engine.Pipeline // LogsDirectory path where to store logs LogsDirectory string Kubeconfig *engine.KubernetesOptions Logger logger.Logger }
EngineOptions to create new engine