CheckStatus

sealed interface CheckStatus

The state of an on-demand check such as "Test connection": not run yet, running, or finished with a message. Messages come from the app, so they can be specific ("Connected to llama3").

Inheritors

Types

Link copied to clipboard
data object Checking : CheckStatus

The check is running. Disable the control that starts it (see isChecking).

Link copied to clipboard
data class Failure(val message: String) : CheckStatus

The check failed. Do not put secrets in message; it is shown and announced.

Link copied to clipboard
data object Idle : CheckStatus

The check has not run, or its result was discarded.

Link copied to clipboard
data class Success(val message: String) : CheckStatus

The check passed.

Properties

Link copied to clipboard

True while the check is running, e.g. enabled = !status.isChecking on its button.

Functions

Link copied to clipboard
fun CheckStatus.message(labels: CheckStatusLabels = CheckStatusLabels()): String

The text CheckStatusRow shows for this status.