14 lines
371 B
Go
14 lines
371 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// note that returning either false or a non-nil error will result in the call not being retried
|
|
type RetryFunc func(ctx context.Context, req Request, retryCount int, err error) (bool, error)
|
|
|
|
// always retry on error
|
|
func alwaysRetry(ctx context.Context, req Request, retryCount int, err error) (bool, error) {
|
|
return true, nil
|
|
}
|