buildr/internal/execution/api.go

27 lines
485 B
Go
Raw Normal View History

2023-04-11 20:30:48 +00:00
package execution
import (
"context"
"code.icb4dc0.de/buildr/buildr/modules"
)
type Spec struct {
RepoRoot string
BinariesDirectory string
CacheDirectory string
OutDirectory string
LogsDirectory string
LogToStdErr bool
}
2023-04-11 20:30:48 +00:00
type TaskProvider interface {
CanProvide(m modules.ModuleWithMeta) bool
Create(m modules.ModuleWithMeta) (Task, error)
2023-04-11 20:30:48 +00:00
}
type Task interface {
Execute(ctx context.Context, spec Spec) error
2023-04-11 20:30:48 +00:00
AddDependentTask(other Task)
}