UNPKG

@mcma/worker-invoker

Version:

Core classes and types for invoking MCMA Worker functions

16 lines (15 loc) 538 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WorkerInvoker = void 0; const core_1 = require("@mcma/core"); class WorkerInvoker { constructor() { } async invoke(workerFunctionId, workerRequest) { if (!workerFunctionId || typeof workerFunctionId !== "string") { throw new core_1.McmaException("Invalid worker function id: " + workerFunctionId); } await this.invokeWorker(workerFunctionId, workerRequest); } } exports.WorkerInvoker = WorkerInvoker;