-
Notifications
You must be signed in to change notification settings - Fork 0
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 #4 from reugn/develop
v0.4.0
- Loading branch information
Showing
30 changed files
with
848 additions
and
259 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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
kotlin.code.style=official | ||
kotlin.code.style=official | ||
version=0.4.0 |
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Tue Feb 11 15:11:05 IST 2020 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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 |
---|---|---|
@@ -1,8 +1,17 @@ | ||
package io.github.reugn.kotlin.backoff | ||
|
||
import io.github.reugn.kotlin.backoff.utils.Result | ||
import io.github.reugn.kotlin.backoff.util.Result | ||
|
||
interface Backoff<T> { | ||
|
||
suspend fun retry(f: suspend () -> T): Result<T, Exception> | ||
/** | ||
* Retries the specified operation with delays and returns the result. | ||
*/ | ||
suspend fun retry(operation: suspend () -> T): Result<T, Throwable> | ||
|
||
/** | ||
* Executes the specified operation with retries and returns the result. | ||
* The difference from [retry] is that the first time the operation is performed without delay. | ||
*/ | ||
suspend fun withRetries(operation: suspend () -> T): Result<T, Throwable> | ||
} |
Oops, something went wrong.