SagaEffect

interface SagaEffect

DSL that enables the Saga pattern in a suspend DSL.

Functions

Link copied to clipboard
open suspend fun <A> Saga<A>.bind(): A

Executes a Saga and returns its value A

Link copied to clipboard
open suspend operator fun <A> Saga<A>.invoke(): A

Invoke a Saga and returns its value A

Link copied to clipboard
abstract suspend fun <A> saga(action: suspend SagaActionStep.() -> A, compensation: suspend (A) -> Unit): A

Run an action to produce a value of type A and install a compensation to undo the action.

Sources

Link copied to clipboard