-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename classes that should not be pluralised
- Loading branch information
1 parent
2ab77fa
commit c2365f1
Showing
10 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
eventstore/src/main/kotlin/com/github/connorwyatt/common/eventstore/ktor/ApplicationExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
package com.github.connorwyatt.common.eventstore.ktor | ||
|
||
import com.github.connorwyatt.common.eventstore.configuration.EventStoreConfiguration | ||
import com.github.connorwyatt.common.eventstore.eventhandlers.EventStoreSubscriptionsManager | ||
import com.github.connorwyatt.common.eventstore.events.EventsRepository | ||
import com.github.connorwyatt.common.eventstore.events.InMemoryEventsRepository | ||
import com.github.connorwyatt.common.eventstore.eventhandlers.EventStoreSubscriptionManager | ||
import com.github.connorwyatt.common.eventstore.events.EventRepository | ||
import com.github.connorwyatt.common.eventstore.events.InMemoryEventRepository | ||
import io.ktor.server.application.* | ||
import org.kodein.di.instance | ||
import org.kodein.di.ktor.closestDI | ||
|
||
fun Application.configureEventStore(eventStoreConfiguration: EventStoreConfiguration) { | ||
if (!eventStoreConfiguration.useInMemoryEventStore) { | ||
val eventStoreSubscriptionsManager by closestDI().instance<EventStoreSubscriptionsManager>() | ||
val eventStoreSubscriptionManager by closestDI().instance<EventStoreSubscriptionManager>() | ||
|
||
eventStoreSubscriptionsManager.start() | ||
eventStoreSubscriptionManager.start() | ||
} | ||
|
||
val eventsRepository by closestDI().instance<EventsRepository>() | ||
val eventRepository by closestDI().instance<EventRepository>() | ||
|
||
(eventsRepository as? InMemoryEventsRepository)?.run { startEventPropagation() } | ||
(eventRepository as? InMemoryEventRepository)?.run { startEventPropagation() } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters