| OLD | NEW |
| 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 streamclient | 5 package streamclient |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "io" | 8 "io" |
| 9 | 9 |
| 10 "github.com/luci/luci-go/logdog/client/butler" | 10 "github.com/luci/luci-go/logdog/client/butler" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 pr, pw := io.Pipe() | 31 pr, pw := io.Pipe() |
| 32 defer func() { | 32 defer func() { |
| 33 if err != nil { | 33 if err != nil { |
| 34 pr.Close() | 34 pr.Close() |
| 35 pw.Close() | 35 pw.Close() |
| 36 } | 36 } |
| 37 }() | 37 }() |
| 38 | 38 |
| 39 props := f.Properties() | 39 props := f.Properties() |
| 40 stream := streamImpl{ | 40 stream := streamImpl{ |
| 41 Properties: props, | |
| 42 WriteCloser: pw, | 41 WriteCloser: pw, |
| 42 props: props, |
| 43 } | 43 } |
| 44 | 44 |
| 45 // Add the Stream to the Butler. | 45 // Add the Stream to the Butler. |
| 46 » if err = c.AddStream(pr, *props); err != nil { | 46 » if err = c.AddStream(pr, props); err != nil { |
| 47 return | 47 return |
| 48 } | 48 } |
| 49 return &stream, nil | 49 return &stream, nil |
| 50 } | 50 } |
| OLD | NEW |