n8n
Version:
n8n Workflow Automation Tool
15 lines (14 loc) • 766 B
TypeScript
import type WebSocket from 'ws';
import { Logger } from '../logging/logger.service';
import type { N8nMessage, TaskRunnerServerInitRequest, TaskRunnerServerInitResponse } from './runner-types';
import { TaskBroker, type TaskRunner } from './task-broker.service';
export declare class TaskRunnerService {
private readonly logger;
private readonly taskBroker;
runnerConnections: Map<TaskRunner['id'], WebSocket>;
constructor(logger: Logger, taskBroker: TaskBroker);
sendMessage(id: TaskRunner['id'], message: N8nMessage.ToRunner.All): void;
add(id: TaskRunner['id'], connection: WebSocket): void;
removeConnection(id: TaskRunner['id']): void;
handleRequest(req: TaskRunnerServerInitRequest, _res: TaskRunnerServerInitResponse): void;
}