UNPKG

@actuatorjs/actuatorjs

Version:

Core interfaces and classes for actuatorjs ecosystem

19 lines (18 loc) 629 B
import { HealthCheck } from "../../src/health/HealthCheck"; import { SimpleHealthIndicator } from "../../src/health/SimpleHealthIndicator"; export const upIndicators = [ new SimpleHealthIndicator("database", async () => { return { status: "UP" }; }), new SimpleHealthIndicator("auth", async () => { return { status: "UP" }; }), ]; export const upHealthCheck = new HealthCheck(upIndicators); export const downIndicator = new SimpleHealthIndicator("redis", async () => { return { status: "DOWN" }; }); export const downHealthCheck = new HealthCheck([ ...upIndicators, downIndicator, ]);