commonMain.internal.actions.StopValidationDaemonAction.kt Maven / Gradle / Ivy
package io.kform.internal.actions
import io.kform.AbsolutePath
import io.kform.FormManager
import io.kform.internal.AccessValidationDaemon
import io.kform.internal.ActionAccessType
import io.kform.internal.ValidationDaemon
/** Action that stops the validation daemon. */
internal class StopValidationDaemonAction(
formManager: FormManager,
private val validationDaemon: ValidationDaemon
) : FormManagerAction(formManager) {
override fun toString() = "StopValidationDaemon"
override val accesses = listOf(AccessValidationDaemon(ActionAccessType.Write))
override val accessedPaths = listOf(AbsolutePath.MATCH_ALL)
override suspend fun run() = validationDaemon.stop()
}