taskrunner

package module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

README

taskrunner


License: Apache-2.0
Created: 01.03.2025
Copyright: 2025 The Happy Authors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func(ex *Executor) (res Result)

type Executor added in v0.6.0

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

func (*Executor) AddTick added in v0.6.0

func (e *Executor) AddTick()

AddTick adds a tick to the executor which is affecting the executor's progress bar.

func (*Executor) Println added in v0.6.0

func (e *Executor) Println(a ...any) (n int, err error)

func (*Executor) Program added in v0.6.0

func (e *Executor) Program() *tea.Program

func (*Executor) Stdout added in v0.6.0

func (e *Executor) Stdout() *os.File

func (*Executor) Subtask added in v0.6.0

func (e *Executor) Subtask(name string, action Action) TaskID

func (*Executor) SubtaskD added in v0.6.0

func (e *Executor) SubtaskD(dep TaskID, name string, action Action) TaskID

type OutputMsg added in v0.6.0

type OutputMsg string

type Result

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

func Failure

func Failure(msg string) Result

Failure utility function to create Result with state FAILURE

func Info added in v0.4.0

func Info(msg string) Result

Info utility function to create Result with state INFO

func Notice added in v0.4.0

func Notice(msg string) Result

Notice utility function to create Result with state INFO

func Skip added in v0.6.0

func Skip(msg string) Result

Skip utility function to create Result with state FAILURE

func Success

func Success(msg string) Result

Success utility function to create Result with state SUCCESS

func Warn

func Warn(msg string) Result

Warn utility function to create Result with state WARNING

func (Result) WithDesc added in v0.6.0

func (r Result) WithDesc(desc string) Result

type Runner

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

func New

func New() *Runner

func (*Runner) Add

func (tr *Runner) Add(name string, action Action) TaskID

Add adds a task without any dependencies.

func (*Runner) AddD added in v0.6.0

func (tr *Runner) AddD(dep TaskID, name string, action Action) TaskID

AddD adds a task with a dependency on other task.

func (*Runner) AddTask added in v0.6.0

func (tr *Runner) AddTask(task Task) TaskID

AddTask adds a task to runner.

func (*Runner) Run

func (tr *Runner) Run() error

type SetStatusMsg added in v0.6.0

type SetStatusMsg string

type State

type State uint
const (
	SKIPPED State = iota
	SUCCESS
	INFO
	NOTICE
	WARNING
	FAILURE
)

type Task

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

func NewTask added in v0.6.0

func NewTask(name string, action Action) Task

func (Task) DependsOn added in v0.6.0

func (t Task) DependsOn(dep TaskID) Task

type TaskID added in v0.6.0

type TaskID = uuid.UUID

Jump to

Keyboard shortcuts

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