Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Health ¶
type Health struct {
Running bool `json:"running"`
QueueHealth bool `json:"queue_health"`
Error string `json:"error,omitempty"`
}
Health returns health status of the worker.
type Orchestrator ¶
type Orchestrator interface {
SyncSource(ctx context.Context, sourceID string) (*domain.SyncResult, error)
SyncAll(ctx context.Context) ([]*domain.SyncResult, error)
}
Orchestrator defines the sync operations needed by the worker. This is a minimal interface to allow for testing.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker processes tasks from the task queue. It runs the sync orchestrator for each sync task.
type WorkerConfig ¶
type WorkerConfig struct {
TaskQueue driven.TaskQueue
Orchestrator Orchestrator
Scheduler *services.Scheduler
Logger *slog.Logger
Concurrency int // Number of concurrent task processors
DequeueTimeout int // Seconds to wait for a task before checking again
}
WorkerConfig holds configuration for the worker.
Click to show internal directories.
Click to hide internal directories.