worker_pool

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 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
}

Jump to

Keyboard shortcuts

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