arrow
arrow copied to clipboard
Introduce resourceSaga
An alternative to #3804 and #3795, this introduces a new handler resourceSaga that gives access to both ResourceScope and SagaScope, in such a way that the compensators and finalizers run in the expected order (which is different from just doing resourceScope { saga {...}.transact()}). I went for contexts immediately because making an intersection interface results in conflicting JVM signatures because both Resource.bind and Saga.bind have the same signature
Kover Report
| File | Coverage [63.64%] |
|---|---|
| arrow-libs/resilience/arrow-resilience/src/commonMain/kotlin/arrow/resilience/Saga.kt | 63.64% |
| Total Project Coverage | 47.10% |
|---|
Converted to a draft temporarily until we add context bridges for Resource and Saga