fix: workflow dispatcher uses internal handler instead of raw gRPC proxy
CI / CI (pull_request) Successful in 3m19s
CI / CI (pull_request) Successful in 3m19s
- Wire WorkflowAdapter as internal handler (JSON-to-gRPC bridge) - Add ServeHTTP to WorkflowAdapter: maps X-Resource to Temporal action - Rename resource 'start' to 'execute' for consistency - Add GET methods for describe/list/history resources - Remove unused workflowAdapterImpl variable - SDK clients can now send JSON, gateway translates to gRPC
This commit is contained in:
+3
-2
@@ -76,9 +76,11 @@ func main() {
|
||||
|
||||
// Add workflow service adapter (uses Temporal handler for gRPC forwarding)
|
||||
workflowSpec := serviceadapter.GetWorkflowSpec()
|
||||
workflowAdapterHandler := serviceadapter.NewWorkflowAdapter(temporalHandler)
|
||||
workflowAdapter := &serviceadapter.ServiceAdapter{
|
||||
Namespace: "temporal",
|
||||
ServiceName: "workflow",
|
||||
Handler: workflowAdapterHandler,
|
||||
Spec: *workflowSpec,
|
||||
}
|
||||
_ = registry.Add(workflowAdapter)
|
||||
@@ -120,8 +122,7 @@ func main() {
|
||||
dispatcher := serviceadapter.NewDispatcher(registry, jwtValidator)
|
||||
|
||||
// Wire workflow adapter to temporal handler for proper request forwarding
|
||||
workflowAdapterImpl := serviceadapter.NewWorkflowAdapter(temporalHandler)
|
||||
_ = workflowAdapterImpl // The dispatcher will call temporal handler directly for gRPC
|
||||
// workflowAdapterHandler (above) handles JSON-to-gRPC translation for workflow service
|
||||
|
||||
// Create router that handles health endpoints, X-Service (ServiceAdapter) routing,
|
||||
// temporal endpoints, and passes others to upstream handler
|
||||
|
||||
Reference in New Issue
Block a user