execution

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithProvider

func WithProvider(p TaskProvider) taskFactoryOption

Types

type Plan

type Plan struct {
	// contains filtered or unexported fields
}

func NewPlanFor

func NewPlanFor(
	moduleType modules.Category,
	moduleName string,
	repo *modules.Repository,
	factory *TaskFactory,
) (*Plan, error)

func (*Plan) Execute

func (p *Plan) Execute(ctx context.Context, spec Spec) error

type Spec

type Spec struct {
	RepoRoot          string
	BinariesDirectory string
	CacheDirectory    string
	OutDirectory      string
	LogsDirectory     string
	LogToStdErr       bool
}

type Task

type Task interface {
	Execute(ctx context.Context, spec Spec) error
	AddDependentTask(other Task)
}

type TaskDependencies

type TaskDependencies []Task

func (*TaskDependencies) AddDependentTask

func (d *TaskDependencies) AddDependentTask(other Task)

func (*TaskDependencies) Execute

func (d *TaskDependencies) Execute(ctx context.Context, spec Spec) error

type TaskFactory

type TaskFactory struct {
	// contains filtered or unexported fields
}

func NewTaskFactory

func NewTaskFactory(opts ...taskFactoryOption) *TaskFactory

func (*TaskFactory) TaskForModule

func (f *TaskFactory) TaskForModule(id string, repo *modules.Repository) (Task, error)

func (*TaskFactory) TaskForModuleWithoutDependencies

func (f *TaskFactory) TaskForModuleWithoutDependencies(module modules.ModuleWithMeta) (Task, error)

type TaskProvider

type TaskProvider interface {
	CanProvide(m modules.ModuleWithMeta) bool
	Create(m modules.ModuleWithMeta) (Task, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL