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

Unified Diff: common/api/logdog_coordinator/services/v1/util.go

Issue 1863973002: LogDog: Update to archival V2. (Closed) Base URL: https://github.com/luci/luci-go@grpcutil-errors
Patch Set: Fix proto comment. Created 4 years, 8 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/api/logdog_coordinator/services/v1/tasks.pb.go ('k') | common/errors/multierror.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/api/logdog_coordinator/services/v1/util.go
diff --git a/common/api/logdog_coordinator/services/v1/util.go b/common/api/logdog_coordinator/services/v1/util.go
new file mode 100644
index 0000000000000000000000000000000000000000..7bb6d1741b7b80d61a5309ab29c3032a91ea41fd
--- /dev/null
+++ b/common/api/logdog_coordinator/services/v1/util.go
@@ -0,0 +1,18 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package logdog
+
+// Complete returns true if the archive request expresses that the archived
+// log stream was complete.
+//
+// A log stream is complete if every entry between zero and its terminal index
+// is included.
+func (ar *ArchiveStreamRequest) Complete() bool {
+ tidx := ar.TerminalIndex
+ if tidx < 0 {
+ tidx = -1
+ }
+ return (ar.LogEntryCount == (tidx + 1))
+}
« no previous file with comments | « common/api/logdog_coordinator/services/v1/tasks.pb.go ('k') | common/errors/multierror.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698