CommandStreamChannel block the duplicate call

add GameCommandHandlerTest
Create a CommandStreamChannelBuilder to inject maxCacheTime
Add missing empty disabled test
fix EventStreamInMemory.readAll
This commit is contained in:
2025-03-11 21:40:16 +01:00
parent 0fbea7903a
commit c84aa7e0c1
22 changed files with 282 additions and 90 deletions

View File

@@ -1,11 +1,13 @@
package eventDemo.configuration
import eventDemo.app.command.GameCommandHandler
import eventDemo.app.command.command.GameCommand
import eventDemo.app.event.GameEventBus
import eventDemo.app.event.GameEventHandler
import eventDemo.app.event.GameEventStream
import eventDemo.app.event.projection.GameStateRepository
import eventDemo.app.eventListener.GameEventPlayerNotificationListener
import eventDemo.libs.command.CommandStreamChannelBuilder
import eventDemo.libs.event.EventBusInMemory
import eventDemo.libs.event.EventStreamInMemory
import io.ktor.server.application.Application
@@ -33,6 +35,9 @@ val appKoinModule =
single {
GameStateRepository(get(), get())
}
single {
CommandStreamChannelBuilder<GameCommand>()
}
singleOf(::GameEventHandler)
singleOf(::GameCommandHandler)