worker_pool

package
Version: v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionOrder

type ExecutionOrder int
const (
	OrderRandom ExecutionOrder = iota
	OrderByKey
	OrderPreserved
)

func (ExecutionOrder) String

func (eo ExecutionOrder) String() string

type Pool

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

func NewPool

func NewPool(id string, tb *topology.TopologyBuilder, metricsReporter metrics.Reporter, logger log.Logger, config *PoolConfig) *Pool

func (*Pool) Run

func (p *Pool) Run(ctx context.Context, key, val []byte, doneClb func())

func (*Pool) Stop

func (p *Pool) Stop()

type PoolConfig

type PoolConfig struct {
	NumOfWorkers     int
	WorkerBufferSize int
	Order            ExecutionOrder
}

Source Files

Jump to

Keyboard shortcuts

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