interface HealthChecks
Author
Clement Escoffier
open static fun create(vertx: Vertx): HealthChecks
Creates a new instance of the default implementation of HealthChecks. |
|
abstract fun invoke(resultHandler: Handler<JsonObject>): HealthChecks
Invokes the registered procedures and computes the outcome. abstract fun invoke(name: String, resultHandler: Handler<AsyncResult<JsonObject>>): HealthChecks
Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome. |
|
abstract fun register(name: String, procedure: Handler<Future<Status>>): HealthChecks
Registers a health check procedure. The procedure is a Handler taking a Future of Status as parameter. Procedures are asynchronous, and must complete or fail the given Future. If the future object is failed, the procedure outcome is considered as `DOWN`. If the future is completed without any object, the procedure outcome is considered as `UP`. If the future is completed with a (not-null) Status, the procedure outcome is the received status. This method uses a 1s timeout. Use abstract fun register(name: String, timeout: Long, procedure: Handler<Future<Status>>): HealthChecks
Registers a health check procedure. The procedure is a Handler taking a Future of Status as parameter. Procedures are asynchronous, and must complete or fail the given Future. If the future object is failed, the procedure outcome is considered as `DOWN`. If the future is completed without any object, the procedure outcome is considered as `UP`. If the future is completed with a (not-null) Status, the procedure outcome is the received status. |
|
abstract fun unregister(name: String): HealthChecks
Unregisters a procedure. |