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.
Click to show internal directories.
Click to hide internal directories.