Skip to content

["Request"] Resilience Saga allow  #3432

@nomisRev

Description

@nomisRev

What version are you currently using?

2.0.0-alpha.1

What would you like to see?

Similarly to nested transaction, I want to be able to automatically created nested Sagas. This can easily be done by injecting the SagaContext into the CoroutineContext, if nested sagas are configured, and any nested Saga could automatically be nested into the parent. This machinery should be internal to Resilience, so all new code to add this functionality should be private, and not inlined.

private class SagaContext(private val scope: SagaScope): CoroutineContext
private fun sagaContext(): SagaContext? = TODO()

fun <A> sagaScope(
  allowNested: Boolean = false,
  block: SagaScope.() -> A
): Saga<A> {
   ...
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions