Package io.github.nomisrev

Types

Saga
Link copied to clipboard
interface Saga<A>
The saga design pattern is a way to manage data consistency across microservices in distributed transaction scenarios.
SagaEffect
Link copied to clipboard
interface SagaEffect
Receiver DSL of the saga { } builder.

Functions

parSequence
Link copied to clipboard
fun <A> Iterable<Saga<A>>.parSequence(ctx: CoroutineContext = Dispatchers.Default): Saga<List<A>>
Alias for parTraverseSage { it }.
parTraverseSaga
Link copied to clipboard
fun <A, B> Iterable<A>.parTraverseSaga(f: (A) -> Saga<B>): Saga<List<B>>
fun <A, B> Iterable<A>.parTraverseSaga(ctx: CoroutineContext, f: (A) -> Saga<B>): Saga<List<B>>
Parallel version of traverseSaga, it has the same semantics as parZip in terms of parallelism and cancellation.
saga
Link copied to clipboard
fun <A> saga(block: suspend SagaEffect.() -> A): Saga<A>
The Saga builder which exposes the SagaEffect.bind and SagaEffect.saga API.
sequence
Link copied to clipboard
fun <A> Iterable<Saga<A>>.sequence(): Saga<List<A>>
Alias for traverseSage { it }.
traverseSaga
Link copied to clipboard
fun <A, B> Iterable<A>.traverseSaga(transform: (A) -> Saga<B>): Saga<List<B>>
Traverses the Iterable and composes all Saga returned by the applies transform function.