commonMain.internal.SchemaEventsChannelBus.kt Maven / Gradle / Ivy
package io.kform.internal
import io.kform.SchemaEventsBus
import io.kform.ValueEvent
/** Implementation of the schema events bus using a channel. */
internal class SchemaEventsChannelBus(
private val eventHandler: suspend (event: ValueEvent<*>) -> Unit
) : SchemaEventsBus {
override suspend fun emit(event: ValueEvent<*>) = eventHandler(event)
}