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

Unified Diff: milo/appengine/backends/swarming/build.go

Issue 2944983003: [milo] {buildbucket,buildbot,swarming,logdog} -> backends/*. (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/backends/swarming/README.md ('k') | milo/appengine/backends/swarming/buildLog.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/backends/swarming/build.go
diff --git a/milo/appengine/swarming/build.go b/milo/appengine/backends/swarming/build.go
similarity index 98%
rename from milo/appengine/swarming/build.go
rename to milo/appengine/backends/swarming/build.go
index 87f7afcd6679f691b81623f2d03d435d635eb395..2475d13da962f34999fceb0a93028f46e85faf60 100644
--- a/milo/appengine/swarming/build.go
+++ b/milo/appengine/backends/swarming/build.go
@@ -24,9 +24,9 @@ import (
"github.com/luci/luci-go/logdog/client/coordinator"
"github.com/luci/luci-go/logdog/common/types"
"github.com/luci/luci-go/milo/api/resp"
+ "github.com/luci/luci-go/milo/appengine/backends/raw_presentation"
"github.com/luci/luci-go/milo/appengine/common"
"github.com/luci/luci-go/milo/appengine/common/model"
- "github.com/luci/luci-go/milo/appengine/logdog"
"github.com/luci/luci-go/server/auth"
)
@@ -462,7 +462,7 @@ func addTaskToBuild(c context.Context, server string, sr *swarming.SwarmingRpcsT
// streamsFromAnnotatedLog takes in an annotated log and returns a fully
// populated set of logdog streams
-func streamsFromAnnotatedLog(ctx context.Context, log string) (*logdog.Streams, error) {
+func streamsFromAnnotatedLog(ctx context.Context, log string) (*raw_presentation.Streams, error) {
c := &memoryClient{}
p := annotee.New(ctx, annotee.Options{
Client: c,
@@ -498,18 +498,18 @@ type buildLoader struct {
}
func (bl *buildLoader) newEmptyAnnotationStream(c context.Context, addr *types.StreamAddr) (
- *logdog.AnnotationStream, error) {
+ *raw_presentation.AnnotationStream, error) {
fn := bl.logDogClientFunc
if fn == nil {
- fn = logdog.NewClient
+ fn = raw_presentation.NewClient
}
client, err := fn(c, addr.Host)
if err != nil {
return nil, errors.Annotate(err).Reason("failed to create LogDog client").Err()
}
- as := logdog.AnnotationStream{
+ as := raw_presentation.AnnotationStream{
Client: client,
Project: addr.Project,
Path: addr.Path,
@@ -587,8 +587,8 @@ func (bl *buildLoader) swarmingBuildImpl(c context.Context, svc swarmingService,
var build resp.MiloBuild
var s *miloProto.Step
- var lds *logdog.Streams
- var ub logdog.URLBuilder
+ var lds *raw_presentation.Streams
+ var ub raw_presentation.URLBuilder
// Load the build from the available data.
//
@@ -606,7 +606,7 @@ func (bl *buildLoader) swarmingBuildImpl(c context.Context, svc swarmingService,
}
prefix, _ := logDogStreamAddr.Path.Split()
- ub = &logdog.ViewerURLBuilder{
+ ub = &raw_presentation.ViewerURLBuilder{
Host: logDogStreamAddr.Host,
Prefix: prefix,
Project: logDogStreamAddr.Project,
@@ -668,7 +668,7 @@ func (bl *buildLoader) swarmingBuildImpl(c context.Context, svc swarmingService,
if err := addTaskToMiloStep(c, svc.getHost(), fr.res, s); err != nil {
return nil, err
}
- logdog.AddLogDogToBuild(c, ub, s, &build)
+ raw_presentation.AddLogDogToBuild(c, ub, s, &build)
Ryan Tseng 2017/06/20 17:49:19 This naming is a bit awkward, since "raw_presentat
}
if err := addTaskToBuild(c, svc.getHost(), fr.res, &build); err != nil {
« no previous file with comments | « milo/appengine/backends/swarming/README.md ('k') | milo/appengine/backends/swarming/buildLog.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698