commonMain.com.copperleaf.ballast.repository.bus.EventBusImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ballast-repository-jvm Show documentation
Show all versions of ballast-repository-jvm Show documentation
Opinionated Kotlin multiplatform Repository Caching library based on Ballast MVI
package com.copperleaf.ballast.repository.bus
import com.copperleaf.ballast.EventHandlerScope
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.asSharedFlow
public class EventBusImpl : EventBus {
private val _events = MutableSharedFlow()
override val events: SharedFlow get() = _events.asSharedFlow()
override suspend fun EventHandlerScope.send(event: Any) {
_events.emit(event)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy