/** * Work kind tracked during event bridge drain and diagnostics. * * @group Event bridge */ export type InFlightExecutionKind = 'command' | 'subscription' | 'stream' | 'generic'; /** * In-flight execution counts grouped by work kind. * * @group Event bridge */ export type EventBridgeInFlightExecutionCounts = Record; /** * Tracks active event bridge handler promises for drain and health reporting. * * The tracker does not cancel work. It observes when work settles so shutdown * code can wait for in-flight commands, subscriptions, streams, and generic * tasks to finish within a grace period. * * @group Event bridge */ export declare class InFlightExecutionTracker { private readonly running; private readonly kinds; /** Number of currently running executions. */ get size(): number; /** Run and track one asynchronous execution. */ run(fn: () => Promise, kind?: InFlightExecutionKind): Promise; /** Return active execution counts grouped by kind. */ getCounts(): EventBridgeInFlightExecutionCounts; /** * Wait until all tracked work settles or the timeout elapses. * * @returns `true` when idle, `false` when the timeout elapsed. */ waitForIdle(timeoutMs: number): Promise; } //# sourceMappingURL=InFlightExecutionTracker.impl.d.ts.map