repeatOrElseAsFlow

suspend fun repeatOrElseAsFlow(fa: suspend () -> Input, orElse: suspend (Throwable, Output?) -> Output): Flow<Output>(source)

Runs this effect and emits the output, if it succeeded, decide using the provided policy if the effect should be repeated and emitted, if so, with how much delay. Also offers a function to handle errors if they are encountered during repetition.