Documentation
¶
Overview ¶
Package worker implements the worker functionality for CBT
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoQueuesConfigured is returned when no queues are configured ErrNoQueuesConfigured = errors.New("at least one queue must be configured") // ErrInvalidConcurrency is returned when concurrency is not positive ErrInvalidConcurrency = errors.New("concurrency must be positive") )
View Source
var ( ErrInvalidTaskContext = errors.New("invalid task context type") ErrInvalidTransformationType = errors.New("invalid transformation type") ErrTableDoesNotExist = errors.New("table does not exist") )
Define static errors
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Concurrency int `yaml:"concurrency" default:"10"`
Tags []string `yaml:"tags,omitempty"` // Optional tag-based model filtering
ShutdownTimeout int `yaml:"shutdownTimeout" default:"30"`
}
Config contains worker-specific settings
type ModelExecutor ¶
type ModelExecutor struct {
// contains filtered or unexported fields
}
ModelExecutor implements the execution of model transformations
func NewModelExecutor ¶
func NewModelExecutor(logger *logrus.Logger, chClient clickhouse.ClientInterface, modelsService *models.Service, adminManager *admin.Service) *ModelExecutor
NewModelExecutor creates a new model executor
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service encapsulates the worker application logic
func NewService ¶
func NewService(log *logrus.Logger, cfg *Config, chClient clickhouse.ClientInterface, adminService *admin.Service, modelsService *models.Service, redisOpt *redis.Options, validator *validation.DependencyValidator) (*Service, error)
NewService creates a new worker application
Click to show internal directories.
Click to hide internal directories.