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

Unified Diff: milo/logs/main.go

Issue 2977863002: [milo] Refactor all html knowledge out of backends. (Closed)
Patch Set: now with case insensitivity Created 3 years, 5 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 | « milo/frontend/view_logs.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/logs/main.go
diff --git a/milo/logs/main.go b/milo/logs/main.go
index f2657425c7a2e7e54b2bb03ca03fdebabbb927b8..449b9661608cdcdf9183aab321913d49e2719e0c 100644
--- a/milo/logs/main.go
+++ b/milo/logs/main.go
@@ -20,16 +20,26 @@ import (
"net/http"
"strings"
- "github.com/luci/luci-go/milo/common"
+ "github.com/luci/gae/impl/cloud"
"github.com/luci/luci-go/server/auth"
"github.com/luci/luci-go/server/router"
)
+// flexBase returns the basic middleware for use on appengine flex. Flex does not
+// allow the use of appengine APIs.
+func flexBase() router.MiddlewareChain {
+ // Installs the Info and Datastore services.
+ return router.NewMiddlewareChain(func(c *router.Context, next router.Handler) {
+ c.Context = cloud.UseFlex(c.Context)
+ next(c)
+ })
+}
+
// Where it all begins!!!
func main() {
r := router.New()
- base := common.FlexBase()
+ base := flexBase()
r.GET("/log/raw/*path", base, rawLog)
// Health check, for the appengine flex environment.
« no previous file with comments | « milo/frontend/view_logs.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698