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

Unified Diff: logdog/client/butlerlib/streamclient/stream.go

Issue 2456953003: LogDog: Update client/bootstrap to generate URLs. (Closed)
Patch Set: Winders Created 4 years, 2 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: logdog/client/butlerlib/streamclient/stream.go
diff --git a/logdog/client/butlerlib/streamclient/stream.go b/logdog/client/butlerlib/streamclient/stream.go
index e77a1a15bc046cd8715fe128ee1a3eb3118fef88..73c98629546dadbc4df61130cd15c6d3d2c63df2 100644
--- a/logdog/client/butlerlib/streamclient/stream.go
+++ b/logdog/client/butlerlib/streamclient/stream.go
@@ -20,13 +20,18 @@ type Stream interface {
// WriteDatagram writes a LogDog Butler streaming datagram to the underlying
// Writer.
WriteDatagram([]byte) error
+
+ // Properties returns a copy of this Stream's properties.
+ Properties() *streamproto.Properties
}
// streamImpl is the standard implementation of the Stream interface.
type streamImpl struct {
- *streamproto.Properties
io.WriteCloser
+ // props is this stream's properties.
+ props *streamproto.Properties
+
// rioW is a recordio.Writer bound to the WriteCloser. This will be
// initialized on the first writeRecord invocation.
rioW recordio.Writer
@@ -65,5 +70,7 @@ func (s *streamImpl) writeRecord(r []byte) error {
}
func (s *streamImpl) isDatagramStream() bool {
- return s.StreamType == logpb.StreamType_DATAGRAM
+ return s.props.StreamType == logpb.StreamType_DATAGRAM
}
+
+func (s *streamImpl) Properties() *streamproto.Properties { return s.props.Clone() }
« no previous file with comments | « logdog/client/butlerlib/streamclient/registry.go ('k') | logdog/client/butlerlib/streamclient/stream_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698