syncutils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartTasks added in v0.1.2

func StartTasks[T any](opt TaskOption, items []T, taskFunc func(item T) error) error

Types

type TaskGroup

type TaskGroup struct {
	Items        interface{}
	Func         func(item interface{}) error
	ShowProgress bool
	MaxWorker    int

	Title string
	// contains filtered or unexported fields
}

func (TaskGroup) Start

func (g TaskGroup) Start() error

type TaskOption added in v0.1.2

type TaskOption struct {
	TaskName     string
	MaxWorker    int
	ShowProgress bool
	PreStart     func()
}

Jump to

Keyboard shortcuts

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