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

Unified Diff: common/errors/transient.go

Issue 1637193002: common/prpc, tools/cmd/cproto: prpc client (Closed) Base URL: https://github.com/luci/luci-go@prpc-server
Patch Set: Add Context-derived timeout for Client. 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
« no previous file with comments | « no previous file | common/errors/wrap.go » ('j') | common/errors/wrap.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/errors/transient.go
diff --git a/common/errors/transient.go b/common/errors/transient.go
index f15c3a9cadb9a0127b3d04320646681d8de91219..e1d5a6bcffbb460f153dfbd1afbef8c42ad1957b 100644
--- a/common/errors/transient.go
+++ b/common/errors/transient.go
@@ -17,10 +17,17 @@ type transientWrapper struct {
error
}
+var _ Transient = transientWrapper{}
+var _ Wrap = transientWrapper{}
iannucci 2016/01/27 02:55:49 var _ interface { Transient Wrap } = transient
dnj (Google) 2016/01/27 03:24:25 Done.
+
func (t transientWrapper) IsTransient() bool {
return true
}
+func (t transientWrapper) InnerError() error {
+ return t.error
+}
+
// IsTransient tests if a given error is Transient.
func IsTransient(err error) bool {
if t, ok := err.(Transient); ok {
« no previous file with comments | « no previous file | common/errors/wrap.go » ('j') | common/errors/wrap.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698