Companion
Functions
Link copied to clipboard
fun <A> delayed(delaySchedule: Schedule<A, Duration>): Schedule<A, Duration>
Content copied to clipboard
Creates a Schedule that uses another Schedule to generate the delay of this schedule. Continues for as long as delaySchedule continues and adds the output of delaySchedule to the delay that delaySchedule produced. Also returns the full delay as output.
Link copied to clipboard
Link copied to clipboard
fun <A> exponential(base: Double, factor: Double = 2.0): Schedule<A, Double>
Content copied to clipboard
fun <A> exponential(base: Duration, factor: Double = 2.0): Schedule<A, Duration>
Content copied to clipboard
Creates a Schedule that increases its delay exponentially with a given factor and base. Delays can be calculated as base * factor ^ n where n is the number of executions.
Link copied to clipboard
operator fun <S, A, B> invoke(initial: suspend () -> S, update: suspend (A, S) -> Schedule.Decision<S, B>): Schedule<A, B>
Content copied to clipboard
Invoke constructor to manually define a schedule. If you need this, please consider adding it to Arrow or suggest a change to avoid using this manual method.
Link copied to clipboard