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

Side by Side Diff: common/logdog/coordinator/list.go

Issue 1916013002: LogDog: Add project namespacing to `logdog_cat` (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-collector-butler
Patch Set: Rebase, project UI. 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 | « common/logdog/coordinator/client.go ('k') | common/logdog/coordinator/query.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 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
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
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 }
OLDNEW
« no previous file with comments | « common/logdog/coordinator/client.go ('k') | common/logdog/coordinator/query.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698