fusionworker

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FusionWorker

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

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

func New

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

New creates a new FusionWorker. 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 (*FusionWorker) Run

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

Run starts the FusionWorker. It claims tasks from its queues.

type Option

type Option func(*FusionWorker)

Option is fuser 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".

func WithMemoization

func WithMemoization(on bool) Option

WithMemoization sets things up to memoize results to files as well as just pushing thing into the outbox.

Jump to

Keyboard shortcuts

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