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

Unified Diff: common/retry/transient.go

Issue 1610993002: LogDog: Add collector service implementation. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 11 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
Index: common/retry/transient.go
diff --git a/common/retry/transient.go b/common/retry/transient.go
index 157a143e0b3f5aa122b6d6a7b623164261e9bbc0..058c6dad332b34267079933b6a43fea1c36dc70d 100644
--- a/common/retry/transient.go
+++ b/common/retry/transient.go
@@ -35,3 +35,11 @@ func TransientOnly(i Iterator) Iterator {
}
return &transientOnlyIterator{i}
}
+
+// TransientOnlyGenerator wraps a retry.Generator, retrying only in the event
+// of Transient errors.
+func TransientOnlyGenerator(gen Generator) Generator {
dnj (Google) 2016/01/21 04:36:24 Now that we have the concept of a generator, we ca
+ return func() Iterator {
+ return TransientOnly(gen())
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698