Split configs

This commit is contained in:
2025-03-16 03:11:42 +01:00
parent 769d104040
commit 4adfc6467c
43 changed files with 254 additions and 191 deletions

View File

@@ -0,0 +1,25 @@
package eventDemo.configuration.injection
import eventDemo.adapter.infrastructureLayer.event.GameEventBusInMemory
import eventDemo.adapter.infrastructureLayer.event.GameEventStoreInMemory
import eventDemo.adapter.infrastructureLayer.event.projection.GameStateRepositoryInMemory
import eventDemo.business.event.GameEventBus
import eventDemo.business.event.GameEventStore
import eventDemo.business.event.projection.GameStateRepository
import eventDemo.libs.event.projection.SnapshotConfig
import org.koin.core.module.Module
import org.koin.dsl.bind
fun Module.configureDIInfrastructure() {
single {
GameEventBusInMemory()
} bind GameEventBus::class
single {
GameEventStoreInMemory()
} bind GameEventStore::class
single {
GameStateRepositoryInMemory(get(), get(), snapshotConfig = SnapshotConfig())
} bind GameStateRepository::class
}