Companion

Functions

Link copied to clipboard

Creates a Schedule which collects all its Input in a List.

Link copied to clipboard
fun <Input> doUntil(predicate: suspend (input: Input, output: Input) -> Boolean): Schedule<Input, Input>

Creates a Schedule that continues until predicate returns true.

Link copied to clipboard
fun <Input> doWhile(predicate: suspend (input: Input, output: Input) -> Boolean): Schedule<Input, Input>

Create a Schedule that continues while predicate returns true.

Link copied to clipboard
fun <Input> exponential(base: Duration, factor: Double = 2.0): Schedule<Input, Duration>

Creates a exponential backing-off Schedule with the provided base duration and exponential factor.

Link copied to clipboard

Creates a fibonacci backing-off Schedule with the provided one.

Link copied to clipboard

Creates a Schedule that runs forever

Link copied to clipboard

Creates a Schedule that outputs the Input unmodified.

Link copied to clipboard

Creates a linear backing-off Schedule with the provided base value.

Link copied to clipboard

Creates a Schedule that recurs n times.

Link copied to clipboard
fun <Input> spaced(duration: Duration): Schedule<Input, Long>

Creates a spaced backing-off Schedule with the provided duration.

Link copied to clipboard
fun <Input, Output> unfold(initial: Output, next: suspend (Output) -> Output): Schedule<Input, Output>

Creates a Schedule that unfolds values of Output with an initial value, and the next function to compute the next value.