worker

package
v1.0.55 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemporalWorker

type TemporalWorker interface {
	// Start starts the worker
	Start(ctx context.Context) error
	// Stop stops the worker
	Stop(ctx context.Context) error
	// IsStarted returns whether the worker is started
	IsStarted() bool
	// RegisterWorkflow registers a workflow with this worker
	RegisterWorkflow(workflow interface{}) error
	// RegisterActivity registers an activity with this worker
	RegisterActivity(activity interface{}) error
}

TemporalWorker represents a single worker instance

type TemporalWorkerManager

type TemporalWorkerManager interface {
	// GetOrCreateWorker gets an existing worker or creates a new one
	GetOrCreateWorker(taskQueue types.TemporalTaskQueue, options *models.WorkerOptions) (TemporalWorker, error)
	// StartWorker starts a worker for the given task queue
	StartWorker(taskQueue types.TemporalTaskQueue) error
	// StopWorker stops a worker for the given task queue
	StopWorker(taskQueue types.TemporalTaskQueue) error
	// StopAllWorkers stops all workers
	StopAllWorkers() error
	// GetWorkerStatus returns the status of all workers
	GetWorkerStatus() map[types.TemporalTaskQueue]bool
}

TemporalWorkerManager manages multiple workers

func NewTemporalWorkerManager

func NewTemporalWorkerManager(client client.TemporalClient, logger *logger.Logger) TemporalWorkerManager

NewTemporalWorkerManager creates a new worker manager instance

Jump to

Keyboard shortcuts

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