/** * Shared coordination adapters for BlazeResolver multi-instance and serverless deployments. * Provides distributed rate limiting and atomic issue deduplication locks backed by * Redis or Upstash REST. */ export interface RedisLikeClient { get?(key: string): Promise; set?(key: string, value: string, ...args: any[]): Promise; del?(...keys: string[]): Promise; incr?(key: string): Promise; pexpire?(key: string, ms: number): Promise; eval?(script: string, numkeys: number, ...args: (string | number)[]): Promise; } export interface SharedCoordinationOptions { prefix?: string; lockTimeoutMs?: number; lockRetryIntervalMs?: number; lockMaxWaitMs?: number; } export interface SharedCoordination { rateLimitCheck: (id: string, max: number, windowMs: number) => Promise; withIssueLock: (key: string, run: () => Promise) => Promise; } /** * Creates coordination callbacks backed by any Redis-compatible client (ioredis, redis, etc.). */ export declare function createRedisCoordination(client: RedisLikeClient, opts?: SharedCoordinationOptions): SharedCoordination; /** * Creates coordination callbacks backed by Upstash Redis REST API (zero npm dependencies, works in Edge/Serverless). */ export declare function createUpstashRestCoordination(options: { url: string; token: string; prefix?: string; fetch?: typeof fetch; }): SharedCoordination; //# sourceMappingURL=coordination.d.ts.map