Help us shape the future of Go! Take the 2026 Go Developer Survey

workerPool

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerPool

type WorkerPool[T any] struct {
	// contains filtered or unexported fields
}

func NewWorkerPool

func NewWorkerPool[T any](maxWorkers int, serviceName constants.ServiceName, logger *zap.SugaredLogger) *WorkerPool[T]

func (*WorkerPool[_]) Error

func (wp *WorkerPool[_]) Error() error

func (*WorkerPool[T]) GetResponse

func (wp *WorkerPool[T]) GetResponse() []T

func (*WorkerPool[T]) IncludeZeroValue

func (wp *WorkerPool[T]) IncludeZeroValue() *WorkerPool[T]

func (*WorkerPool[T]) InitializeResponse

func (wp *WorkerPool[T]) InitializeResponse() *WorkerPool[T]

func (*WorkerPool[_]) StopWait

func (wp *WorkerPool[_]) StopWait() error

func (*WorkerPool[T]) Submit

func (wp *WorkerPool[T]) Submit(task func() (T, error))

Jump to

Keyboard shortcuts

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