| Index: client/internal/logdog/butler/output/retry.go
|
| diff --git a/client/internal/logdog/butler/output/retry.go b/client/internal/logdog/butler/output/retry.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c85cb6d794c9730bab84a4503c3972e43b170e2a
|
| --- /dev/null
|
| +++ b/client/internal/logdog/butler/output/retry.go
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package output
|
| +
|
| +import (
|
| + "time"
|
| +
|
| + "github.com/luci/luci-go/common/retry"
|
| + "golang.org/x/net/context"
|
| +)
|
| +
|
| +// DefaultRetryIterator returns a retry.Iterator configured with a default
|
| +// exponential backoff retry configuration.
|
| +func DefaultRetryIterator(context.Context) retry.Iterator {
|
| + // TODO: Tune backoff parameters.
|
| + return &retry.ExponentialBackoff{
|
| + Limited: retry.Limited{
|
| + Delay: (500 * time.Millisecond),
|
| + Retries: 4,
|
| + MaxTotal: 20 * time.Second,
|
| + },
|
| + Multiplier: 2.0,
|
| + }
|
| +}
|
|
|