tasks

package
v0.0.0-...-703489d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Part

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

Part represents a part of a bigger Task.

func (*Part) Skip

func (p *Part) Skip(reason string)

Skip print a warning message.

func (*Part) Starting

func (p *Part) Starting() PartProcessing

Starting starts a part processing.

type PartProcessing

type PartProcessing interface {
	Notify(status string)
	Done(err error)
}

PartProcessing is an interface that is used to process long running part of tasks.

type Task

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

Task represents a mage task enriched with icon and description that might be multiline.

func Start

func Start(icon, action string, multiline bool) *Task

Start will start a single line task.

func (*Task) End

func (t *Task) End(errs ...error)

End will report task completion, either successful or failures.

func (*Task) Part

func (t *Task) Part(part string) *Part

Part create a part that can be reported further.

Jump to

Keyboard shortcuts

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