Documentation
¶
Overview ¶
Package tasks contains the built-in tasks of Reginald the internal task-related utilities for running tasks and validating the task configs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDuplicate = errors.New("duplicate task")
)
Errors returned by the general taks functions.
Functions ¶
func Configure ¶
func Configure( ctx context.Context, cfg []taskcfg.Config, defaults taskcfg.Defaults, types TaskTypes, ) ([]taskcfg.Config, error)
Configure propagates the default values for task configs, assigns missing task IDs, and validates the task configs. The functions returns the new tasks configs and does not edit the slice in place.
Types ¶
type Task ¶
type Task struct {
// Validate validates the given cfg for this task type.
Validate func(ctx context.Context, t *Task, opts taskcfg.Options) error
// Run runs the task.
Run func(ctx context.Context, t *Task, dir fspath.Path, opts taskcfg.Options) error
// Type is the name of the task type.
Type string
}
A Task is a task within Reginald.
Click to show internal directories.
Click to hide internal directories.