034f47799a101f822b082ba42392a3a0e7a88438bb3cad9ca1939cc632ca99988aaa8efd875b054f3f944d17e28cfee1398c18358282c49e07a74dac49b773 842 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import {
  2. IStoreOptions
  3. } from './store-options'
  4. /**
  5. * In-memory implementation of the message store
  6. * This can actually be saved into files.
  7. *
  8. */
  9. declare class Store {
  10. /**
  11. * Store constructor
  12. *
  13. * @param {Object} [options] - store options
  14. */
  15. constructor (options: IStoreOptions)
  16. /**
  17. * Adds a packet to the store, a packet is
  18. * anything that has a messageId property.
  19. *
  20. */
  21. public put (packet: any, cb?: Function): this
  22. /**
  23. * Creates a stream with all the packets in the store
  24. *
  25. */
  26. public createStream (): any
  27. /**
  28. * deletes a packet from the store.
  29. */
  30. public del (packet: any, cb: Function): this
  31. /**
  32. * get a packet from the store.
  33. */
  34. public get (packet: any, cb: Function): this
  35. /**
  36. * Close the store
  37. */
  38. public close (cb: Function): void
  39. }
  40. export { Store }