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

Side by Side Diff: appengine/cmd/milo/frontend/milo.go

Issue 2191693003: Milo: Add LogDog annotation stream support. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Rebarse Created 4 years, 4 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
« no previous file with comments | « no previous file | appengine/cmd/milo/logdog/build.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/luci/luci-go/appengine/cmd/milo/buildbot" 10 "github.com/luci/luci-go/appengine/cmd/milo/buildbot"
11 "github.com/luci/luci-go/appengine/cmd/milo/buildbucket" 11 "github.com/luci/luci-go/appengine/cmd/milo/buildbucket"
12 "github.com/luci/luci-go/appengine/cmd/milo/logdog"
12 "github.com/luci/luci-go/appengine/cmd/milo/settings" 13 "github.com/luci/luci-go/appengine/cmd/milo/settings"
13 "github.com/luci/luci-go/appengine/cmd/milo/swarming" 14 "github.com/luci/luci-go/appengine/cmd/milo/swarming"
14 "github.com/luci/luci-go/appengine/gaemiddleware" 15 "github.com/luci/luci-go/appengine/gaemiddleware"
15 "github.com/luci/luci-go/server/router" 16 "github.com/luci/luci-go/server/router"
16 ) 17 )
17 18
18 // Where it all begins!!! 19 // Where it all begins!!!
19 func init() { 20 func init() {
20 // Register plain ol' http handlers. 21 // Register plain ol' http handlers.
21 r := router.New() 22 r := router.New()
22 basemw := settings.Base() 23 basemw := settings.Base()
23 gaemiddleware.InstallHandlers(r, basemw) 24 gaemiddleware.InstallHandlers(r, basemw)
24 r.GET("/", basemw, settings.Wrap(frontpage{})) 25 r.GET("/", basemw, settings.Wrap(frontpage{}))
25 26
26 // Swarming 27 // Swarming
27 r.GET("/swarming/task/:id/steps/*logname", basemw, settings.Wrap(swarmin g.Log{})) 28 r.GET("/swarming/task/:id/steps/*logname", basemw, settings.Wrap(swarmin g.Log{}))
28 r.GET("/swarming/task/:id", basemw, settings.Wrap(swarming.Build{})) 29 r.GET("/swarming/task/:id", basemw, settings.Wrap(swarming.Build{}))
29 // Backward-compatible URLs: 30 // Backward-compatible URLs:
30 r.GET("/swarming/prod/:id/steps/*logname", basemw, settings.Wrap(swarmin g.Log{})) 31 r.GET("/swarming/prod/:id/steps/*logname", basemw, settings.Wrap(swarmin g.Log{}))
31 r.GET("/swarming/prod/:id", basemw, settings.Wrap(swarming.Build{})) 32 r.GET("/swarming/prod/:id", basemw, settings.Wrap(swarming.Build{}))
32 33
33 // Buildbucket 34 // Buildbucket
34 r.GET("/buildbucket/:bucket/:builder", basemw, settings.Wrap(buildbucket .Builder{})) 35 r.GET("/buildbucket/:bucket/:builder", basemw, settings.Wrap(buildbucket .Builder{}))
35 36
36 // Buildbot 37 // Buildbot
37 r.GET("/buildbot/:master/:builder/:build", basemw, settings.Wrap(buildbo t.Build{})) 38 r.GET("/buildbot/:master/:builder/:build", basemw, settings.Wrap(buildbo t.Build{}))
38 r.GET("/buildbot/:master/:builder/", basemw, settings.Wrap(buildbot.Buil der{})) 39 r.GET("/buildbot/:master/:builder/", basemw, settings.Wrap(buildbot.Buil der{}))
39 40
41 // LogDog Milo Annotation Streams.
42 r.GET("/logdog/build/:project/*path", basemw, settings.Wrap(&logdog.Anno tationStream{}))
43
40 // User settings 44 // User settings
41 r.GET("/settings", basemw, settings.Wrap(settings.Settings{})) 45 r.GET("/settings", basemw, settings.Wrap(settings.Settings{}))
42 r.POST("/settings", basemw, settings.ChangeSettings) 46 r.POST("/settings", basemw, settings.ChangeSettings)
43 47
44 // PubSub subscription endpoints. 48 // PubSub subscription endpoints.
45 r.POST("/pubsub/buildbot", basemw, buildbot.PubSubHandler) 49 r.POST("/pubsub/buildbot", basemw, buildbot.PubSubHandler)
46 50
47 http.Handle("/", r) 51 http.Handle("/", r)
48 } 52 }
OLDNEW
« no previous file with comments | « no previous file | appengine/cmd/milo/logdog/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698