import { HealthCheckResult } from '../health/checkFns'; import { Ready } from './Daemons'; import { Daemon } from './Daemon'; import { Effects, SDKManifest } from '../../../base/lib/types'; export declare const EXIT_SUCCESS: "EXIT_SUCCESS"; /** * Wanted a structure that deals with controlling daemons by their health status * States: * -- Waiting for dependencies to be success * -- Running: Daemon is running and the status is in the health * */ export declare class HealthDaemon { readonly daemon: Daemon | null; readonly dependencies: HealthDaemon[]; readonly id: string; readonly ready: Ready | typeof EXIT_SUCCESS; readonly effects: Effects; private _health; private healthWatchers; private running; private started?; private resolveReady; private resolvedReady; private readyPromise; private session; constructor(daemon: Daemon | null, dependencies: HealthDaemon[], id: string, ready: Ready | typeof EXIT_SUCCESS, effects: Effects); /** Run after we want to do cleanup */ term(termOptions?: { signal?: NodeJS.Signals | undefined; timeout?: number | undefined; destroySubcontainer?: boolean; }): Promise; /** Want to add another notifier that the health might have changed */ addWatcher(watcher: () => unknown): void; get health(): Readonly; private changeRunning; private stopSession; private resetReady; private startSession; private runHealthCheckLoop; onReady(): Promise; get isReady(): boolean; private setHealth; updateStatus(): Promise; }