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

Unified Diff: milo/appengine/job_source/swarming/memoryClient.go

Issue 2944983003: [milo] {buildbucket,buildbot,swarming,logdog} -> backends/*. (Closed)
Patch Set: fix the tests 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
Index: milo/appengine/job_source/swarming/memoryClient.go
diff --git a/milo/appengine/swarming/memoryClient.go b/milo/appengine/job_source/swarming/memoryClient.go
similarity index 88%
rename from milo/appengine/swarming/memoryClient.go
rename to milo/appengine/job_source/swarming/memoryClient.go
index 80e3cf0f0ab83edae227c191007b1e31b4349962..fa34497c75c477bd1a0efe3a84daa516c5905c21 100644
--- a/milo/appengine/swarming/memoryClient.go
+++ b/milo/appengine/job_source/swarming/memoryClient.go
@@ -12,7 +12,7 @@ import (
miloProto "github.com/luci/luci-go/common/proto/milo"
"github.com/luci/luci-go/logdog/client/butlerlib/streamclient"
"github.com/luci/luci-go/logdog/client/butlerlib/streamproto"
- "github.com/luci/luci-go/milo/appengine/logdog"
+ "github.com/luci/luci-go/milo/appengine/job_source/raw_presentation"
)
// In-memory datastructure to hold a fake butler client.
@@ -24,8 +24,8 @@ type memoryStream struct {
isDatagram bool
}
-func (s *memoryStream) ToLogDogStream() (*logdog.Stream, error) {
- result := &logdog.Stream{
+func (s *memoryStream) ToLogDogStream() (*raw_presentation.Stream, error) {
+ result := &raw_presentation.Stream{
Closed: s.closed,
IsDatagram: s.isDatagram,
Path: s.props.Name,
@@ -83,7 +83,7 @@ func (c *memoryClient) NewStream(f streamproto.Flags) (streamclient.Stream, erro
return &s, nil
}
-func (c *memoryClient) addLogDogTextStream(s *logdog.Streams, ls *miloProto.LogdogStream) error {
+func (c *memoryClient) addLogDogTextStream(s *raw_presentation.Streams, ls *miloProto.LogdogStream) error {
var keys []string
for k := range c.stream {
keys = append(keys, k)
@@ -105,7 +105,7 @@ func (c *memoryClient) addLogDogTextStream(s *logdog.Streams, ls *miloProto.Logd
// addToStreams adds the set of stream with a given base path to the logdog
// stream map. A base path is assumed to have a stream named "annotations".
-func (c *memoryClient) addToStreams(s *logdog.Streams, anno *miloProto.Step) error {
+func (c *memoryClient) addToStreams(s *raw_presentation.Streams, anno *miloProto.Step) error {
if lds := anno.StdoutStream; lds != nil {
if err := c.addLogDogTextStream(s, lds); err != nil {
return fmt.Errorf(
@@ -148,9 +148,9 @@ func (c *memoryClient) addToStreams(s *logdog.Streams, anno *miloProto.Step) err
return nil
}
-func (c *memoryClient) ToLogDogStreams() (*logdog.Streams, error) {
- result := &logdog.Streams{}
- result.Streams = map[string]*logdog.Stream{}
+func (c *memoryClient) ToLogDogStreams() (*raw_presentation.Streams, error) {
+ result := &raw_presentation.Streams{}
+ result.Streams = map[string]*raw_presentation.Stream{}
// Register annotation stream.
const annotationStreamName = "annotations"
« no previous file with comments | « milo/appengine/job_source/swarming/html_test.go ('k') | milo/appengine/job_source/swarming/testdata/build-canceled » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698