task

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.1.0

type Option func(*Task)

Option configures a runtime option.

func Args added in v1.1.4

func Args(args map[string]interface{}) Option

Args returns an option configured with a args value.

func Log added in v1.1.0

func Log(log *log.Logger) Option

Log returns an option configured with a log value.

func Variables added in v1.1.4

func Variables(vars map[string]string) Option

Variables returns an option configured with a variables value.

type Task

type Task struct {
	Args      map[string]interface{}
	Commands  yaml2.List
	Deps      []string
	Dir       string
	Docker    *config.Docker
	Interval  string
	Summary   string
	Status    yaml2.List
	Tasks     yaml2.List
	Usage     string
	Variables map[string]string
	// contains filtered or unexported fields
}

Task represents a task.

func (*Task) ID added in v1.1.0

func (t *Task) ID(id ...string) string

ID returns the task id.

func (*Task) Options added in v1.1.0

func (t *Task) Options(opts ...Option)

Options sets task options.

func (*Task) Prepare added in v1.1.0

func (t *Task) Prepare() error

Prepare prepares the command and directory.

func (*Task) PrintUsage added in v1.1.0

func (t *Task) PrintUsage(id string)

PrintUsage print usage of task.

func (*Task) UpToDate added in v1.1.0

func (t *Task) UpToDate(ctx context.Context) bool

UpToDate determine if a task is up to date using status commands.

Jump to

Keyboard shortcuts

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