callcatcher
Version:
Your native NodeJS monitoring API
28 lines (27 loc) • 895 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.report = void 0;
var report_service_1 = require("../services/report-service");
/**
* After probing a server, the method send a report containing a Hit array
* The Report interface is the CallCatcher way of interfacing with
* the data. See The Report interface for more information.
* @example
* // express example
* // probe the server
* monitor.probe(server);
*
* // send the report on a custom route
* app.get('/stats', (req,res) => {
* res.status(210).json(monitor.report(server).getAllData())
* })
* @see probe
* @see Report
* @param {Server} server
* @return {Report}
*/
function report(server) {
var port = server._connectionKey.split(':').pop();
return report_service_1.ReportService.getInstance().getReport(port);
}
exports.report = report;