import { type IncomingMessage, type Server, type ServerResponse } from '../../node-singletons/http';
import type { AdapterConfig, RuntimeAdapter } from '../RuntimeAdapter';
export interface FargateEnvironment {
    [key: string]: unknown;
    nodeEnv: NodeJS.ProcessEnv['NODE_ENV'];
    runtime: string;
    dbConnection: string;
    dbHost: string | undefined;
    dbPort: number | undefined;
}
export interface FargateAdapterState {
    server?: Server;
}
export type NodeServerFactory = (requestListener: (req: IncomingMessage, res: ServerResponse) => void) => Server;
export declare function createFargateAdapter(config: AdapterConfig): RuntimeAdapter & {
    startServer(port?: number, host?: string): Promise<void>;
    stop(): Promise<void>;
};
/**
 * Fargate/Container adapter for running ZinTrust in AWS Fargate, Cloud Run, or Docker
 * Wraps existing Node.js HTTP server for container orchestration
 * Sealed namespace for immutability
 */
export declare const FargateAdapter: Readonly<{
    create: typeof createFargateAdapter;
}>;
export declare function startFargateServer(state: FargateAdapterState, config: AdapterConfig, logger: AdapterConfig['logger'], port: number, host: string, serverFactory?: NodeServerFactory): Promise<void>;
export declare function stopFargateServer(state: FargateAdapterState, logger: AdapterConfig['logger']): Promise<void>;
/**
 * Read the full request body (Buffer) for IncomingMessage.
 * Exported for unit testing.
 */
export declare function readIncomingMessageBody(req: IncomingMessage): Promise<Buffer | null>;
export declare function handleFargateRequest(config: AdapterConfig, logger: AdapterConfig['logger'], req: IncomingMessage, res: ServerResponse): Promise<void>;
/**
 * Exported helper for tests (and safer than casting unknown to Error).
 */
export declare function normalizeError(error: unknown): Error;
export declare function createDefaultFargateLogger(): AdapterConfig['logger'];
//# sourceMappingURL=FargateAdapter.d.ts.map