Projection was now built on listener events

Create ProjectionBus and use it with listeners
add EventStream::getByVersion
This commit is contained in:
2025-03-18 21:48:37 +01:00
parent 908cc888ad
commit 8c1eabb9f5
22 changed files with 126 additions and 89 deletions

View File

@@ -41,4 +41,7 @@ class EventStreamInMemory<E : Event<*>> : EventStream<E> {
events
.filter { version.contains(it.version) }
.toSet()
override fun getByVersion(version: Int): E? =
events.find { version == it.version }
}