@shahadul-17/dispatcher
Version:
Defines a mechanism for parallel processing and CPU intensive tasks in Node.js
27 lines • 1.18 kB
TypeScript
import { DispatchableTaskInformation } from "./dispatchable-task-information.t";
import { DispatcherOptions } from "./dispatcher-options.t";
import { IDispatcher } from "./dispatcher.i";
import { ServiceType } from "@shahadul-17/service-provider";
export declare class Dispatcher implements IDispatcher {
private isStarting;
private _isStarted;
private readonly logger;
private readonly _options;
private readonly uidGenerator;
private readonly processes;
private constructor();
get isStarted(): boolean;
get processCount(): number;
get options(): DispatcherOptions;
private log;
private getLeastBusyProcess;
dispatchAsync<ServiceClassType, ReturnType>(taskInformation: DispatchableTaskInformation<ServiceClassType, ReturnType>): Promise<ReturnType>;
get<Type>(serviceType: ServiceType<Type>, scopeName?: string): Type;
private onChildProcessLogReceivedAsync;
private onChildProcessResponseReceivedAsync;
private onEventOccurredAsync;
startAsync(): Promise<void>;
stopAsync(): Promise<void>;
static createInstance(options: DispatcherOptions): IDispatcher;
}
//# sourceMappingURL=dispatcher.d.ts.map