var DefaultConfig … type Config … type RequestFunc … type EvaluateFunc … // RequestFunc returns a RequestFunc using the evaluate function to determine // if requests can be retried and based on the exponential backoff // configuration of c. func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc { … } var waitFunc … // wait takes the caller's context, and the amount of time to wait. It will // return nil if the timer fires before or at the same time as the context's // deadline. This indicates that the call can be retried. func wait(ctx context.Context, delay time.Duration) error { … }