FitEvent

sealed class FitEvent(source)

Lifecycle event emitted by a FitHandle during a fitting (or batch) job.

The set comprises the start signals, lightweight progress events, and the terminal events. Progress events carry no result payload — the full result arrives once, on the terminal event (FitCompleted / BatchFitCompleted), mirroring ksl.app's lifecycle-only event convention.

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
data class BatchFitCompleted(val fitId: String, val report: BatchFitResultData, val endTime: Instant) : FitEvent

Terminal: the batch produced a BatchFitResultData normally.

Link copied to clipboard
data class BatchFitStarted(val fitId: String, val datasetCount: Int, val startTime: Instant) : FitEvent.Started

Emitted once at the start of a batch, before the first dataset is fit.

Link copied to clipboard
data class DatasetCompleted(val fitId: String, val datasetName: String, val index: Int, val total: Int, val success: Boolean) : FitEvent

Progress: one dataset of a batch has finished. Carries no result payload — only position and outcome. success is true when the dataset produced a result, false when it became a BatchFailure.

Link copied to clipboard
data class FitCancelled(val fitId: String, val reason: String, val endTime: Instant) : FitEvent

Terminal: the fit was cancelled before completion.

Link copied to clipboard
data class FitCompleted(val fitId: String, val report: FitResultData, val endTime: Instant) : FitEvent

Terminal: the fit produced a FitResultData normally.

Link copied to clipboard
data class FitFailed(val fitId: String, val error: FittingError, val endTime: Instant) : FitEvent

Terminal: the fit failed with a structured error.

Link copied to clipboard
data class FitStarted(val fitId: String, val datasetName: String, val startTime: Instant) : FitEvent.Started

Emitted once for a single fit, after the data source resolves and before the fitter starts work. A failed import never emits this event — the only event on that path is FitFailed.

Link copied to clipboard
sealed class Started : FitEvent

Sealed parent of every "started" event, so callers that just need a uniform start signal can match is FitEvent.Started. Common fields only; each variant adds its specifics (a single dataset name, or a batch dataset count).