| OLD | NEW |
| 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 helloworld | 5 package helloworld |
| 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/helloworld/proto" | 12 "github.com/luci/luci-go/common/prpc/talk/helloworld/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 helloworld.RegisterGreeterServer(server, &greeterService{}) | 17 helloworld.RegisterGreeterServer(server, &greeterService{}) |
| 20 discovery.Enable(server) | 18 discovery.Enable(server) |
| 21 » server.InstallHandlers(router, base) | 19 » server.InstallHandlers(r, base) |
| 22 } | 20 } |
| OLD | NEW |