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

Side by Side Diff: logdog/client/coordinator/stream.go

Issue 2671633002: Update LogDog client to export its host. (Closed)
Patch Set: Created 3 years, 10 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 | « logdog/client/coordinator/client.go ('k') | no next file » | 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 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 coordinator 5 package coordinator
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "fmt" 9 "fmt"
10 "time" 10 "time"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 dg.Data = aggregate 307 dg.Data = aggregate
308 dg.Partial = nil 308 dg.Partial = nil
309 return le, nil 309 return le, nil
310 } 310 }
311 311
312 func loadStatePointer(stateP *LogStream, resp *logdog.GetResponse) error { 312 func loadStatePointer(stateP *LogStream, resp *logdog.GetResponse) error {
313 if stateP == nil { 313 if stateP == nil {
314 return nil 314 return nil
315 } 315 }
316 316
317 // The service should always return this when requested, but handle the case
318 // where it doesn't for completeness.
319 if resp.Desc == nil {
320 return errors.New("descriptor was not returned")
321 }
322
317 ls, err := loadLogStream(resp.Project, resp.Desc.Path(), resp.State, res p.Desc) 323 ls, err := loadLogStream(resp.Project, resp.Desc.Path(), resp.State, res p.Desc)
318 if err != nil { 324 if err != nil {
319 » » return fmt.Errorf("failde to load stream state: %v", err) 325 » » return fmt.Errorf("failed to load stream state: %v", err)
320 } 326 }
321 327
322 *stateP = *ls 328 *stateP = *ls
323 return nil 329 return nil
324 } 330 }
OLDNEW
« no previous file with comments | « logdog/client/coordinator/client.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698