@cocalc/hub
Version:
CoCalc: Backend webserver component
20 lines (19 loc) • 558 B
TypeScript
import type { PostgreSQL } from "@cocalc/database/postgres/types";
import express from "express";
interface HealthcheckData {
code: 200 | 404;
txt: string;
}
export declare function set_agent_endpoint(port: number, host: string): void;
export interface Check {
status: string;
abort?: boolean;
}
interface Opts {
db: PostgreSQL;
router: express.Router;
extra?: (() => Promise<Check>)[];
}
export declare function process_alive(): HealthcheckData;
export declare function setup_health_checks(opts: Opts): Promise<void>;
export {};