Split configs
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user