Documentation
¶
Overview ¶
Package client provides clients for querying external services from the WFE controller.
Index ¶
- type OgenWorkflowQuerier
- func (q *OgenWorkflowQuerier) GetWorkflowDependencies(ctx context.Context, workflowID string) (*models.WorkflowDependencies, error)
- func (q *OgenWorkflowQuerier) GetWorkflowEngineConfig(ctx context.Context, workflowID string) (json.RawMessage, error)
- func (q *OgenWorkflowQuerier) GetWorkflowExecutionEngine(ctx context.Context, workflowID string) (string, string, error)
- type WorkflowCatalogClient
- type WorkflowQuerier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OgenWorkflowQuerier ¶
type OgenWorkflowQuerier struct {
// contains filtered or unexported fields
}
OgenWorkflowQuerier implements WorkflowQuerier using the ogen-generated DS client. DD-API-001 compliant: uses generated OpenAPI client for type safety.
func NewOgenWorkflowQuerier ¶
func NewOgenWorkflowQuerier(client WorkflowCatalogClient) *OgenWorkflowQuerier
NewOgenWorkflowQuerier creates a WorkflowQuerier from an existing ogen client wrapper.
func NewOgenWorkflowQuerierFromConfig ¶
func NewOgenWorkflowQuerierFromConfig(baseURL string, timeout time.Duration) (*OgenWorkflowQuerier, error)
NewOgenWorkflowQuerierFromConfig creates a WorkflowQuerier with a standalone ogen client configured from the DataStorage URL and timeout. Uses ServiceAccount auth transport (same pattern as DSHistoryAdapter).
func (*OgenWorkflowQuerier) GetWorkflowDependencies ¶
func (q *OgenWorkflowQuerier) GetWorkflowDependencies(ctx context.Context, workflowID string) (*models.WorkflowDependencies, error)
GetWorkflowDependencies fetches the workflow from DS by ID and extracts schema-declared dependencies from the Content field (raw YAML). Returns nil if the workflow has no dependencies declared.
func (*OgenWorkflowQuerier) GetWorkflowEngineConfig ¶ added in v1.1.0
func (q *OgenWorkflowQuerier) GetWorkflowEngineConfig(ctx context.Context, workflowID string) (json.RawMessage, error)
GetWorkflowEngineConfig retrieves the engine_config from the DS catalog. DD-WORKFLOW-017: The WE controller resolves execution details from the catalog. Returns nil when the workflow has no engineConfig section.
func (*OgenWorkflowQuerier) GetWorkflowExecutionEngine ¶ added in v1.2.0
func (q *OgenWorkflowQuerier) GetWorkflowExecutionEngine(ctx context.Context, workflowID string) (string, string, error)
GetWorkflowExecutionEngine retrieves the execution engine and workflow name from the DS catalog entry. Issue #518: the WE controller resolves the engine at runtime rather than reading it from the (now-removed) WFE spec field.
type WorkflowCatalogClient ¶
type WorkflowCatalogClient interface {
GetWorkflowByID(ctx context.Context, params ogenclient.GetWorkflowByIDParams) (ogenclient.GetWorkflowByIDRes, error)
}
WorkflowCatalogClient is a narrow interface satisfied by the ogen-generated *ogenclient.Client. Defined here for testability (mock injection).
type WorkflowQuerier ¶
type WorkflowQuerier interface {
GetWorkflowDependencies(ctx context.Context, workflowID string) (*models.WorkflowDependencies, error)
// GetWorkflowEngineConfig retrieves the engine_config for a workflow from the catalog.
// DD-WORKFLOW-017: Execution details (engine, engineConfig) come from the workflow catalog entry.
// Returns nil when the workflow has no engineConfig.
GetWorkflowEngineConfig(ctx context.Context, workflowID string) (json.RawMessage, error)
// GetWorkflowExecutionEngine retrieves the execution engine and workflow name
// from the DS catalog. Issue #518: the WE controller resolves the engine at
// runtime rather than reading it from the WFE spec.
GetWorkflowExecutionEngine(ctx context.Context, workflowID string) (engine string, workflowName string, err error)
}
WorkflowQuerier retrieves workflow metadata from the Data Storage catalog. DD-WE-006: WFE queries DS on demand using the workflow ID.