parallel

package
v0.6.16 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(tasks []Task, concurrency int64) error

func ExecuteLabeled added in v0.5.82

func ExecuteLabeled(tasks []LabeledTask, concurrency int64, policy ErrorPolicy) error

Types

type ErrorAction added in v0.5.82

type ErrorAction int
const (
	ErrActionIgnore ErrorAction = 0
	ErrActionReport ErrorAction = 1
	ErrActionRetry  ErrorAction = 2
)

type ErrorPolicy added in v0.5.82

type ErrorPolicy func(task LabeledTask, attempt int, err error) ErrorAction

func AlwaysReport added in v0.5.82

func AlwaysReport() ErrorPolicy

type Executable added in v0.6.16

type Executable interface {
	Execute(task LabeledTask) error
}

type LabeledTask added in v0.5.82

type LabeledTask interface {
	Type() string
	Execute() error
	Label() string
	WrapTask(func(executable Executable) Executable)
	DependsOn(task LabeledTask, timeout time.Duration)
}

func TaskWithLabel added in v0.5.82

func TaskWithLabel(taskType string, label string, task Task) LabeledTask

type Task

type Task func() error

Jump to

Keyboard shortcuts

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