A Vert.x Web handler on which you register health check procedure. It computes the outcome status (`UP` or `DOWN`)
. When the handler process a HTTP request, it computes the global outcome and build a HTTP response as follows:
package |
Default |
---|
__construct()
create( $arg0, $arg1 = null) : \io\vertx\jphp\ext\healthchecks\HealthCheckHandler
This function creates a new instance of @see \io\vertx\jphp\ext\healthchecks\HealthChecks.
param $vertx [Vertx] the Vert.x instance, must not be {@code null} create($vertx)
Creates an instance of the default implementation of the @see \io\vertx\jphp\ext\healthchecks\HealthCheckHandler. This function creates a new instance of @see \io\vertx\jphp\ext\healthchecks\HealthChecks.
param $vertx [Vertx] the Vert.x instance, must not be {@code null} param $provider [AuthProvider] the Authentication provider used to authenticate the HTTP request create($vertx, $provider)
Vertx
AuthProvider
\io\vertx\jphp\ext\healthchecks\HealthCheckHandler
the created instance
createWithHealthChecks( $arg0, $arg1 = null) : \io\vertx\jphp\ext\healthchecks\HealthCheckHandler
param $hc [HealthChecks] the health checks object to use createWithHealthChecks($hc)
Creates an instance of the default implementation of the @see \io\vertx\jphp\ext\healthchecks\HealthCheckHandler.
param $hc [HealthChecks] the health checks object to use, must not be {@code null} param $provider [AuthProvider] createWithHealthChecks($hc, $provider)
HealthChecks
AuthProvider
\io\vertx\jphp\ext\healthchecks\HealthCheckHandler
the created instance
handle( $arg0) : void
RoutingContext
register( $arg0, $arg1, $arg2 = null) : $this
The procedure is a taking a of @see \io\vertx\jphp\ext\healthchecks\Status as parameter. Procedures are asynchronous, and must complete or fail the given . 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) @see \io\vertx\jphp\ext\healthchecks\Status, the procedure outcome is the received status.
This method uses a 1s timeout. To configure the timeout use @see \io\vertx\jphp\ext\healthchecks\HealthCheckHandler::register. param $name [string] the name of the procedure, must not be {@code null} or empty param $procedure [callable] the procedure, must not be {@code null} register($name, $procedure) Registers a health check procedure.
The procedure is a taking a of @see \io\vertx\jphp\ext\healthchecks\Status as parameter. Procedures are asynchronous, and must complete or fail the given . 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) @see \io\vertx\jphp\ext\healthchecks\Status, the procedure outcome is the received status. param $name [string] the name of the procedure, must not be {@code null} or empty param $timeout [integer] the procedure timeout param $procedure [callable] the procedure, must not be {@code null} register($name, $timeout, $procedure)
string
callable | integer
callable
$this
the current {@link HealthCheckHandler}
unregister( $arg0) : $this
string
$this
the current {@link HealthCheckHandler}