package retry
import "github.com/bitrise-io/go-utils/retry"
Index ¶
- func NewHTTPClient() *retryablehttp.Client
- type AbortableAction
- type Action
- type HTTPLogAdaptor
- type Model
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient() *retryablehttp.Client
NewHTTPClient returns a retryable HTTP client
Types ¶
type AbortableAction ¶
AbortableAction ...
type Action ¶
Action ...
type HTTPLogAdaptor ¶
type HTTPLogAdaptor struct{}
HTTPLogAdaptor adapts the retryablehttp.Logger interface to the go-utils logger.
func (*HTTPLogAdaptor) Printf ¶
func (*HTTPLogAdaptor) Printf(fmtStr string, vars ...interface{})
Printf implements the retryablehttp.Logger interface
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model ...
func Times ¶
Times ...
func Wait ¶
Wait ...
func (*Model) Times ¶
Times ...
func (Model) Try ¶
Try continues executing the supplied action while this action parameter returns an error and the configured number of times has not been reached. Otherwise, it stops and returns the last received error.
func (Model) TryWithAbort ¶
func (Model Model) TryWithAbort(action AbortableAction) error
TryWithAbort continues executing the supplied action while this action parameter returns an error, a false bool value and the configured number of times has not been reached. Returning a true value from the action aborts the retry loop.
Good for retrying actions which can return a mix of retryable and non-retryable failures.
func (*Model) Wait ¶
Wait ...
Source Files ¶
- Version
- v1.0.15 (latest)
- Published
- May 13, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 months ago –
Tools for package owners.