worker

package
v1.7.17 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPool

type MockPool struct {
	mock.Mock
}

Pool is an autogenerated mock type for the Pool type

func (*MockPool) Send

func (_m *MockPool) Send(_a0 Request)

Send provides a mock function with given fields: _a0

func (*MockPool) Shutdown

func (_m *MockPool) Shutdown()

Shutdown provides a mock function with given fields:

type Pool

type Pool interface {
	// Send the request to the worker pool.
	//
	// Send should never be called after [Shutdown] is called.
	Send(Request)

	// Shutdown the worker pool.
	//
	// This method will block until all workers have finished their current
	// tasks.
	//
	// It is safe to call shutdown multiple times.
	Shutdown()
}

func NewPool

func NewPool(size int) Pool

type Request

type Request func()

Jump to

Keyboard shortcuts

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