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

Unified Diff: logdog/appengine/coordinator/endpoints/logs/get.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: more refactor Created 3 years, 6 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: logdog/appengine/coordinator/endpoints/logs/get.go
diff --git a/logdog/appengine/coordinator/endpoints/logs/get.go b/logdog/appengine/coordinator/endpoints/logs/get.go
index 19f1e35a7e9ae6e5fafd1acc9dba9186f61dea4c..64478d023c47b8e041cd8e74a602524d3834f325 100644
--- a/logdog/appengine/coordinator/endpoints/logs/get.go
+++ b/logdog/appengine/coordinator/endpoints/logs/get.go
@@ -11,6 +11,7 @@ import (
log "github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/common/proto/google"
"github.com/luci/luci-go/common/retry"
+ "github.com/luci/luci-go/common/retry/transient"
"github.com/luci/luci-go/grpc/grpcutil"
"github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1"
"github.com/luci/luci-go/logdog/api/logpb"
@@ -210,7 +211,7 @@ func getHead(c context.Context, req *logdog.GetRequest, st coordinator.Storage,
var ierr error
count := 0
- err := retry.Retry(c, retry.TransientOnly(retry.Default), func() error {
+ err := retry.Retry(c, transient.Only(retry.Default), func() error {
// Issue the Get request. This may return a transient error, in which case
// we will retry.
return st.Get(sreq, func(e *storage.Entry) bool {
@@ -274,7 +275,7 @@ func getTail(c context.Context, st coordinator.Storage, project cfgtypes.Project
}.Debugf(c, "Issuing Tail request.")
var e *storage.Entry
- err := retry.Retry(c, retry.TransientOnly(retry.Default), func() (err error) {
+ err := retry.Retry(c, transient.Only(retry.Default), func() (err error) {
e, err = st.Tail(project, path)
return
}, func(err error, delay time.Duration) {

Powered by Google App Engine
This is Rietveld 408576698