Documentation
¶
Overview ¶
Package coordinator handles task coordination and dependency management
Index ¶
Constants ¶
View Source
const ( // DirectionForward processes tasks in forward direction DirectionForward Direction = "forward" // DirectionBack processes tasks in backward direction DirectionBack Direction = "back" // ExternalIncrementalTaskType is the task type for external incremental scan ExternalIncrementalTaskType = "external:incremental" // ExternalFullTaskType is the task type for external full scan ExternalFullTaskType = "external:full" )
Variables ¶
View Source
var ( // ErrShutdownErrors is returned when errors occur during shutdown ErrShutdownErrors = errors.New("errors during shutdown") // ErrRefreshInProgress is returned when a bounds refresh is already in flight ErrRefreshInProgress = errors.New("bounds refresh already in progress") // ErrScheduledRunInProgress is returned when a scheduled run task is already in flight ErrScheduledRunInProgress = errors.New("scheduled run already in progress") // ErrNotScheduledModel is returned when trying to run-now a non-scheduled model ErrNotScheduledModel = errors.New("model is not a scheduled transformation") // ErrQueueManagerNil is returned when coordinator queue manager is not initialized. ErrQueueManagerNil = errors.New("queue manager is nil") )
Functions ¶
This section is empty.
Types ¶
type ArchiveHandler ¶ added in v0.0.2
type ArchiveHandler interface {
// Start begins monitoring archived tasks
Start(ctx context.Context) error
// Stop gracefully shuts down the handler
Stop() error
}
ArchiveHandler manages archive monitoring and cleanup
func NewArchiveHandler ¶ added in v0.0.2
func NewArchiveHandler(log logrus.FieldLogger, redisOpt *redis.Options) (ArchiveHandler, error)
NewArchiveHandler creates a new archive handler
type Service ¶
type Service interface {
// Start initializes and starts the coordinator service
Start(ctx context.Context) error
// Stop gracefully shuts down the coordinator service
Stop() error
// Process handles transformation processing in the specified direction
Process(transformation models.Transformation, direction Direction)
// ProcessExternalScan handles external model scan processing
ProcessExternalScan(modelID, scanType string)
// TriggerBoundsRefresh enqueues a full external scan for admin-initiated bounds refresh
TriggerBoundsRefresh(ctx context.Context, modelID string) error
// TriggerScheduledRun enqueues an immediate run for a scheduled transformation
TriggerScheduledRun(ctx context.Context, modelID string) error
}
Service defines the public interface for the coordinator
func NewService ¶
func NewService(log logrus.FieldLogger, redisOpt *redis.Options, dag models.DAGReader, adminService admin.Service, validator validation.Validator) (Service, error)
NewService creates a new coordinator service
Click to show internal directories.
Click to hide internal directories.