Journal Outcome
Library-owned result type for all SagaJournal operations.
Using a sealed hierarchy instead of kotlin.Result<T> avoids historical compiler restrictions on kotlin.Result in suspend-interface positions, and keeps the API consistent with SagaResult / StatefulSagaResult patterns in the library.
Usage
when (val outcome = journal.append(entry)) {
is JournalOutcome.Ok -> process(outcome.value)
is JournalOutcome.Err -> handleError(outcome.cause, outcome.context)
}Content copied to clipboard