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

Side by Side Diff: client/cmd/logdog_butler/subcommand_run.go

Issue 1906023002: LogDog: Add project namespace to Butler/Collector. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-archivist
Patch Set: Rebase? Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « client/cmd/logdog_butler/main.go ('k') | client/internal/logdog/butler/bundler/bundler.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "encoding/json" 8 "encoding/json"
9 "fmt" 9 "fmt"
10 "io" 10 "io"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 if err := dec.Decode(&args); err != nil { 339 if err := dec.Decode(&args); err != nil {
340 return nil, err 340 return nil, err
341 } 341 }
342 return args, nil 342 return args, nil
343 } 343 }
344 344
345 // updateEnvironment adds common Butler bootstrapping environment variables 345 // updateEnvironment adds common Butler bootstrapping environment variables
346 // to the environment. 346 // to the environment.
347 func (cmd *runCommandRun) updateEnvironment(e environ, a *application) { 347 func (cmd *runCommandRun) updateEnvironment(e environ, a *application) {
348 e.set(bootstrap.EnvStreamPrefix, string(a.butler.Prefix)) 348 e.set(bootstrap.EnvStreamPrefix, string(a.butler.Prefix))
349 e.set(bootstrap.EnvStreamProject, string(a.butler.Project))
349 350
350 // Set stream server path (if applicable) 351 // Set stream server path (if applicable)
351 if cmd.streamServerURI != "" { 352 if cmd.streamServerURI != "" {
352 e.set(bootstrap.EnvStreamServerPath, string(cmd.streamServerURI) ) 353 e.set(bootstrap.EnvStreamServerPath, string(cmd.streamServerURI) )
353 } 354 }
354 } 355 }
355 356
356 // callbackReadCloser invokes a callback method when closed. 357 // callbackReadCloser invokes a callback method when closed.
357 type callbackReadCloser struct { 358 type callbackReadCloser struct {
358 io.ReadCloser 359 io.ReadCloser
359 callback func() 360 callback func()
360 } 361 }
361 362
362 func (c *callbackReadCloser) Close() error { 363 func (c *callbackReadCloser) Close() error {
363 defer c.callback() 364 defer c.callback()
364 return c.ReadCloser.Close() 365 return c.ReadCloser.Close()
365 } 366 }
OLDNEW
« no previous file with comments | « client/cmd/logdog_butler/main.go ('k') | client/internal/logdog/butler/bundler/bundler.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698