Versions in this module Expand all Collapse all v2 v2.0.4 Apr 30, 2024 v2.0.3 Mar 17, 2024 Changes in this version + const DefaultInitialDuration + const DefaultMaxRetries + var ErrorNoMoreAttempts = errors.New("request cannot by retried") + func DefaultBackoff(d time.Duration) time.Duration + func NewRoundTripper(inner http.RoundTripper, o ...Option) http.RoundTripper + type BackoffFn func(time.Duration) time.Duration + type Option interface + Apply func(*Options) + func Backoff(bo BackoffFn) Option + func InitialDelay(d time.Duration) Option + func MaxRetries(max int) Option + func RetryAfter(ra RetryAfterFn) Option + func Strategy(rs RetryStrategyFn) Option + type Options struct + func MakeOptions(os ...Option) *Options + type Request struct + func NewRequest(r *http.Request, client func(*http.Request) (*http.Response, error), ...) *Request + func (r *Request) Do() (*http.Response, error) + func (r *Request) Done() bool + type RetryAfterFn func(*http.Response) time.Duration + type RetryStrategy int + const NoRetry + const RetryImmediate + const RetryWithInitialDelay + func (s RetryStrategy) String() string + type RetryStrategyFn func(*http.Response) (RetryStrategy, error) Other modules containing this package github.com/ossf/criticality_score