import { P as NormalizedMeshConfig, q as MeshInstanceRecord, D as MeshServiceStrategy } from './types-C9VYURdP.cjs'; import { A as ActiveConnectionSnapshot } from './ActiveConnectionTracker-C8le1hej.cjs'; import { IncomingHttpHeaders } from 'node:http'; interface MeshRouterServerOptions { readonly config: NormalizedMeshConfig; readonly log?: (line: string) => void; } interface MeshRouterDrainResult { readonly idle: boolean; readonly snapshot: ActiveConnectionSnapshot; } declare class MeshRouterServer { private readonly options; private readonly servers; private readonly registry; private readonly matcher; private readonly headers; private readonly balancer; private readonly tracker; private readonly metrics; private readonly instanceService; private closed; private draining; constructor(options: MeshRouterServerOptions); listen(): Promise; connectionSnapshot(): ActiveConnectionSnapshot; close(): Promise; drainAndClose(options?: { readonly drainTimeoutMs?: number; readonly socketDrainTimeoutMs?: number; }): Promise; private handle; private handleUpgrade; private selectTarget; private handleManagement; private activeByService; private routePlan; private proxyHttp; private createServers; private httpsOptions; private listenServer; private protocolFor; private protocolForSocket; private respond; private log; } interface MeshRouteMatch { readonly service: string; readonly route: string; readonly pathname: string; } interface MeshTargetNode { readonly instance: MeshInstanceRecord; readonly url: URL; readonly strategy: MeshServiceStrategy; } interface MeshRouterRequestContext { readonly config: NormalizedMeshConfig; readonly requestId: string; readonly pathname: string; readonly method: string; readonly headers: Record; } interface MeshProxyResult { readonly ok: boolean; readonly statusCode: number; readonly service?: string; readonly targetId?: string; readonly targetUrl?: string; readonly error?: string; } interface RouteCandidate { readonly service: string; readonly route: string; } declare class RouteMatcher { match(pathname: string, instances: readonly MeshInstanceRecord[]): MeshRouteMatch | null; collectRoutes(instances: readonly MeshInstanceRecord[]): readonly RouteCandidate[]; private matches; private matchesPatternPrefix; private normalizeRoute; private segments; private score; } interface StickyCookiePayload { readonly service: string; readonly nodeId: string; readonly exp: number; } declare class CookieSigner { private readonly secret; constructor(secret: string); sign(payload: StickyCookiePayload): string; verify(value: string | undefined, expectedService?: string): StickyCookiePayload | null; private hmac; private safeEqual; } interface StickySessionOptions { readonly cookieName: string; readonly secret: string; readonly ttlSeconds?: number; readonly secure?: boolean; } declare class StickySession { private readonly options; private readonly signer; private readonly ttlSeconds; constructor(options: StickySessionOptions); read(headers: IncomingHttpHeaders, service: string): StickyCookiePayload | null; createHeader(service: string, nodeId: string): string; private parseCookies; } export { CookieSigner as C, type MeshProxyResult as M, RouteMatcher as R, type StickyCookiePayload as S, type MeshRouteMatch as a, type MeshRouterRequestContext as b, MeshRouterServer as c, type MeshTargetNode as d, StickySession as e };