Documentation ¶
Overview ¶
A task encapsulates the logic of iterating or using composites for either a job or a workflow.
Index ¶
- Variables
- type TaskFactory
- func (f *TaskFactory) CreateTask(ctx context.Context, workflowFilter string, cid string) (*dag.Node[dag.IOSpec], error)
- func (f *TaskFactory) GetJob(name string) (config.Job, error)
- func (f *TaskFactory) GetNode(step string) (config.Node, error)
- func (f *TaskFactory) JobNames() []string
- func (f *TaskFactory) NodeNames() []string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDisconnectedNode = errors.New("node expected by input doesn't exist")
View Source
var ErrEmptyWorkflows = errors.New("no workflows provided")
View Source
var ErrExecutorNotFound = errors.New("executor type not found")
View Source
var ErrJobNotFound = errors.New("job not found")
View Source
var ErrNoRootNodes = errors.New("no root nodes found, please check your config")
View Source
var ErrTooManyRootNodes = errors.New("too many root nodes found, amplify only works with one root node")
TODO: This is a limitation. No reason why we can't have multiple root nodes.
View Source
var ErrWorkflowNoJobs = errors.New("workflow has no jobs")
View Source
var ErrWorkflowNotFound = errors.New("workflow not found")
Functions ¶
This section is empty.
Types ¶
type TaskFactory ¶
type TaskFactory struct {
// contains filtered or unexported fields
}
func NewTaskFactory ¶
func NewTaskFactory(appContext cli.AppContext, execQueue queue.Queue) (*TaskFactory, error)
NewTaskFactory creates a factory that makes it easier to create tasks for the workers
func (*TaskFactory) CreateTask ¶
func (f *TaskFactory) CreateTask(ctx context.Context, workflowFilter string, cid string) (*dag.Node[dag.IOSpec], error)
Create tasks forms the DAG of all the work. The number of inputs (len(cid)) must be equal to the number of outputs (len(dag.Nodes)), otherwise it ends up running multiple times.
func (*TaskFactory) GetJob ¶
func (f *TaskFactory) GetJob(name string) (config.Job, error)
GetJob gets a job config from a job factory
func (*TaskFactory) JobNames ¶
func (f *TaskFactory) JobNames() []string
JobNames returns all the names of the jobs in a job factory
func (*TaskFactory) NodeNames ¶
func (f *TaskFactory) NodeNames() []string
Click to show internal directories.
Click to hide internal directories.