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



##########
File path: sdks/go/pkg/beam/core/runtime/xlangx/expansionx/download.go
##########
@@ -50,13 +50,49 @@ func newJarGetter() *jarGetter {
        return &jarGetter{repository: apacheRepository, groupID: beamGroupID, 
jarCache: cacheDir}
 }
 
+// GetRepositoryURL returns the current target URL for the defaultJarGetter,
+// indicating what repository will be connected to when getting a Beam JAR.
+func GetDefaultRepositoryURL() string {
+       return defaultJarGetter.GetRepositoryURL()
+}
+
+// SetRepositoryURL updates the target URL for the defaultJarGetter, changing
+// which Maven repository will be connected to when getting a Beam JAR. Also
+// validates that it has been passed a URL and returns an error if not.
+//
+// When changing the target repository, make sure that the value is the prefix
+// up to "org/apache/beam" and that the organization of the repository matches
+// that of the default from that point on to ensure that the conversion of the
+// Gradle target to the JAR name is correct.
+func SetDefaultRepositoryURL(repoURL string) error {
+       return defaultJarGetter.SetRepositoryURL(repoURL)
+}
+
 // GetBeamJar checks a temporary directory for the desired Beam JAR, downloads 
the
 // appropriate JAR from Maven if not present, then returns the file path to the
 // JAR.
 func GetBeamJar(gradleTarget, version string) (string, error) {
        return defaultJarGetter.getJar(gradleTarget, version)
 }
 
+// GetRepositoryURL returns the current target URL for the jarGetter,
+// indicating what repository will be connected to when getting a Beam JAR.
+func (j *jarGetter) GetRepositoryURL() string {

Review comment:
       You're absolutely right, these don't need to be exported. Let me fix 
that (it also means I can de-duplicate these comment strings)




-- 
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