worker

package
v0.0.0-...-87e9daf Latest Latest
Warning

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

Go to latest
Published: Mar 9, 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 ExampleHandler

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

func (*ExampleHandler) JobType

func (e *ExampleHandler) JobType() string

func (*ExampleHandler) Process

func (e *ExampleHandler) Process(payload string) (string, error)

func (*ExampleHandler) VisiblityTimeout

func (e *ExampleHandler) VisiblityTimeout() time.Duration

type Handler

type Handler interface {
	Process(payload string) (string, error)
	JobType() string
	VisiblityTimeout() time.Duration
}

func NewExampleHandler

func NewExampleHandler() Handler

type Worker

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

func NewWorker

func NewWorker(handler Handler, resultPost postbox.ResultsPostbox) *Worker

func (*Worker) Start

func (w *Worker) Start()

func (*Worker) Stop

func (w *Worker) Stop()

Jump to

Keyboard shortcuts

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