Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: milo/appengine/swarming/build.go

Issue 2765383002: Milo: Move instance configuration to luci-config (Closed)
Patch Set: Review Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/buildbucket/html.go ('k') | milo/appengine/swarming/buildinfo.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/swarming/build.go
diff --git a/milo/appengine/swarming/build.go b/milo/appengine/swarming/build.go
index 1ab8e9edc39af1f6c86043ef9804b902f43e9208..92b4d5e26301906c4dab79f966a6d706126bd7a3 100644
--- a/milo/appengine/swarming/build.go
+++ b/milo/appengine/swarming/build.go
@@ -57,7 +57,7 @@ const (
TaskCompleted = "COMPLETED"
)
-func getSwarmingClient(c context.Context, server string) (*swarming.Service, error) {
+func getSwarmingClient(c context.Context, host string) (*swarming.Service, error) {
c, _ = context.WithTimeout(c, 60*time.Second)
t, err := auth.GetRPCTransport(c, auth.AsSelf)
if err != nil {
@@ -67,7 +67,7 @@ func getSwarmingClient(c context.Context, server string) (*swarming.Service, err
if err != nil {
return nil, err
}
- sc.BasePath = fmt.Sprintf("https://%s/_ah/api/swarming/v1/", server)
+ sc.BasePath = fmt.Sprintf("https://%s/_ah/api/swarming/v1/", host)
return sc, nil
}
@@ -87,13 +87,13 @@ type prodSwarmingService struct {
client *swarming.Service
}
-func newProdService(c context.Context, server string) (*prodSwarmingService, error) {
- client, err := getSwarmingClient(c, server)
+func newProdService(c context.Context, host string) (*prodSwarmingService, error) {
+ client, err := getSwarmingClient(c, host)
if err != nil {
return nil, err
}
return &prodSwarmingService{
- host: server,
+ host: host,
client: client,
}, nil
}
« no previous file with comments | « milo/appengine/buildbucket/html.go ('k') | milo/appengine/swarming/buildinfo.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698