UNPKG

@bazilio-san/af-stream

Version:
37 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class AbstractSender { constructor(options) { const { senderConfig } = options; const { type, host, port } = senderConfig; this.options = options; this.senderConfig = senderConfig; if (['tcp', 'ws'].includes(type)) { if (host == null) { throw new Error(`No host specified in senders.${type} configuration`); } if (port == null) { throw new Error(`No port specified in senders.${type} configuration`); } } } async connect() { return true; } async reconnect(force) { return true; } isConnected() { return true; } shutdown() { } canSendNext() { return true; } async sendEvents(recordsComposite) { return true; } } exports.default = AbstractSender; //# sourceMappingURL=AbstractSender.js.map