All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.nemerosa.ontrack.model.support.ConnectorStatus.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
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