apollo/services/trackers/AggregateTracker.js

17 lines
291 B
JavaScript

class AggregateTracker {
#trackers = []
constructor(trackers) {
this.#trackers = trackers;
}
async poll() {
let media = []
for (let tracker of this.#trackers)
media = media.concat(await tracker.poll());
return media;
}
}
module.exports = AggregateTracker;