tasks

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFeaturesFromTasks added in v0.0.7

func GetFeaturesFromTasks(tasks []*Task) map[string]string

func InspectTasks added in v0.2.0

func InspectTasks(taskList []*Task, proj *project.Project) (s string)

func Run added in v0.8.0

func Run(ctx *Context, executor TaskRunner, selector TaskSelector, taskList []*Task) (success bool, err error)

Run accepts a list of tasks and check for their requirements and runs them if their conditions are met

Types

type Context added in v0.0.5

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

Context provides the context in which a Task run

func NewContext added in v0.8.0

func NewContext(cfg *config.Config, proj *project.Project, ui *termui.UI, taskList []*Task) *Context

NewContext returns a *Context for a project, using the environment

type Task

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

Task represents a task created by a taskDefinition.parser and specified by the TaskInfo

func GetTasksFromProject added in v0.0.5

func GetTasksFromProject(proj *project.Project) (taskList []*Task, err error)

type TaskRunner added in v0.8.0

type TaskRunner interface {
	Run(*Context, *Task) error
}

type TaskRunnerImpl added in v0.8.0

type TaskRunnerImpl struct{}

func (*TaskRunnerImpl) Run added in v0.8.0

func (r *TaskRunnerImpl) Run(ctx *Context, task *Task) (err error)

type TaskSelector added in v0.8.0

type TaskSelector interface {
	ShouldRun(*Context, *Task) (bool, error)
}

type TaskSelectorImpl added in v0.8.0

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

func NewTaskSelector added in v0.8.0

func NewTaskSelector() *TaskSelectorImpl

func (*TaskSelectorImpl) ShouldRun added in v0.8.0

func (s *TaskSelectorImpl) ShouldRun(ctx *Context, task *Task) (bool, error)

Jump to

Keyboard shortcuts

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