UNPKG

@5minds/processcube_engine

Version:

The ProcessCube Engine. Stores and executes BPMNs.

38 lines (37 loc) 1.42 kB
import { ChildProcess } from 'child_process'; export declare class WorkerFacade { private logger; private pendingMessages; private subscriptions; private child; private exited; private filePath; private shutdownCallback; private resolveStartup; private startupPromise; private functionReportChannel; constructor(filePath: string, loggerNamespace?: string); getChildProcess(): ChildProcess; init(args: any): Promise<void>; dispose(): Promise<void>; subscribeToWorkerShutdown(callback: (exitCode: number, signal: string) => void): void; callFunction(topic: string, ...args: Array<any>): Promise<any>; publishEventNotification(topic: string, payload: any): Promise<any>; subscribe(topic: string, callback: (...args: any) => any, subscribeOnce?: boolean, ...args: any): Promise<string>; unsubscribe(id: string): void; private gracefullyShutdownWorker; private sendFunctionCancellation; private sendMessage; private serializeAndSend; private initChild; private receiveMessage; private handleFunctionResponseMessage; private handleSubscriptionResponseMessage; private handleSubscriptionEventMessage; private handleStartupFinishedMessage; private handleSystemMessage; private handleMetricsMessage; private handleWorkerExit; private handleWorkerError; private handleWorkerMessageError; }