UNPKG

cs2inspects

Version:

openskindb inspect sdk with bulk processing capabilities

34 lines 994 B
import { EventEmitter } from "events"; import { WorkerStats } from "./types"; export interface WorkerMessage { type: "inspect" | "bulk" | "shutdown"; data: any; id: string; } export interface WorkerResponse { type: "result" | "error" | "ready"; data?: any; error?: string; id?: string; } export declare class WorkerManager extends EventEmitter { private workers; private workerStats; private workerEnabled; private maxWorkers; private currentWorkerIndex; constructor(workerEnabled?: boolean, maxWorkers?: number); init(): Promise<void>; private createWorker; private handleWorkerMessage; processInWorker(inspectUrl: string): Promise<any>; private getNextWorker; getWorkerStats(): WorkerStats[]; getActiveWorkerCount(): number; shutdown(): Promise<void>; isEnabled(): boolean; enable(): void; disable(): void; } export declare const workerManager: WorkerManager; //# sourceMappingURL=worker.d.ts.map