| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package output |
| 6 |
| 7 import ( |
| 8 "time" |
| 9 |
| 10 "github.com/luci/luci-go/common/retry" |
| 11 "golang.org/x/net/context" |
| 12 ) |
| 13 |
| 14 // DefaultRetryIterator returns a retry.Iterator configured with a default |
| 15 // exponential backoff retry configuration. |
| 16 func DefaultRetryIterator(context.Context) retry.Iterator { |
| 17 // TODO: Tune backoff parameters. |
| 18 return &retry.ExponentialBackoff{ |
| 19 Limited: retry.Limited{ |
| 20 Delay: (500 * time.Millisecond), |
| 21 Retries: 4, |
| 22 MaxTotal: 20 * time.Second, |
| 23 }, |
| 24 Multiplier: 2.0, |
| 25 } |
| 26 } |
| OLD | NEW |