import type { IncomingMessage, ServerResponse } from "http"; export interface MetricsHttpServer { /** Actual port (useful when the caller passed 0 to grab a random port). */ port: number; close(): Promise; } /** * Start a tiny Express server that serves `/metrics` and a `200 ok` on `/` * and `/health`. Any other path returns 404 via Express's default handler. * * When `host` is omitted, Node binds the unspecified IPv6 address (`::`) on * dual-stack systems, which also accepts IPv4 connections. This makes * `localhost` resolve to a working address regardless of whether `getaddrinfo` * returns the IPv4 or IPv6 entry first (Alpine images often prefer `::1`). */ export declare function startMetricsServer(port: number, handler: (req: IncomingMessage, res: ServerResponse) => void, host?: string): Promise; //# sourceMappingURL=metrics-server.d.ts.map