@bazilio-san/af-stream
Version:
Data stream from database table
35 lines • 942 B
JavaScript
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;
}
}
export default AbstractSender;
//# sourceMappingURL=AbstractSender.js.map