Class: HealthChecks

vertx-health-checks-js/health_checks~ HealthChecks

new HealthChecks()

Source:

Methods

invoke(name, resultHandler) → {HealthChecks}

Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.
Parameters:
Name Type Description
name string
resultHandler function the result handler, must not be null. The handler received an marked as failed if the procedure with the given name cannot be found or invoked.
Source:
Returns:
the current HealthChecks
Type
HealthChecks

register(name, timeout, procedure) → {HealthChecks}

Registers a health check procedure.

The procedure is a taking a of 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) Status, the procedure outcome is the received status.

Parameters:
Name Type Description
name string the name of the procedure, must not be null or empty
timeout number the procedure timeout in milliseconds
procedure function the procedure, must not be null
Source:
Returns:
the current HealthChecks
Type
HealthChecks

unregister(name) → {HealthChecks}

Unregisters a procedure.
Parameters:
Name Type Description
name string the name of the procedure
Source:
Returns:
the current HealthChecks
Type
HealthChecks