worker

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFull = errors.New("worker queue is full, make it larger in the config.")

Functions

func IsErrFull

func IsErrFull(err error) bool

Types

type IMsg

type IMsg interface {
	ID() uint64
	Headers() map[string]string
	Body() string
}

type IWorkerPool

type IWorkerPool interface {
	TryPut(task IMsg) error
	Start()
	Stop()
	AddHandler(msgType string, handler MsgHandler)
	DelHandler(msgType string)
}

type MsgHandler

type MsgHandler = func(msg IMsg) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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