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

Unified Diff: common/logdog/fetcher/fetcher.go

Issue 1672833003: LogDog: Add log rendering view. Base URL: https://github.com/luci/luci-go@master
Patch Set: Clean up, add tests, little reorg. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/logdog/coordinator/stream_params.go ('k') | common/logdog/fetcher/fetcher_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/logdog/fetcher/fetcher.go
diff --git a/common/logdog/fetcher/fetcher.go b/common/logdog/fetcher/fetcher.go
index 279993d2e8475716dc94821ab5abb3ff67a1d072..ab1865d440fd1d4252385af09101fc6629e7f007 100644
--- a/common/logdog/fetcher/fetcher.go
+++ b/common/logdog/fetcher/fetcher.go
@@ -31,7 +31,7 @@ type LogRequest struct {
// Index is the starting log index to request.
Index types.MessageIndex
// Count, if >0, is the maximum number of log entries to request.
- Count int
+ Count int64
// Bytes, if >0, is the maximum number of log bytes to request. At least one
// log must be returned regardless of the byte limit.
Bytes int64
@@ -160,7 +160,7 @@ func (f *Fetcher) NextLogEntry() (*logpb.LogEntry, error) {
type fetchRequest struct {
index types.MessageIndex
- count int
+ count int64
bytes int64
respC chan *fetchResponse
}
@@ -252,7 +252,7 @@ func (f *Fetcher) fetch(c context.Context) {
logFetchC = logFetchBaseC
req := fetchRequest{
index: nextFetchIndex,
- count: int(fetchCount),
+ count: fetchCount,
bytes: fetchBytes,
respC: logFetchC,
}
@@ -362,7 +362,7 @@ func (f *Fetcher) fetchLogs(c context.Context, req *fetchRequest) {
"index": req.index,
"delay": f.o.Delay,
}.Infof(c, "No logs returned. Sleeping...")
- clock.Sleep(c, f.o.Delay)
+ clock.CancelSleep(c, f.o.Delay)
}
}
}
« no previous file with comments | « common/logdog/coordinator/stream_params.go ('k') | common/logdog/fetcher/fetcher_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698