Add JSDoc to server/*

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
Matthew Nickson
2022-04-20 19:56:40 +01:00
parent 45f44b183d
commit 03b2d8d521
14 changed files with 380 additions and 60 deletions

View File

@@ -34,6 +34,9 @@ const monitor_status = new PrometheusClient.Gauge({
class Prometheus {
monitorLabelValues = {}
/**
* @param {Object} monitor Monitor object to monitor
*/
constructor(monitor) {
this.monitorLabelValues = {
monitor_name: monitor.name,
@@ -44,6 +47,11 @@ class Prometheus {
};
}
/**
* Update the metrics page
* @param {Object} heartbeat Heartbeat details
* @param {Object} tlsInfo TLS details
*/
update(heartbeat, tlsInfo) {
if (typeof tlsInfo !== "undefined") {