| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 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 frontend | 5 package frontend |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "net/http" | 8 "net/http" |
| 9 | 9 |
| 10 "github.com/golang/protobuf/proto" | 10 "github.com/golang/protobuf/proto" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 r.GET("/buildbot/:master/:builder/:build", basemw, buildbot.BuildHandler
) | 60 r.GET("/buildbot/:master/:builder/:build", basemw, buildbot.BuildHandler
) |
| 61 r.GET("/buildbot/:master/:builder/", basemw, buildbot.BuilderHandler) | 61 r.GET("/buildbot/:master/:builder/", basemw, buildbot.BuilderHandler) |
| 62 | 62 |
| 63 // LogDog Milo Annotation Streams. | 63 // LogDog Milo Annotation Streams. |
| 64 // This mimicks the `logdog://logdog_host/project/*path` url scheme seen
on | 64 // This mimicks the `logdog://logdog_host/project/*path` url scheme seen
on |
| 65 // swarming tasks. | 65 // swarming tasks. |
| 66 r.GET("/raw/build/:logdog_host/:project/*path", basemw, rawpresentation.
BuildHandler) | 66 r.GET("/raw/build/:logdog_host/:project/*path", basemw, rawpresentation.
BuildHandler) |
| 67 | 67 |
| 68 // PubSub subscription endpoints. | 68 // PubSub subscription endpoints. |
| 69 r.POST("/_ah/push-handlers/buildbot", basemw, buildbot.PubSubHandler) | 69 r.POST("/_ah/push-handlers/buildbot", basemw, buildbot.PubSubHandler) |
| 70 r.POST("/_ah/push-handlers/buildbucket", basemw, buildbucket.PubSubHandl
er) |
| 70 | 71 |
| 71 // pRPC style endpoints. | 72 // pRPC style endpoints. |
| 72 api := prpc.Server{ | 73 api := prpc.Server{ |
| 73 UnaryServerInterceptor: grpcmon.NewUnaryServerInterceptor(nil), | 74 UnaryServerInterceptor: grpcmon.NewUnaryServerInterceptor(nil), |
| 74 } | 75 } |
| 75 milo.RegisterBuildbotServer(&api, &milo.DecoratedBuildbot{ | 76 milo.RegisterBuildbotServer(&api, &milo.DecoratedBuildbot{ |
| 76 Service: &buildbot.Service{}, | 77 Service: &buildbot.Service{}, |
| 77 Prelude: emptyPrelude, | 78 Prelude: emptyPrelude, |
| 78 }) | 79 }) |
| 79 milo.RegisterBuildInfoServer(&api, &milo.DecoratedBuildInfo{ | 80 milo.RegisterBuildInfoServer(&api, &milo.DecoratedBuildInfo{ |
| 80 Service: &rpc.BuildInfoService{}, | 81 Service: &rpc.BuildInfoService{}, |
| 81 Prelude: emptyPrelude, | 82 Prelude: emptyPrelude, |
| 82 }) | 83 }) |
| 83 discovery.Enable(&api) | 84 discovery.Enable(&api) |
| 84 api.InstallHandlers(r, gaemiddleware.BaseProd()) | 85 api.InstallHandlers(r, gaemiddleware.BaseProd()) |
| 85 | 86 |
| 86 http.DefaultServeMux.Handle("/", r) | 87 http.DefaultServeMux.Handle("/", r) |
| 87 } | 88 } |
| OLD | NEW |