apollo/services/trackers/AggregateTracker.js

17 lines
291 B
JavaScript
Raw Normal View History

2024-12-04 23:18:35 -05:00
class AggregateTracker {
2024-12-05 03:26:31 -05:00
#trackers = []
2024-12-04 23:18:35 -05:00
constructor(trackers) {
2024-12-05 03:26:31 -05:00
this.#trackers = trackers;
2024-12-04 23:18:35 -05:00
}
2024-12-05 03:26:31 -05:00
async poll() {
let media = []
for (let tracker of this.#trackers)
media = media.concat(await tracker.poll());
2024-12-04 23:18:35 -05:00
return media;
}
2024-12-05 03:26:31 -05:00
}
module.exports = AggregateTracker;