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

Side by Side Diff: common/retry/defaults.go

Issue 1610993002: LogDog: Add collector service implementation. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package retry 5 package retry
6 6
7 import ( 7 import (
8 "time" 8 "time"
9 ) 9 )
10 10
11 // defaultIterator defines a template for the default retry parameters that 11 // defaultIterator defines a template for the default retry parameters that
12 // should be used throughout the program. 12 // should be used throughout the program.
13 var defaultIteratorTemplate = ExponentialBackoff{ 13 var defaultIteratorTemplate = ExponentialBackoff{
14 Limited: Limited{ 14 Limited: Limited{
15 Delay: 200 * time.Millisecond, 15 Delay: 200 * time.Millisecond,
16 Retries: 10, 16 Retries: 10,
17 }, 17 },
18 MaxDelay: 10 * time.Second, 18 MaxDelay: 10 * time.Second,
19 Multiplier: 2, 19 Multiplier: 2,
20 } 20 }
21 21
22 // Default returns a new instance of the default iterator configuration. 22 // Default is a Generator that returns a new instance of the default iterator
23 // configuration.
23 func Default() Iterator { 24 func Default() Iterator {
24 it := defaultIteratorTemplate 25 it := defaultIteratorTemplate
25 return &it 26 return &it
26 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698