taskengine

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx *context.Context, executor TaskRunner, selector TaskSelector, taskList []*taskapi.Task) (bool, error)

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

Types

type TaskRunner

type TaskRunner interface {
	Run(*taskapi.Task) error
}

func NewTaskRunner

func NewTaskRunner(ctx *context.Context) TaskRunner

type TaskRunnerImpl

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

func (*TaskRunnerImpl) Run

func (r *TaskRunnerImpl) Run(task *taskapi.Task) (err error)

type TaskSelector

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

type TaskSelectorImpl

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

func NewTaskSelector

func NewTaskSelector() *TaskSelectorImpl

func (*TaskSelectorImpl) ShouldRun

func (s *TaskSelectorImpl) ShouldRun(task *taskapi.Task) (bool, error)

Jump to

Keyboard shortcuts

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