pool

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrZeroItems is returned when an empty slice is provided to Start
	ErrZeroItems = errors.New("zero items provided")
)

Functions

This section is empty.

Types

type Handler

type Handler func(ctx context.Context, db string) error

Handler handles

type Pooler

type Pooler interface {
	Start(context.Context, []string, Handler) error
}

Pooler interface abstracts a Pool instance

type SizablePool

type SizablePool struct {
	Size int
}

SizablePool is a pool with a size!

func (SizablePool) Start

func (p SizablePool) Start(ctx context.Context, items []string, h Handler) error

Start kicks handling of items in a pool

Jump to

Keyboard shortcuts

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