Documentation
¶
Overview ¶
Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ExtremeOpts gives an even longer timeout and more retries (~30 min). ExtremeOpts = Options{BaseDelay: 120 * time.Second, BackoffBase: 2.0, Retries: 10} // DefaultOpts is the default timeout (~5 minutes). DefaultOpts = Options{BaseDelay: time.Second, BackoffBase: 2.0, Retries: 5} )
Functions ¶
func DoWithRetry ¶
DoWithRetry executes function doFunc. If there is an error, it will retry with a backoff delay until max retry times reached or context done. If retryOpts.Retries == 0, it will execute doFunc just once without any retries. If retryOpts.Retries < 0, it retries an infinite number of times.
Types ¶
Click to show internal directories.
Click to hide internal directories.