UNPKG

@webfaas/webfaas-core

Version:

WebFaaS Framework - Core

31 lines 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MessageManagerTenant = void 0; const MessageConnectionHTTPFactory_1 = require("./connection/http/MessageConnectionHTTPFactory"); class MessageManagerTenant { constructor(tenantID, config, log) { this.invokeContext = {}; this.tenantID = tenantID; this.config = config; this.log = log; this.listConnectionFactory = new Map(); this.listConnectionFactory.set("http", new MessageConnectionHTTPFactory_1.MessageConnectionHTTPFactory()); this.invokeContext.tenantID = tenantID; this.invokeContext.getConnection = (name) => { let factoryConnection = this.listConnectionFactory.get(name); if (factoryConnection) { return factoryConnection.factory(this.invokeContext, this.log, this.config); } else { return null; } }; } stop() { this.listConnectionFactory.forEach((factory) => { factory.stop(); }); } } exports.MessageManagerTenant = MessageManagerTenant; //# sourceMappingURL=MessageManagerTenant.js.map