import type { Pool } from "pg"; export declare const REFILL_INTERVAL_MS = 10000; export interface HostBudget { capacity: number; refillPerInterval: number; } export declare const DEFAULT_HOST_BUDGET: Readonly; export interface HostBudgetOptions { pool: Pick; hostClasses?: Readonly>; /** Test clock only. Production uses the DB clock sampled after acquiring the row lock. */ now?: () => Date; } export declare function retryAfterDeadline(headers: Headers, now: number): number | undefined; export declare class HostBudgets { private readonly options; constructor(options: HostBudgetOptions); private configuration; private locked; consume(host: string, hostClass: string): Promise; /** Header hints can only tighten a shared budget; parking is monotone under concurrent responses. */ observe(host: string, hostClass: string, status: number, headers: Headers): Promise; }