| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. |
| 4 |
| 5 package cfgclient |
| 6 |
| 7 import ( |
| 8 "github.com/luci/gae/service/info" |
| 9 "github.com/luci/luci-go/luci_config/common/cfgtypes" |
| 10 |
| 11 "golang.org/x/net/context" |
| 12 ) |
| 13 |
| 14 // ProjectConfigPath is the path of a project's project-wide configuration file. |
| 15 const ProjectConfigPath = "project.cfg" |
| 16 |
| 17 // CurrentServiceName returns the current service name, as used to identify it |
| 18 // in configurations. This is based on the current App ID. |
| 19 func CurrentServiceName(c context.Context) string { return info.TrimmedAppID(c)
} |
| 20 |
| 21 // CurrentServiceConfigSet returns the config set for the current AppEngine |
| 22 // service, based on its current service name. |
| 23 func CurrentServiceConfigSet(c context.Context) cfgtypes.ConfigSet { |
| 24 return cfgtypes.ServiceConfigSet(CurrentServiceName(c)) |
| 25 } |
| OLD | NEW |