utils

package
v0.0.0-...-5002849 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobResult

type JobResult struct {
	Logs         string
	Error        error
	Job          interface{}
	ReturnValues interface{}
}

type WorkerPool

type WorkerPool struct {
	ResultChan chan JobResult
	// contains filtered or unexported fields
}

func NewWorkerPool

func NewWorkerPool(workers int, jobBuffer int,
	work func(context.Context, *log.Logger, interface{}) (interface{}, error), debug bool) WorkerPool

func (*WorkerPool) AddJob

func (wp *WorkerPool) AddJob(job interface{})

func (*WorkerPool) Start

func (wp *WorkerPool) Start(ctx context.Context)

func (*WorkerPool) Stop

func (wp *WorkerPool) Stop()

Jump to

Keyboard shortcuts

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