| 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 "golang.org/x/net/context" | 10 "golang.org/x/net/context" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 r.GET("/swarming/prod/:id", basemw, settings.Wrap(swarming.Build{})) | 54 r.GET("/swarming/prod/:id", basemw, settings.Wrap(swarming.Build{})) |
| 55 | 55 |
| 56 // Buildbucket | 56 // Buildbucket |
| 57 r.GET("/buildbucket/:bucket/:builder", basemw, settings.Wrap(buildbucket
.Builder{})) | 57 r.GET("/buildbucket/:bucket/:builder", basemw, settings.Wrap(buildbucket
.Builder{})) |
| 58 | 58 |
| 59 // Buildbot | 59 // Buildbot |
| 60 r.GET("/buildbot/:master/:builder/:build", basemw, settings.Wrap(buildbo
t.Build{})) | 60 r.GET("/buildbot/:master/:builder/:build", basemw, settings.Wrap(buildbo
t.Build{})) |
| 61 r.GET("/buildbot/:master/:builder/", basemw, settings.Wrap(buildbot.Buil
der{})) | 61 r.GET("/buildbot/:master/:builder/", basemw, settings.Wrap(buildbot.Buil
der{})) |
| 62 | 62 |
| 63 // LogDog Milo Annotation Streams. | 63 // LogDog Milo Annotation Streams. |
| 64 » r.GET("/logdog/build/:project/*path", basemw, settings.Wrap(&logdog.Anno
tationStream{})) | 64 » r.GET("/logdog/build/:project/*path", basemw, settings.Wrap(&logdog.Anno
tationStreamHandler{})) |
| 65 | 65 |
| 66 // User settings | 66 // User settings |
| 67 r.GET("/settings", basemw, settings.Wrap(settings.Settings{})) | 67 r.GET("/settings", basemw, settings.Wrap(settings.Settings{})) |
| 68 r.POST("/settings", basemw, settings.ChangeSettings) | 68 r.POST("/settings", basemw, settings.ChangeSettings) |
| 69 | 69 |
| 70 // PubSub subscription endpoints. | 70 // PubSub subscription endpoints. |
| 71 r.POST("/pubsub/buildbot", basemw, buildbot.PubSubHandler) | 71 r.POST("/pubsub/buildbot", basemw, buildbot.PubSubHandler) |
| 72 | 72 |
| 73 // pRPC style endpoints. | 73 // pRPC style endpoints. |
| 74 api := prpc.Server{ | 74 api := prpc.Server{ |
| 75 UnaryServerInterceptor: grpcmon.NewUnaryServerInterceptor(nil), | 75 UnaryServerInterceptor: grpcmon.NewUnaryServerInterceptor(nil), |
| 76 } | 76 } |
| 77 milo.RegisterBuildbotServer(&api, &milo.DecoratedBuildbot{ | 77 milo.RegisterBuildbotServer(&api, &milo.DecoratedBuildbot{ |
| 78 Service: &buildbot.Service{}, | 78 Service: &buildbot.Service{}, |
| 79 Prelude: emptyPrelude, | 79 Prelude: emptyPrelude, |
| 80 }) | 80 }) |
| 81 discovery.Enable(&api) | 81 discovery.Enable(&api) |
| 82 api.InstallHandlers(r, gaemiddleware.BaseProd()) | 82 api.InstallHandlers(r, gaemiddleware.BaseProd()) |
| 83 | 83 |
| 84 http.DefaultServeMux.Handle("/", r) | 84 http.DefaultServeMux.Handle("/", r) |
| 85 } | 85 } |
| OLD | NEW |