net.nemerosa.ontrack.model.support.ConnectorStatus.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.support
/**
* Status of a connector.
*/
data class ConnectorStatus(
val description: ConnectorDescription,
val type: ConnectorStatusType,
val error: String?
) {
companion object {
fun ok(connector: ConnectorDescription) = ConnectorStatus(
description = connector,
type = ConnectorStatusType.UP,
error = null
)
fun error(connector: ConnectorDescription, ex: Exception) = ConnectorStatus(
description = connector,
type = ConnectorStatusType.DOWN,
error = ex.message
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy