/** * PubSubWaiter - Integrates pub/sub notifications into retry loops. * * When pub/sub is enabled, waits for a release notification instead of * a fixed timer delay. Falls back to timer delay if pub/sub is not available. */ import { PubSubManager } from "./pubsub-manager"; export type WaitResult = "notified" | "timeout" | "fallback"; export declare class PubSubWaiter { private readonly pubSubManager; private readonly keyPrefix; constructor(pubSubManager: PubSubManager | null, keyPrefix: string); /** * Wait for a resource to become available. * Uses pub/sub if available, otherwise falls back to timer delay. */ waitForRelease(resourceType: "lock" | "sem" | "latch", resource: string, maxWaitMs: number, fallbackDelayMs: number): Promise; /** Build a notification channel name */ getChannel(resourceType: "lock" | "sem" | "latch", resource: string): string; } //# sourceMappingURL=pubsub-waiter.d.ts.map