jrmccluskey commented on a change in pull request #16671:
URL: https://github.com/apache/beam/pull/16671#discussion_r796684277



##########
File path: sdks/go/pkg/beam/transforms/sql/sql.go
##########
@@ -79,6 +82,33 @@ func ExpansionAddr(addr string) Option {
        }
 }
 
+const serviceGradleTarget = 
":sdks:java:extensions:sql:expansion-service:shadowJar"
+
+// StartAutomatedExpansionService pulls a JAR from Maven containing
+// a Beam expansion service that handles the SQL transform URN,
+// creates a runner type to manage the service, starts the service,
+// and arranges the endpoint with the appropriate namespace tag.
+//
+// Returns the StopService() function for the runner (should be
+// deferred so the service is stopped before the program exits,)
+// the tagged expansion address, and an error.
+func StartAutomatedExpansionService() (func() error, string, error) {

Review comment:
       Made a run at moving the logic deeper. Quick change since the logic 
itself was already written and working. We can change the namespace if you 
prefer but one major benefit to moving everything deeper is that we no longer 
have to export the namespace. Adding support should now be as easy as providing 
a gradle target for the expansion service a transform needs and calling 
`xlangx.UseAutomatedExpansionService()` 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to