add IamReadyToPlayCommand & refactoring

This commit is contained in:
2025-04-14 23:39:31 +02:00
parent 06443d7efa
commit bc35131bfc
41 changed files with 404 additions and 322 deletions
@@ -0,0 +1,28 @@
package eventDemo.configuration
import eventDemo.app.event.GameEventBus
import eventDemo.app.event.GameEventStream
import eventDemo.libs.event.EventBusInMemory
import eventDemo.libs.event.EventStreamInMemory
import io.ktor.server.application.Application
import io.ktor.server.application.install
import org.koin.dsl.module
import org.koin.ktor.plugin.Koin
import org.koin.logger.slf4jLogger
fun Application.configureKoin() {
install(Koin) {
slf4jLogger()
modules(appKoinModule)
}
}
val appKoinModule =
module {
single {
GameEventStream(get(), EventStreamInMemory())
}
single {
GameEventBus(EventBusInMemory())
}
}