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

Unified Diff: impl/prod/context.go

Issue 1354083002: Add simplest service/urlfetch implementation. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: panic Created 5 years, 3 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 | « no previous file | impl/prod/urlfetch.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/context.go
diff --git a/impl/prod/context.go b/impl/prod/context.go
index fe060335b4921a0899ec9aa36cbd10edc3378ac5..7605887e2a99b518f79428e3c508dd9b4c6918a1 100644
--- a/impl/prod/context.go
+++ b/impl/prod/context.go
@@ -19,25 +19,28 @@ import (
// - github.com/luci/gae/service/taskqueue
// - github.com/luci/gae/service/memcache
// - github.com/luci/gae/service/info
+// - github.com/luci/gae/service/urlfetch
//
// These can be retrieved with the <service>.Get functions.
//
// The implementations are all backed by the real appengine SDK functionality,
func Use(c context.Context) context.Context {
- return useRDS(useMC(useTQ(useGI(c))))
+ return useURLFetch(useRDS(useMC(useTQ(useGI(c)))))
}
-// Use adds production implementations for all the gae services to the context.
+// UseRequest adds production implementations for all the gae services
+// to the context.
//
// The services added are:
// - github.com/luci/gae/service/datastore
// - github.com/luci/gae/service/taskqueue
// - github.com/luci/gae/service/memcache
// - github.com/luci/gae/service/info
+// - github.com/luci/gae/service/urlfetch
//
// These can be retrieved with the <service>.Get functions.
//
// The implementations are all backed by the real appengine SDK functionality,
func UseRequest(r *http.Request) context.Context {
- return useRDS(useMC(useTQ(useGI(appengine.NewContext(r)))))
+ return useURLFetch(useRDS(useMC(useTQ(useGI(appengine.NewContext(r))))))
}
« no previous file with comments | « no previous file | impl/prod/urlfetch.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698