/** * fetch-gate - A modern HTTP gateway library optimized for Bun runtime * * Features: * - Circuit breaker pattern for fault tolerance * - Request/response hooks for custom logic * - URL caching for performance * - Header rewriting capabilities * - Timeout handling * - TypeScript support */ import { FetchProxy } from "./proxy"; import type { ProxyOptions, ProxyRequestOptions, CircuitBreakerOptions, BeforeRequestHook, AfterResponseHook, BeforeCircuitBreakerHook, AfterCircuitBreakerHook, ErrorHook, CircuitState, CircuitBreakerResult } from "./types"; export type { ProxyOptions, ProxyRequestOptions, CircuitBreakerOptions, BeforeRequestHook, AfterResponseHook, BeforeCircuitBreakerHook, AfterCircuitBreakerHook, ErrorHook, CircuitState, CircuitBreakerResult, }; export { FetchProxy }; /** * Factory function to create a new fetch gate instance */ export default function createFetchGate(options?: ProxyOptions): { proxy: (req: Request, source?: string, opts?: ProxyRequestOptions) => Promise; close: () => void; getCircuitBreakerState: () => CircuitState; getCircuitBreakerFailures: () => number; clearURLCache: () => void; }; export { createFetchGate as fastProxy }; //# sourceMappingURL=index.d.ts.map