UNPKG

amberflo-metering-typescript

Version:
19 lines 968 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IngestClientFactory = void 0; const autoIngestClient_1 = require("./autoIngestClient"); const manualIngestClient_1 = require("./manualIngestClient"); const flushMode_1 = require("../model/flushMode"); class IngestClientFactory { static getNewInstance(apiKey, debug, options) { const signature = '[amberflo-metering IngestClientFactory]:'; if (options && options.flushMode === flushMode_1.FlushMode.manual) { console.log(new Date(), signature, 'create instance of SyncIngestClient'); return new manualIngestClient_1.ManualIngestClient(apiKey, options, debug); } console.log(new Date(), signature, 'create instance of AsyncIngestClient'); return new autoIngestClient_1.AutoIngestClient(apiKey, options, debug); } } exports.IngestClientFactory = IngestClientFactory; //# sourceMappingURL=ingestClientFactory.js.map