Sequences the result of this Saga to the next Saga.
Flattens the structure of this Saga by executing outer Saga first and then executes inner Saga.
Maps the resulting value A
of this Saga to value B
with function f
.
Materializes this Saga to ZIO effect.
Returns Saga that will execute this Saga in parallel with other, combining the result in a tuple.
Returns Saga that will execute this Saga in parallel with other, combining the result in a tuple. Both compensating actions would be executed in case of failure.
Returns Saga that will execute this Saga in parallel with other, combining the result with specified function f
.
Returns Saga that will execute this Saga in parallel with other, combining the result with specified function f
.
Both compensating actions would be executed in case of failure.
A Saga is an immutable structure that models a distributed transaction.
Saga pattern Saga class has three type parameters - R for environment, E for errors and A for successful result. Saga wraps a ZIO that carries the compensating action in both error and result channels and enables a composition with another Sagas in for-comprehensions. If error occurs Saga will execute compensating actions starting from action that corresponds to failed request till the first already completed request.