RetryUtils

object RetryUtils

Functions

Link copied to clipboard
suspend fun <T> withRetry(maxRetries: Int = RetryConfiguration.MAX_RETRIES, initialDelayMillis: Long = RetryConfiguration.INITIAL_DELAY_MS, maxDelayMillis: Long = RetryConfiguration.MAX_DELAY_MS, exponentialBase: Double = RetryConfiguration.EXPONENTIAL_BASE, shouldRetry: (Exception) -> Boolean = { true }, operationName: String? = null, block: suspend (attempt: Int) -> T): T