concurrent

package
v0.0.0-...-05d1b2a Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Executor

func Executor(ctx context.Context, opts ...Option) error

func ExecutorInterrupt

func ExecutorInterrupt(ctx context.Context, opts ...Option) error

Types

type Option

type Option func(*Options)

func MaxG

func MaxG(n int) Option

func ShowProgressbar

func ShowProgressbar() Option

func Tasks

func Tasks(t []Tasker) Option

type Options

type Options struct {
	MaxG            int
	Tasks           []Tasker
	ShowProgressbar bool
}

func NewOptions

func NewOptions(opts ...Option) Options

type Tasker

type Tasker interface {
	Execute(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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