Skip to content

Commit

Permalink
fix(#26): unify naming
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanHCB committed Feb 20, 2024
1 parent 03c5e57 commit affb835
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions implementation/retry/retry.go
Expand Up @@ -28,23 +28,23 @@ type RetryImpl struct {
SilenceGivingUp bool
}

func NewWithOpts(
func NewWithOptions(
wrapped aurestclientapi.Client,
condition aurestclientapi.RetryConditionCallback,
options RetryOptions,
opts RetryOptions,
) aurestclientapi.Client {
repeatCount := uint8(2)
if options.RepeatCount > 0 {
repeatCount = options.RepeatCount
if opts.RepeatCount > 0 {
repeatCount = opts.RepeatCount
}
return &RetryImpl{
Wrapped: wrapped,
RepeatCount: repeatCount,
RetryCondition: condition,
BeforeRetry: options.BeforeRetryOrNil,
BeforeRetry: opts.BeforeRetryOrNil,
RetryingMetricsCallback: doNothingMetricsCallback,
GivingUpMetricsCallback: doNothingMetricsCallback,
SilenceGivingUp: options.SilenceGivingUp,
SilenceGivingUp: opts.SilenceGivingUp,
}
}

Expand Down
2 changes: 1 addition & 1 deletion implementation/retry/retry_test.go
Expand Up @@ -131,7 +131,7 @@ func TestFailWithRetryWithOpts(t *testing.T) {
aulogging.SetupNoLoggerForTesting()

mock := tstMock()
cut := NewWithOpts(mock,
cut := NewWithOptions(mock,
func(ctx context.Context, response *aurestclientapi.ParsedResponse, err error) bool {
return true
},
Expand Down

0 comments on commit affb835

Please sign in to comment.