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

invirt.http4k.handlers.HealthCheck.kt Maven / Gradle / Ivy

There is a newer version: 0.10.11
Show newest version
package invirt.http4k.handlers

import invirt.http4k.GET
import invirt.http4k.jsonLens
import org.http4k.core.Response
import org.http4k.core.Status
import org.http4k.core.with
import org.http4k.routing.RoutingHttpHandler
import org.http4k.routing.routes

object HealthCheck {

    internal val jsonLens = jsonLens()

    val json: RoutingHttpHandler = routes(
        "/health" GET {
            Response(Status.OK).with(jsonLens of HealthStatus())
        }
    )
}

data class HealthStatus(val status: String = "healthy")




© 2015 - 2024 Weber Informatics LLC | Privacy Policy