| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 coordinator | 5 package coordinator |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "github.com/luci/luci-go/common/api/logdog_coordinator/logs/v1" | 8 "github.com/luci/luci-go/common/api/logdog_coordinator/logs/v1" |
| 9 "github.com/luci/luci-go/common/logdog/types" | 9 "github.com/luci/luci-go/common/logdog/types" |
| 10 "golang.org/x/net/context" | 10 "golang.org/x/net/context" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 // Purged, if true, requests that purged log streams are included in the
list | 55 // Purged, if true, requests that purged log streams are included in the
list |
| 56 // results. This will result in an error if the user is not privileged t
o see | 56 // results. This will result in an error if the user is not privileged t
o see |
| 57 // purged logs. | 57 // purged logs. |
| 58 Purged bool | 58 Purged bool |
| 59 } | 59 } |
| 60 | 60 |
| 61 // List executes a log stream hierarchy listing for the specified path. | 61 // List executes a log stream hierarchy listing for the specified path. |
| 62 func (c *Client) List(ctx context.Context, base string, o ListOptions, cb ListCa
llback) error { | 62 func (c *Client) List(ctx context.Context, base string, o ListOptions, cb ListCa
llback) error { |
| 63 req := logdog.ListRequest{ | 63 req := logdog.ListRequest{ |
| 64 Project: string(c.project), |
| 64 Path: base, | 65 Path: base, |
| 65 Recursive: o.Recursive, | 66 Recursive: o.Recursive, |
| 66 StreamOnly: o.StreamsOnly, | 67 StreamOnly: o.StreamsOnly, |
| 67 State: o.State, | 68 State: o.State, |
| 68 IncludePurged: o.Purged, | 69 IncludePurged: o.Purged, |
| 69 } | 70 } |
| 70 | 71 |
| 71 for { | 72 for { |
| 72 resp, err := c.C.List(ctx, &req) | 73 resp, err := c.C.List(ctx, &req) |
| 73 if err != nil { | 74 if err != nil { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 88 return nil | 89 return nil |
| 89 } | 90 } |
| 90 } | 91 } |
| 91 | 92 |
| 92 if resp.Next == "" { | 93 if resp.Next == "" { |
| 93 return nil | 94 return nil |
| 94 } | 95 } |
| 95 req.Next = resp.Next | 96 req.Next = resp.Next |
| 96 } | 97 } |
| 97 } | 98 } |
| OLD | NEW |