Task
type Task interface{}Base interface for Tilebox workflows tasks. It doesn’t need to be identifiable or executable, but it can be both (see below).
Methods
Task.Execute(ctx context.Context) errorThe entry point for the execution of the task. If not defined, the task can’t be registered with a runner but can still be submitted.
Task.Identifier() TaskIdentifierProvides a user-defined task identifier. The identifier defines the local task name and version. Workflow scope is selected at submission and bound by release runners, not encoded in this method. If not defined, the runner will generate an identifier for it using reflection.
JSON-serializable task
type SampleTask struct {
Message string
Depth int
BranchFactor int
}Optional task input parameters, defined as struct fields. Supported types are all types supported by json.Marshal.
Protobuf-serializable task
type SampleTask struct {
examplesv1.SpawnWorkflowTreeTask
}Task can also be defined as a protobuf message. An example using task protobuf messages can be found here.