workers

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 7

README

workers

worker pool for go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execute

type Execute func(v interface{}, meta map[string]string)

type Option

type Option struct {
	MaxWorkerNum      int
	MaxIdleTime       time.Duration
	CommandTimeout    time.Duration
	CommandBufferSize int
	Fn                Execute
}

type Unit

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

type Workers

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

func NewWorkers

func NewWorkers(option Option) (w *Workers)

func (*Workers) Command

func (w *Workers) Command(v interface{}, metaKvs ...string) (ok bool)

func (*Workers) Start

func (w *Workers) Start()

func (*Workers) Stop

func (w *Workers) Stop()

func (*Workers) Sync

func (w *Workers) Sync()

Jump to

Keyboard shortcuts

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