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 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 Engine
- type EngineKubernetesOptions
- type EngineOptions
- type EventReaction
- type Pipeline
- type PipelineMetadata
- type PipelineSpec
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConditionCombined ¶ added in v0.51.0
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 ¶ added in v0.62.0
ConditionTaskEventReported return the condition that satisfied when task reported event in format {TASK_NAME}.{EVENT}
func ConditionTaskFinished ¶ added in v0.43.0
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 ¶ added in v0.41.0
func HandleEngineError(err error)
HandleEngineError prints the error in case the engine.Run was failed and exit
func NewFunctionTask ¶ added in v0.64.0
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 ¶ added in v0.64.0
NewSerivceTask build task task calls a service with arguments
Types ¶
type EngineKubernetesOptions ¶ added in v0.24.0
type EngineKubernetesOptions struct { Path string Context string Namespace string InCluster bool Host string B64Crt string Token string LogsVolumeClaimName string LogsVolumeName string }
EngineKubernetesOptions when running service on kubernetes cluster
type EngineOptions ¶
type EngineOptions struct { Pipeline Pipeline // LogsDirectory path where to store logs LogsDirectory string Kubeconfig *EngineKubernetesOptions Logger logger.Logger // contains filtered or unexported fields }
EngineOptions to create new engine
type EventReaction ¶ added in v0.31.0
type EventReaction struct { Condition condition.Condition Reaction func(ev event.Event, state state.State) []task.Task }
EventReaction is a binding of an event to a function that builds tasks
type Pipeline ¶
type Pipeline struct { Metadata PipelineMetadata Spec PipelineSpec }
Pipeline is the pipeline representation
type PipelineMetadata ¶
PipelineMetadata holds all the metadata of a pipeline
type PipelineSpec ¶
type PipelineSpec struct { Reactions []EventReaction Services []Service }
PipelineSpec is the spec of a pipeline
type Service ¶
type Service struct { // Name is official service which is part of the service catalog (https://github.com/open-integration/core-services/releases) Name string // Version of the service, empty string will use the latest version from catalog Version string // Path a location of the local fs the service can be found, Path cannot be set with Name together Path string // As alias name to refer the service as part of the task implementation As string }
Service is a Service a pipeline should execute