🚨 Announcing Vendure v2 Beta

HttpHealthCheckStrategy

HttpHealthCheckStrategy

A HealthCheckStrategy used to check health by pinging a url. Internally it uses the NestJS HttpHealthIndicator.

Example

import { HttpHealthCheckStrategy, TypeORMHealthCheckStrategy } from '@vendure/core';

export const config = {
  // ...
  systemOptions: {
    healthChecks: [
      new TypeORMHealthCheckStrategy(),
      new HttpHealthCheckStrategy({ key: 'my-service', url: 'https://my-service.com' }),
    ]
  },
};

Signature

class HttpHealthCheckStrategy implements HealthCheckStrategy {
  constructor(options: HttpHealthCheckOptions)
  async init(injector: Injector) => ;
  getHealthIndicator() => HealthIndicatorFunction;
}

Implements

Members

constructor

method
type:
(options: HttpHealthCheckOptions) => HttpHealthCheckStrategy

init

async method
type:
(injector: Injector) =>

getHealthIndicator

method
type:
() => HealthIndicatorFunction