Skip to content

Commit

Permalink
Consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Nov 22, 2024
1 parent 176359c commit fb0667c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ func retry[T any](operationName string, operationFn func() (T, error), cfg retry
}

// UnlimitedRetry retries an operation forever.
func UnlimitedRetry[T any](operationName string, operation func() (T, error)) (T, error) {
return retry(operationName, operation, retryConfig{
func UnlimitedRetry[T any](operationName string, operationFn func() (T, error)) (T, error) {
return retry(operationName, operationFn, retryConfig{
MaxRetryTime: 0,
MaxAttempts: 0,
WaitTimeBetweenRetries: defaultWaitTimeBetweenRetries,
})
}

// LimitedRetry retries an operation until max retry time or until max attempts.
func LimitedRetry[T any](operationName string, operation func() (T, error)) (T, error) {
return retry(operationName, operation, retryConfig{
func LimitedRetry[T any](operationName string, operationFn func() (T, error)) (T, error) {
return retry(operationName, operationFn, retryConfig{
MaxRetryTime: defaultMaxRetryTime,
MaxAttempts: defaultMaxRetries,
WaitTimeBetweenRetries: defaultWaitTimeBetweenRetries,
Expand Down

0 comments on commit fb0667c

Please sign in to comment.