| 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 swarming | 5 package swarming |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "fmt" | 9 "fmt" |
| 10 | 10 |
| 11 "github.com/golang/protobuf/proto" | 11 "github.com/golang/protobuf/proto" |
| 12 miloProto "github.com/luci/luci-go/common/proto/milo" | 12 miloProto "github.com/luci/luci-go/common/proto/milo" |
| 13 "github.com/luci/luci-go/logdog/client/butlerlib/streamclient" | 13 "github.com/luci/luci-go/logdog/client/butlerlib/streamclient" |
| 14 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" | 14 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" |
| 15 » "github.com/luci/luci-go/milo/job_source/raw_presentation" | 15 » "github.com/luci/luci-go/milo/build_source/raw_presentation" |
| 16 ) | 16 ) |
| 17 | 17 |
| 18 // In-memory datastructure to hold a fake butler client. | 18 // In-memory datastructure to hold a fake butler client. |
| 19 type memoryStream struct { | 19 type memoryStream struct { |
| 20 props *streamproto.Properties | 20 props *streamproto.Properties |
| 21 | 21 |
| 22 closed bool | 22 closed bool |
| 23 buf bytes.Buffer | 23 buf bytes.Buffer |
| 24 isDatagram bool | 24 isDatagram bool |
| 25 } | 25 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 for k := range result.Streams { | 183 for k := range result.Streams { |
| 184 lk = append(lk, k) | 184 lk = append(lk, k) |
| 185 } | 185 } |
| 186 return nil, fmt.Errorf( | 186 return nil, fmt.Errorf( |
| 187 "Number of streams do not match %d vs %d\nMemory:%s\nRes
ult:%s", | 187 "Number of streams do not match %d vs %d\nMemory:%s\nRes
ult:%s", |
| 188 len(c.stream), len(result.Streams), mk, lk) | 188 len(c.stream), len(result.Streams), mk, lk) |
| 189 } | 189 } |
| 190 | 190 |
| 191 return result, nil | 191 return result, nil |
| 192 } | 192 } |
| OLD | NEW |