analyticworker

package
v0.0.0-...-5a762db Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyticWorker

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

AnalyticWorker provides means for running a worker against a task queue. The tasks it consumes are DetectionTask protos.

func New

func New(mfClient *medifor.Client, eqClient *entroq.EntroQ, workQueues []string, opts ...Option) *AnalyticWorker

New creates a new AnalyticWorker. To operate, the worker needs access to a task client, the medifor client, and the name of a queue it should read tasks from.

func (*AnalyticWorker) Run

func (w *AnalyticWorker) Run(ctx context.Context) error

Run starts the AnalyticWorker. It claims tasks from the given queues.

type Option

type Option func(*AnalyticWorker)

Option is an analytic worker option used when calling New.

func WithMaxAttempts

func WithMaxAttempts(max int) Option

WithMaxAttempts sets the maximum attempts to the given value. Values less than 1 mean "unlimited".

Jump to

Keyboard shortcuts

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