1 | import {
|
2 | IStoreOptions
|
3 | } from './store-options'
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | declare class Store {
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | constructor (options: IStoreOptions)
|
17 |
|
18 | /**
|
19 | * Adds a packet to the store, a packet is
|
20 | * anything that has a messageId property.
|
21 | *
|
22 | */
|
23 | public put (packet: any, cb?: Function): this
|
24 |
|
25 | /**
|
26 | * Creates a stream with all the packets in the store
|
27 | *
|
28 | */
|
29 | public createStream (): any
|
30 |
|
31 | /**
|
32 | * deletes a packet from the store.
|
33 | */
|
34 | public del (packet: any, cb: Function): this
|
35 |
|
36 | /**
|
37 | * get a packet from the store.
|
38 | */
|
39 | public get (packet: any, cb: Function): this
|
40 |
|
41 | /**
|
42 | * Close the store
|
43 | */
|
44 | public close (cb: Function): void
|
45 | }
|
46 | export { Store }
|