worker

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 10 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultWorkerOptions = internal.DefaultOptions

Functions

This section is empty.

Types

type Options

type Options = internal.Options

type RegisterOption added in v0.17.0

type RegisterOption workflowinternal.RegisterOption

func WithName added in v0.17.0

func WithName(name string) RegisterOption

type Worker

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

func New

func New(backend backend.Backend, options *Options) *Worker

func (*Worker) RegisterActivity added in v0.17.0

func (w *Worker) RegisterActivity(a workflow.Activity, opts ...RegisterOption) error

func (*Worker) RegisterWorkflow added in v0.17.0

func (w *Worker) RegisterWorkflow(wf workflow.Workflow, opts ...RegisterOption) error

func (*Worker) Start

func (w *Worker) Start(ctx context.Context) error

Start starts the worker.

To stop the worker, cancel the context passed to Start. To wait for completion of the active tasks, call `WaitForCompletion`.

func (*Worker) WaitForCompletion added in v0.2.0

func (w *Worker) WaitForCompletion() error

Jump to

Keyboard shortcuts

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