import * as plugins from './coreflow.plugins.js'; import { Coreflow } from './coreflow.classes.coreflow.js'; import { logger } from './coreflow.logging.js'; export class CoretrafficConnector { public coreflowRef: Coreflow; public readyDeferred = plugins.smartpromise.defer(); constructor(coreflowRefArg: Coreflow) { this.coreflowRef = coreflowRefArg; } public async start() { // any work necessary to get connected this.readyDeferred.resolve(); } public async setReverseConfigs( reverseConfigsArg: plugins.servezoneInterfaces.data.IReverseProxyConfig[] ) { await this.start(); const reactionRequest = this.coreflowRef.internalServer.typedsocketServer.createTypedRequest( 'updateRouting', await this.coreflowRef.internalServer.typedsocketServer.findTargetConnection( async (targetConnection) => targetConnection.alias === 'coretraffic' ) ); const response = await reactionRequest.fire({ reverseConfigs: reverseConfigsArg, }); } }