1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-29 14:43:24 +00:00

vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2019-02-09 12:50:35 +00:00
parent fb5ee22112
commit 43bc381e90
324 changed files with 37701 additions and 10005 deletions

View File

@@ -9,6 +9,8 @@ import (
"time"
)
// BackoffStrategy defines the set of functions that a backoff-er must
// implement.
type BackoffStrategy interface {
// Pause returns the duration of the next pause and true if the operation should be
// retried, or false if no further retries should be attempted.
@@ -28,6 +30,7 @@ type ExponentialBackoff struct {
n uint
}
// Pause returns the amount of time the caller should wait.
func (eb *ExponentialBackoff) Pause() (time.Duration, bool) {
if eb.total > eb.Max {
return 0, false
@@ -40,6 +43,8 @@ func (eb *ExponentialBackoff) Pause() (time.Duration, bool) {
return d, true
}
// Reset resets the backoff strategy such that the next Pause call will begin
// counting from the start. It is not safe to call concurrently with Pause.
func (eb *ExponentialBackoff) Reset() {
eb.n = 0
eb.total = 0