workers

package
v0.0.0-...-27647ab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoParallel

func DoParallel[T any](n int, fns []func() T) []T

func DoParallelErrGroup

func DoParallelErrGroup[T any](ctx context.Context, n int, fns []func(ctx context.Context) (T, error)) ([]T, error)

Types

type SleepWorker

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

func NewSleepWorker

func NewSleepWorker(fn func() bool, cfg SleepWorkerConfig) *SleepWorker

func (*SleepWorker) Start

func (w *SleepWorker) Start()

func (*SleepWorker) Stop

func (w *SleepWorker) Stop()

type SleepWorkerConfig

type SleepWorkerConfig struct {
	Interval time.Duration
}

type WorkerId

type WorkerId int

Jump to

Keyboard shortcuts

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