Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
InventoryStore inventorystore.Store // For rack/component lookups (read-only)
TaskStore taskstore.Store // For task persistence
ExecutorConfig executor.ExecutorConfig
// MaxWaitingTasksPerRack is the maximum number of queued tasks allowed per
// rack. Zero uses the default (5).
MaxWaitingTasksPerRack int
// DefaultQueueTimeout is the expiry duration for tasks that do not supply
// their own QueueTimeout. Zero uses the default (1 hour).
DefaultQueueTimeout time.Duration
// PromoterConfig tunes the Promoter's sweep interval and channel size.
// Zero values use the Promoter's own defaults.
PromoterConfig conflict.PromoterConfig
}
Config holds the configuration for the task manager.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager maintains unfinished tasks, schedules them via temporal workflows, and monitors their progress.
func (*Manager) CancelTask ¶
CancelTask cancels a task by its ID. Waiting tasks are terminated immediately (no workflow to stop). Pending/running tasks have their Temporal workflow terminated. Already-terminated tasks return nil (idempotent). Completed or failed tasks return an error.
func (*Manager) SubmitTask ¶
SubmitTask submits a task to the task manager. operation.Request can contain multiple racks. Task Manager resolves identifiers, splits by rack, and creates one Task per rack. Returns a list of created task IDs.
type TargetFetcher ¶
type TargetFetcher interface {
GetRackByIdentifier(ctx context.Context, identifier identifier.Identifier, withComponents bool) (*rack.Rack, error)
GetComponentByID(ctx context.Context, id uuid.UUID) (*component.Component, error)
GetComponentsByExternalIDs(ctx context.Context, externalIDs []string) ([]*component.Component, error)
}
TargetFetcher provides the methods needed to fetch racks and components for target resolution.