import { PulsarService } from '../network/pulsar.service' ; import { ILogDatabase } from './ILogDatabase.model' ; export class Pulsar implements ILogDatabase { private key : string ; private pulsarService : PulsarService ; constructor ( docKey ) { this . key = docKey ; } subscribeToWs ( pulsarService ) { this . pulsarService = pulsarService ; this . pulsarService . socketsLogs = this . key ; } send ( data ) { const obj = JSON . stringify ( data ) ; console . log ( 'PULSAR LOGS DATA' , obj ) ; this . pulsarService . sendLogsToPulsar ( this . key , obj ) ; } }