import { HttpHandler } from '@solid/community-server'; import type { HttpHandlerInput } from '@solid/community-server'; import { PodLookupRepository } from '../identity/drizzle/PodLookupRepository'; import { EdgeNodeRepository } from '../identity/drizzle/EdgeNodeRepository'; interface PodRoutingHttpHandlerOptions { identityDbUrl: string; nodeId: string; enabled?: boolean | string; podLookupRepository?: PodLookupRepository; edgeNodeRepository?: EdgeNodeRepository; } /** * Pod Routing HTTP Handler - Routes requests to the correct node based on Pod location. * * For multi-node Center deployment: * 1. Extract Pod ID from request URL * 2. Look up Pod's nodeId from database * 3. If Pod is on current node, pass through to next handler * 4. If Pod is on another node, proxy the request */ export declare class PodRoutingHttpHandler extends HttpHandler { protected readonly logger: import("global-logger-factory").Logger; private readonly podLookupRepository; private readonly edgeNodeRepository; private readonly currentNodeId; private readonly enabled; constructor(options: PodRoutingHttpHandlerOptions); canHandle({ request }: HttpHandlerInput): Promise; handle({ request, response }: HttpHandlerInput): Promise; /** * Proxy request to target node. */ private proxyRequest; /** * Resolve upstream endpoint from node info. * For center nodes, prefer internal endpoint for intra-cluster communication. */ private resolveUpstream; /** * Resolve upstream for center node using internal endpoint. */ resolveUpstreamWithInternal(nodeId: string): Promise; /** * Build headers for proxy request. */ private buildProxyHeaders; /** * Read request body for proxy forwarding. */ private readRequestBody; /** * Check if path is a system/internal path that should skip routing. */ private isSystemPath; /** * Parse request URL. */ private parseUrl; /** * Normalize boolean values from string/boolean. */ private normalizeBoolean; } export {};