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

Unified Diff: logdog/appengine/coordinator/config/config.go

Issue 2626433004: Move "common/config" common types into cfgtypes. (Closed)
Patch Set: Created 3 years, 11 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 | « common/config/util.go ('k') | logdog/appengine/coordinator/config/projects.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/appengine/coordinator/config/config.go
diff --git a/logdog/appengine/coordinator/config/config.go b/logdog/appengine/coordinator/config/config.go
index 0939fcdf1e6d5da5bbc5967abcff27994b788082..f7dd57dc7bcb787ca93b0662174cf9c76c71fb51 100644
--- a/logdog/appengine/coordinator/config/config.go
+++ b/logdog/appengine/coordinator/config/config.go
@@ -5,7 +5,6 @@
package config
import (
- "fmt"
"net/url"
"github.com/golang/protobuf/proto"
@@ -14,6 +13,8 @@ import (
"github.com/luci/luci-go/common/errors"
log "github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/logdog/api/config/svcconfig"
+ "github.com/luci/luci-go/luci_config/common/cfgtypes"
+
"golang.org/x/net/context"
)
@@ -39,9 +40,9 @@ type Config struct {
// ServiceConfigPath returns the config set and path for this application's
// service configuration.
-func ServiceConfigPath(c context.Context) (string, string) {
+func ServiceConfigPath(c context.Context) (cfgtypes.ConfigSet, string) {
appID := info.AppID(c)
- return fmt.Sprintf("services/%s", appID), svcconfig.ServiceConfigFilename
+ return cfgtypes.ServiceConfigSet(appID), svcconfig.ServiceConfigFilename
}
// Load loads the service configuration. This includes:
@@ -52,7 +53,7 @@ func ServiceConfigPath(c context.Context) (string, string) {
// The service config is minimally validated prior to being returned.
func Load(c context.Context) (*Config, error) {
configSet, configPath := ServiceConfigPath(c)
- serviceCfg, err := config.GetConfig(c, configSet, configPath, false)
+ serviceCfg, err := config.GetConfig(c, string(configSet), configPath, false)
if err != nil {
log.Fields{
log.ErrorKey: err,
« no previous file with comments | « common/config/util.go ('k') | logdog/appengine/coordinator/config/projects.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698