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

Unified Diff: filter/featureBreaker/gi.go

Issue 2062613002: Add TrimmedAppID to info service. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 6 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: filter/featureBreaker/gi.go
diff --git a/filter/featureBreaker/gi.go b/filter/featureBreaker/gi.go
index 9d38d8cfb6f2e5a5c3c5e137a7c07476fa71b517..291e001d20cf2568085ba06224cda4e603e25b5a 100644
--- a/filter/featureBreaker/gi.go
+++ b/filter/featureBreaker/gi.go
@@ -15,12 +15,12 @@ import (
type infoState struct {
*state
- info.Interface
+ info.RawInterface
}
func (g *infoState) ModuleHostname(module, version, instance string) (ret string, err error) {
err = g.run(func() (err error) {
- ret, err = g.Interface.ModuleHostname(module, version, instance)
+ ret, err = g.RawInterface.ModuleHostname(module, version, instance)
return
})
return
@@ -28,7 +28,7 @@ func (g *infoState) ModuleHostname(module, version, instance string) (ret string
func (g *infoState) ServiceAccount() (ret string, err error) {
err = g.run(func() (err error) {
- ret, err = g.Interface.ServiceAccount()
+ ret, err = g.RawInterface.ServiceAccount()
return
})
return
@@ -36,23 +36,15 @@ func (g *infoState) ServiceAccount() (ret string, err error) {
func (g *infoState) Namespace(namespace string) (ret context.Context, err error) {
err = g.run(func() (err error) {
- ret, err = g.Interface.Namespace(namespace)
+ ret, err = g.RawInterface.Namespace(namespace)
return
})
return
}
-func (g *infoState) MustNamespace(namespace string) context.Context {
- ret, err := g.Namespace(namespace)
- if err != nil {
- panic(err)
- }
- return ret
-}
-
func (g *infoState) AccessToken(scopes ...string) (token string, expiry time.Time, err error) {
err = g.run(func() (err error) {
- token, expiry, err = g.Interface.AccessToken(scopes...)
+ token, expiry, err = g.RawInterface.AccessToken(scopes...)
return
})
return
@@ -60,7 +52,7 @@ func (g *infoState) AccessToken(scopes ...string) (token string, expiry time.Tim
func (g *infoState) PublicCertificates() (ret []info.Certificate, err error) {
err = g.run(func() (err error) {
- ret, err = g.Interface.PublicCertificates()
+ ret, err = g.RawInterface.PublicCertificates()
return
})
return
@@ -68,7 +60,7 @@ func (g *infoState) PublicCertificates() (ret []info.Certificate, err error) {
func (g *infoState) SignBytes(bytes []byte) (keyName string, signature []byte, err error) {
err = g.run(func() (err error) {
- keyName, signature, err = g.Interface.SignBytes(bytes)
+ keyName, signature, err = g.RawInterface.SignBytes(bytes)
return
})
return
@@ -77,7 +69,7 @@ func (g *infoState) SignBytes(bytes []byte) (keyName string, signature []byte, e
// FilterGI installs a featureBreaker info filter in the context.
func FilterGI(c context.Context, defaultError error) (context.Context, FeatureBreaker) {
state := newState(defaultError)
- return info.AddFilters(c, func(ic context.Context, i info.Interface) info.Interface {
+ return info.AddFilters(c, func(ic context.Context, i info.RawInterface) info.RawInterface {
return &infoState{state, i}
}), state
}
« no previous file with comments | « filter/count/gi.go ('k') | impl/dummy/dummy.go » ('j') | service/info/wrapper.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698