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

Side by Side Diff: common/prpc/talk/buildbot/frontend/prpc.go

Issue 2043423004: Make HTTP middleware easier to use (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: gaemiddleware: add middleware func for WithProd 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package buildbot 5 package buildbot
6 6
7 import ( 7 import (
8 "github.com/julienschmidt/httprouter"
9
10 "github.com/luci/luci-go/server/discovery" 8 "github.com/luci/luci-go/server/discovery"
11 "github.com/luci/luci-go/server/middleware"
12 "github.com/luci/luci-go/server/prpc" 9 "github.com/luci/luci-go/server/prpc"
10 "github.com/luci/luci-go/server/router"
13 11
14 "github.com/luci/luci-go/common/prpc/talk/buildbot/proto" 12 "github.com/luci/luci-go/common/prpc/talk/buildbot/proto"
15 ) 13 )
16 14
17 func InstallAPIRoutes(router *httprouter.Router, base middleware.Base) { 15 func InstallAPIRoutes(r *router.Router, base router.MiddlewareChain) {
18 server := &prpc.Server{} 16 server := &prpc.Server{}
19 buildbot.RegisterBuildbotServer(server, &buildbotService{}) 17 buildbot.RegisterBuildbotServer(server, &buildbotService{})
20 discovery.Enable(server) 18 discovery.Enable(server)
21 » server.InstallHandlers(router, base) 19 » server.InstallHandlers(r, base)
22 } 20 }
OLDNEW
« no previous file with comments | « common/prpc/talk/buildbot/frontend/handler.go ('k') | common/prpc/talk/helloworld/frontend/handler.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698