commonMain.com.copperleaf.ballast.repository.bus.EventBusImpl.kt Maven / Gradle / Ivy
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