worker

package
v0.0.0-...-adead5e Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker interface {
	// Runs the worker, processing tasks from the dispatch queue.
	Run(ctx context.Context)
}

Worker is responsible for processing tasks from the dispatch queue.

func NewWorker

func NewWorker(opts WorkerOptions) Worker

type WorkerOptions

type WorkerOptions struct {
	// Application-level configuration.
	Config config.Config

	// Controller instance to interact with the network layer.
	Controller *control.Controller

	// Queue to dispatch tasks to the worker.
	DispatchQueue <-chan task.Task

	// Sender for sending events and workflows.
	Sender service.ServiceSender
}

WorkerOptions contains options for creating a new worker.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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