getOrCreate

suspend fun <T> getOrCreate(name: String, configure: SagaBuilder<T>.() -> Unit): Saga<T>(source)

Gets an existing saga template or builds a new one from configure.

If a saga is already registered under name, configure is ignored and the existing instance is returned as-is -- same caveat as CacheRegistry.getOrCreate: calling this with a different T for an already-registered name is a programmer error, not something this API can check at compile time.