-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from gurkanguray/feat/17-retry-mechanism
Crossing fingers and landing it. -- worst case we can fix it later.
- Loading branch information
Showing
11 changed files
with
434 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,8 @@ go.work.sum | |
.idea | ||
.code | ||
.history | ||
*.DS_Store | ||
*.iml | ||
|
||
# App-specific: | ||
.spike-token | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// \\ SPIKE: Secure your secrets with SPIFFE. | ||
// \\\\\ Copyright 2024-present SPIKE contributors. | ||
// \\\\\\\ SPDX-License-Identifier: Apache-2.0 | ||
|
||
package mock | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
// MockRetrier implements Retrier for testing | ||
type MockRetrier struct { | ||
RetryFunc func(context.Context, func() error) error | ||
} | ||
|
||
// RetryWithBackoff implements the Retrier interface | ||
func (m *MockRetrier) RetryWithBackoff( | ||
ctx context.Context, | ||
operation func() error, | ||
) error { | ||
if m.RetryFunc != nil { | ||
return m.RetryFunc(ctx, operation) | ||
} | ||
return nil | ||
} |
Oops, something went wrong.