(eventPath: string, subscriber: any)
| 101 | |
| 102 | // High level api. Maintain a list of subscribers for one event path |
| 103 | subscribe(eventPath: string, subscriber: any) { |
| 104 | const subscribersForPath = this.getSubscribersList(eventPath); |
| 105 | subscribersForPath.push(subscriber); |
| 106 | if (subscribersForPath.length === 1) { |
| 107 | return this.send({ |
| 108 | cmd: "startConsuming", |
| 109 | path: eventPath |
| 110 | }); |
| 111 | } |
| 112 | return Promise.resolve(); |
| 113 | } |
| 114 | |
| 115 | unsubscribe(eventPath: string, collection: any) { |
| 116 | const subscribersForPath = this.getSubscribersList(eventPath); |
nothing calls this directly
no test coverage detected