HealthChecks

package

Default

Methods

__construct

__construct() 

Creates a new instance of the default implementation of @see \io\vertx\jphp\ext\healthchecks\HealthChecks.

create( $arg0) : \io\vertx\jphp\ext\healthchecks\HealthChecks
static

Arguments

$arg0

Vertx

Response

\io\vertx\jphp\ext\healthchecks\HealthChecks

the created instance

Invokes the registered procedures and computes the outcome.

invoke( $arg0,  $arg1 = null) : $this

param $resultHandler [callable] the result handler, must not be {@code null}. The handler received the computed \JsonObject. invoke($resultHandler)

Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.

param $name [string] param $resultHandler [callable] the result handler, must not be {@code null}. The handler received an \AsyncResult marked as failed if the procedure with the given name cannot be found or invoked. invoke($name, $resultHandler)

Arguments

$arg0

callable | string

$arg1

callable

Response

$this

the current {@link HealthChecks}

Registers a health check procedure.

register( $arg0,  $arg1,  $arg2 = null) : \io\vertx\jphp\ext\healthchecks\HealthChecks

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. Use @see \io\vertx\jphp\ext\healthchecks\HealthChecks::register to configure the timeout. 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 in milliseconds param $procedure [callable] the procedure, must not be {@code null} register($name, $timeout, $procedure)

Arguments

$arg0

string

$arg1

callable | integer

$arg2

callable

Response

\io\vertx\jphp\ext\healthchecks\HealthChecks

the current {@link HealthChecks}

Unregisters a procedure.

unregister( $arg0) : $this

Arguments

$arg0

string

Response

$this

the current {@link HealthChecks}