commonMain.s2.sourcing.dsl.Loader.kt Maven / Gradle / Ivy
package s2.sourcing.dsl
import kotlinx.coroutines.flow.Flow
interface Loader {
suspend fun load(id: ID & Any): ENTITY?
suspend fun load(events: Flow): ENTITY?
suspend fun loadAndEvolve(id: ID & Any, news: Flow): ENTITY?
suspend fun evolve(events: Flow, entity: ENTITY? = null): ENTITY?
suspend fun reloadHistory(): List
}