create bus and subscriber

This commit is contained in:
2025-03-04 23:02:07 +01:00
parent a6847353b2
commit f3ca94c97e
36 changed files with 885 additions and 234 deletions

View File

@@ -1,6 +1,5 @@
package eventDemo.libs.event
import kotlinx.coroutines.flow.Flow
import kotlin.reflect.KClass
/**
@@ -22,6 +21,6 @@ interface EventStream<E : Event<ID>, ID : AggregateId> {
eventType: KClass<out R>,
): E?
/** Reads all events associated with a given aggregate ID as a Flow (asynchronous stream) */
fun readAll(aggregateId: ID): Flow<E>
/** Reads all events associated with a given aggregate ID */
fun readAll(aggregateId: ID): List<E>
}