| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1" | 12 "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1" |
| 13 "github.com/luci/luci-go/logdog/api/logpb" | 13 "github.com/luci/luci-go/logdog/api/logpb" |
| 14 "github.com/luci/luci-go/logdog/common/types" | 14 "github.com/luci/luci-go/logdog/common/types" |
| 15 "github.com/luci/luci-go/luci_config/common/cfgtypes" | 15 "github.com/luci/luci-go/luci_config/common/cfgtypes" |
| 16 |
| 16 "golang.org/x/net/context" | 17 "golang.org/x/net/context" |
| 17 ) | 18 ) |
| 18 | 19 |
| 19 // StreamState represents the client-side state of the log stream. | 20 // StreamState represents the client-side state of the log stream. |
| 20 // | 21 // |
| 21 // It is a type-promoted version of logdog.LogStreamState. | 22 // It is a type-promoted version of logdog.LogStreamState. |
| 22 type StreamState struct { | 23 type StreamState struct { |
| 23 // Created is the time, represented as a UTC RFC3339 string, when the lo
g | 24 // Created is the time, represented as a UTC RFC3339 string, when the lo
g |
| 24 // stream was created. | 25 // stream was created. |
| 25 Created time.Time | 26 Created time.Time |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } | 314 } |
| 314 | 315 |
| 315 ls, err := loadLogStream(resp.Project, resp.Desc.Path(), resp.State, res
p.Desc) | 316 ls, err := loadLogStream(resp.Project, resp.Desc.Path(), resp.State, res
p.Desc) |
| 316 if err != nil { | 317 if err != nil { |
| 317 return fmt.Errorf("failde to load stream state: %v", err) | 318 return fmt.Errorf("failde to load stream state: %v", err) |
| 318 } | 319 } |
| 319 | 320 |
| 320 *stateP = *ls | 321 *stateP = *ls |
| 321 return nil | 322 return nil |
| 322 } | 323 } |
| OLD | NEW |