orbit-util / orbit.util.misc

Package orbit.util.misc

Types

RNGUtils

Utilities for generating random values.

object RNGUtils

Extensions for External Classes

kotlin.collections.Collection

Functions

attempt

A suspending function that makes multiple attempts to successfully execute a code block. Supports variable delays, logging and back off. The result of the computation on the first successful execution or the exception thrown on the last failing execution is propagated to the caller.

suspend fun <T> attempt(maxAttempts: Int = 5, initialDelay: Long = 1000, maxDelay: Long = Long.MAX_VALUE, factor: Double = 1.0, logger: KLogger? = null, body: () -> T): T