Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HealthChecks

Hierarchy

  • HealthChecks

Index

Methods

checkStatus

  • checkStatus(): PromiseLike<CheckResult>
  • checkStatus(resultHandler: ((res: AsyncResult<CheckResult>) => void) | Handler<AsyncResult<CheckResult>>): void
  • checkStatus(name: string): PromiseLike<CheckResult>
  • checkStatus(name: string, resultHandler: ((res: AsyncResult<CheckResult>) => void) | Handler<AsyncResult<CheckResult>>): void
  • Invokes the registered procedures.

    Returns PromiseLike<CheckResult>

  • Invokes the registered procedures.

    Parameters

    Returns void

  • Invokes the registered procedure with the given name and sub-procedures.

    Parameters

    • name: string

    Returns PromiseLike<CheckResult>

  • Invokes the registered procedure with the given name and sub-procedures.

    Parameters

    Returns void

invoke

  • invoke(resultHandler: ((res: {}) => void) | Handler<{}>): HealthChecks
  • invoke(name: string): PromiseLike<{}>
  • invoke(name: string, resultHandler: ((res: AsyncResult<{}>) => void) | Handler<AsyncResult<{}>>): HealthChecks
  • Invokes the registered procedures and computes the outcome.

    Parameters

    • resultHandler: ((res: {}) => void) | Handler<{}>

    Returns HealthChecks

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

    Parameters

    • name: string

    Returns PromiseLike<{}>

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

    Parameters

    • name: string
    • resultHandler: ((res: AsyncResult<{}>) => void) | Handler<AsyncResult<{}>>

    Returns HealthChecks

register

  • 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.

    This method uses a 1s timeout. Use {@link HealthChecks#register} to configure the timeout.

    Parameters

    • name: string
    • procedure: ((res: Promise<Status>) => void) | Handler<Promise<Status>>

    Returns 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: string
    • timeout: number
    • procedure: ((res: Promise<Status>) => void) | Handler<Promise<Status>>

    Returns HealthChecks

unregister

  • Unregisters a procedure.

    Parameters

    • name: string

    Returns HealthChecks

Static create

  • Creates a new instance of the default implementation of HealthChecks.

    Parameters

    • vertx: Vertx

    Returns HealthChecks

Generated using TypeDoc