/** * Three-state readiness contract for `GET /health`. * * S5 (lifecycle layer) wires the lifecycle to flip these states: * - `"starting"` — initial state; server is binding or warming up. * - `"ok"` — server is bound and ready to handle traffic. * - `"draining"` — graceful-shutdown in progress; stop routing new requests. * * `GET /health` returns `200` for `"ok"` and `503` for the other two states * so load balancers stop routing before the process exits. */ /** Three valid readiness states. */ export type ReadinessState = "starting" | "ok" | "draining"; /** * Read-only interface consumed by `GET /health` and any other component that * needs to observe readiness without being able to mutate it. */ export interface Readiness { /** Return the current readiness state synchronously. */ state(): ReadinessState; } /** * Create a mutable readiness object. * * The returned object satisfies both the read-only {@link Readiness} interface * and exposes `setOk()` / `setDraining()` mutators for the lifecycle layer * (S5) to call at the appropriate moments. * * Initial state is `"starting"`. * * @returns A combined readiness + mutator object. */ export declare function createReadiness(): Readiness & { setOk(): void; setDraining(): void; }; //# sourceMappingURL=readiness.d.ts.map