test1a.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { StreamingService } from "./test-streamOBS";
  2. import { IncomingMessageService } from "../services/incomingMessage.service";
  3. import { Observable } from "rxjs";
  4. import { LogSetting } from "../dependencies/log/type/datatype";
  5. import { BaseMessage } from "../dependencies/log/dependencies/msgutil/interface/export";
  6. const incoming = new IncomingMessageService()
  7. const streamService = new StreamingService()
  8. /* -------------- TEST -------------------- */
  9. // change payload into Observable<BaseMessage>
  10. const payload: Observable<BaseMessage> = streamService.stream();
  11. // Configure Log Setting
  12. let storage: LogSetting = {
  13. storage: "File",
  14. setting: {
  15. appName: 'Default from client',
  16. appLocName: 'To be generated in client',
  17. logLocName: 'To be generated in client',
  18. }
  19. }
  20. let dataSet: LogSetting & { incomingObservable: Observable<BaseMessage> } = {
  21. storage: storage.storage,
  22. setting: storage.setting,
  23. customSetting: storage.customSetting,
  24. incomingObservable: payload
  25. }
  26. incoming.init(dataSet)
  27. // acknowledge.init(storage).then(() => {
  28. // acknowledge.subscribe(dataSet.incomingObservable)
  29. // })