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

Unified Diff: appengine/logdog/coordinator/endpoints/services/getConfig.go

Issue 1863973002: LogDog: Update to archival V2. (Closed) Base URL: https://github.com/luci/luci-go@grpcutil-errors
Patch Set: Fix proto comment. Created 4 years, 8 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
Index: appengine/logdog/coordinator/endpoints/services/getConfig.go
diff --git a/appengine/logdog/coordinator/endpoints/services/getConfig.go b/appengine/logdog/coordinator/endpoints/services/getConfig.go
index c489cf584dc398718329187fe64578889656d4de..f150b029acd054f528748264372a25a25d0cbdf4 100644
--- a/appengine/logdog/coordinator/endpoints/services/getConfig.go
+++ b/appengine/logdog/coordinator/endpoints/services/getConfig.go
@@ -5,7 +5,6 @@
package services
import (
- "github.com/luci/luci-go/appengine/logdog/coordinator/config"
"github.com/luci/luci-go/common/api/logdog_coordinator/services/v1"
"github.com/luci/luci-go/common/grpcutil"
log "github.com/luci/luci-go/common/logging"
@@ -15,12 +14,13 @@ import (
// GetConfig allows a service to retrieve the current service configuration
// parameters.
-func (*Server) GetConfig(c context.Context, req *google.Empty) (*logdog.GetConfigResponse, error) {
- if err := Auth(c); err != nil {
+func (s *Server) GetConfig(c context.Context, req *google.Empty) (*logdog.GetConfigResponse, error) {
+ svc := s.GetServices()
+ if err := Auth(c, svc); err != nil {
return nil, err
}
- cfg, err := config.LoadGlobalConfig(c)
+ gcfg, _, err := svc.Config(c)
if err != nil {
log.Fields{
log.ErrorKey: err,
@@ -29,8 +29,8 @@ func (*Server) GetConfig(c context.Context, req *google.Empty) (*logdog.GetConfi
}
return &logdog.GetConfigResponse{
- ConfigServiceUrl: cfg.ConfigServiceURL,
- ConfigSet: cfg.ConfigSet,
- ConfigPath: cfg.ConfigPath,
+ ConfigServiceUrl: gcfg.ConfigServiceURL,
+ ConfigSet: gcfg.ConfigSet,
+ ConfigPath: gcfg.ConfigPath,
}, nil
}

Powered by Google App Engine
This is Rietveld 408576698