worker

package
v0.0.0-...-e49e9a2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultWorkerOptions = internal.DefaultOptions

Functions

This section is empty.

Types

type ActivityRegistry

type ActivityRegistry interface {
	RegisterActivity(a interface{}) error
}

type Options

type Options = internal.Options

type Registry

type Registry interface {
	WorkflowRegistry
	ActivityRegistry
}

type Worker

type Worker interface {
	Registry

	// Start starts the worker.
	//
	// To stop the worker, cancel the context passed to Start. To wait for completion of the active
	// work items, call `WaitForCompletion`.
	Start(ctx context.Context) error

	// WaitForCompletion
	WaitForCompletion() error
}

func New

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

type WorkflowRegistry

type WorkflowRegistry interface {
	RegisterWorkflow(w workflow.Workflow) error
}

Jump to

Keyboard shortcuts

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