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

Side by Side Diff: milo/appengine/logdog/http.go

Issue 2575383002: Add server/cache support to gaeconfig. (Closed)
Patch Set: Un-collapse. Created 3 years, 11 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 | « milo/appengine/buildbot/pubsub_test.go ('k') | milo/appengine/settings/acl_test.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 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 logdog 5 package logdog
6 6
7 import ( 7 import (
8 "net/http" 8 "net/http"
9 "strings" 9 "strings"
10 10
11 "github.com/julienschmidt/httprouter"
12 log "github.com/luci/luci-go/common/logging" 11 log "github.com/luci/luci-go/common/logging"
13 "github.com/luci/luci-go/grpc/prpc" 12 "github.com/luci/luci-go/grpc/prpc"
14 "github.com/luci/luci-go/logdog/client/coordinator" 13 "github.com/luci/luci-go/logdog/client/coordinator"
15 "github.com/luci/luci-go/logdog/common/types" 14 "github.com/luci/luci-go/logdog/common/types"
16 "github.com/luci/luci-go/luci_config/common/cfgtypes" 15 "github.com/luci/luci-go/luci_config/common/cfgtypes"
17 "github.com/luci/luci-go/milo/appengine/settings" 16 "github.com/luci/luci-go/milo/appengine/settings"
18 "github.com/luci/luci-go/milo/common/miloerror" 17 "github.com/luci/luci-go/milo/common/miloerror"
19 "github.com/luci/luci-go/server/auth" 18 "github.com/luci/luci-go/server/auth"
20 "github.com/luci/luci-go/server/templates" 19 "github.com/luci/luci-go/server/templates"
21 20
21 "github.com/julienschmidt/httprouter"
22 "golang.org/x/net/context" 22 "golang.org/x/net/context"
23 ) 23 )
24 24
25 // AnnotationStream is a ThemedHandler that renders a LogDog Milo annotation 25 // AnnotationStream is a ThemedHandler that renders a LogDog Milo annotation
26 // protobuf stream. 26 // protobuf stream.
27 // 27 //
28 // The protobuf stream is fetched live from LogDog and cached locally, either 28 // The protobuf stream is fetched live from LogDog and cached locally, either
29 // temporarily (if incomplete) or indefinitely (if complete). 29 // temporarily (if incomplete) or indefinitely (if complete).
30 type AnnotationStream struct { 30 type AnnotationStream struct {
31 // logDogClient is a reusable HTTP client to use for LogDog. 31 // logDogClient is a reusable HTTP client to use for LogDog.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Load the Milo annotation protobuf from the annotation stream. 70 // Load the Milo annotation protobuf from the annotation stream.
71 if err := as.load(c); err != nil { 71 if err := as.load(c); err != nil {
72 return nil, err 72 return nil, err
73 } 73 }
74 74
75 // Convert the Milo Annotation protobuf to Milo objects. 75 // Convert the Milo Annotation protobuf to Milo objects.
76 return &templates.Args{ 76 return &templates.Args{
77 "Build": as.toMiloBuild(c), 77 "Build": as.toMiloBuild(c),
78 }, nil 78 }, nil
79 } 79 }
OLDNEW
« no previous file with comments | « milo/appengine/buildbot/pubsub_test.go ('k') | milo/appengine/settings/acl_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698