workerpool

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(p model.Payload) error

worker handler

type Job

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

Job represents the job to be run

type WorkerPool

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

func NewWorkerPool

func NewWorkerPool(maxWorkers int) *WorkerPool

func (*WorkerPool) FeedPayload

func (wp *WorkerPool) FeedPayload(payload model.Payload)

func (*WorkerPool) Run

func (wp *WorkerPool) Run()

func (*WorkerPool) SetHandler

func (wp *WorkerPool) SetHandler(f Handler) *WorkerPool

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