import type { Logger } from '@n8n/backend-common'; import type { ExecutionChannelFrameHandler, ExecutionChannelSubscriber, ExecutionChannelTopic, UnsubscribeFromExecutionChannel } from '@n8n/engine'; import type { RedisExecutionChannelNameGenerator } from './redis-execution-channel'; type RedisMessageHandler = (channel: string, message: string) => void; type RedisConnectionHandler = () => void; export interface RedisChannelSubscriber { subscribe(...channels: string[]): Promise; unsubscribe(channel: string): Promise; on(event: 'close' | 'ready', handler: RedisConnectionHandler): unknown; on(event: 'message', handler: RedisMessageHandler): unknown; off(event: 'close' | 'ready', handler: RedisConnectionHandler): unknown; off(event: 'message', handler: RedisMessageHandler): unknown; disconnect(): void; } export declare class RedisExecutionChannelSubscriber implements ExecutionChannelSubscriber { private readonly subscriber; private readonly getChannelName; private readonly logger; private readonly subscriptionsByChannel; private started; private stopped; private lostConnection; constructor(subscriber: RedisChannelSubscriber, getChannelName: RedisExecutionChannelNameGenerator, logger: Logger); start(): Promise; subscribe(topic: ExecutionChannelTopic, executionId: string, handler: ExecutionChannelFrameHandler): Promise; private unsubscribeHandler; stop(): Promise; private readonly handleClose; private readonly handleReady; private resubscribe; private readonly handleMessage; } export {};