com.netflix.karyon.spi
Interface HealthCheckHandler
public interface HealthCheckHandler
This is an extension to the callback handler
in eureka to provide a
more flexible health check response (an HTTP status code) as a healthcheck request.
This healthcheck handler is also used to have a fixed healthcheck endpoint created by karyon.
By default, karyon uses this handler to also feed health status to eureka. If this is not desired, one should set a
dynamic property with name PropertyNames.UNIFY_HEALTHCHECK_WITH_EUREKA
to false
.
Method Summary |
int |
getStatus()
Checks the health of the application and returns a status code, which can be directly consumed as a HTTP status
code. |
getStatus
int getStatus()
- Checks the health of the application and returns a status code, which can be directly consumed as a HTTP status
code.
Kayon considers any status code >= 200 and < 300 as healthy.
- Returns:
- The health status of the application.