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

Unified Diff: logdog/client/butler/bundler/bundler.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
« no previous file with comments | « no previous file | logdog/client/butler/butler.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/client/butler/bundler/bundler.go
diff --git a/logdog/client/butler/bundler/bundler.go b/logdog/client/butler/bundler/bundler.go
index 67d3fa55b5193271b91bfdfa2d3212c42d0710e9..eaff529d4062a5fc8a3434a770616d2229a80255 100644
--- a/logdog/client/butler/bundler/bundler.go
+++ b/logdog/client/butler/bundler/bundler.go
@@ -93,7 +93,10 @@ func New(c Config) *Bundler {
// Register adds a new stream to the Bundler, returning a reference to the
// registered stream.
-func (b *Bundler) Register(p streamproto.Properties) (Stream, error) {
+//
+// The Bundler takes ownership of the supplied Properties, and may modify them
+// as needed.
+func (b *Bundler) Register(p *streamproto.Properties) (Stream, error) {
// Our Properties must validate.
if err := p.Validate(); err != nil {
return nil, err
@@ -106,7 +109,7 @@ func (b *Bundler) Register(p streamproto.Properties) (Stream, error) {
c := streamConfig{
name: p.Name,
template: logpb.ButlerLogBundle_Entry{
- Desc: &p.LogStreamDescriptor,
+ Desc: p.LogStreamDescriptor,
},
maximumBufferDuration: b.c.MaxBufferDelay,
maximumBufferedBytes: b.c.MaxBufferedBytes,
@@ -118,7 +121,7 @@ func (b *Bundler) Register(p streamproto.Properties) (Stream, error) {
}
err := error(nil)
- c.parser, err = newParser(&p, &b.prefixCounter)
+ c.parser, err = newParser(p, &b.prefixCounter)
if err != nil {
return nil, fmt.Errorf("failed to create stream parser: %s", err)
}
« no previous file with comments | « no previous file | logdog/client/butler/butler.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698