Configure redis for ktor/koin

This commit is contained in:
2025-03-19 00:30:35 +01:00
parent 6d2043d9fe
commit 8e732b0f9e
7 changed files with 30 additions and 10 deletions

View File

@@ -14,8 +14,13 @@ import eventDemo.libs.event.projection.SnapshotConfig
import org.koin.core.module.Module
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.bind
import redis.clients.jedis.JedisPool
fun Module.configureDIInfrastructure(redisUrl: String) {
single {
JedisPool(redisUrl)
}
fun Module.configureDIInfrastructure() {
singleOf(::GameEventBusInMemory) bind GameEventBus::class
singleOf(::GameEventStoreInMemory) bind GameEventStore::class
singleOf(::GameProjectionBusInMemory) bind GameProjectionBus::class