UNPKG

@mdf.js/service-registry

Version:

MMS - API - Service Registry

44 lines 1.36 kB
"use strict"; /* istanbul ignore file */ /** * Copyright 2024 Mytra Control S.L. All rights reserved. * * Use of this source code is governed by an MIT-style license that can be found in the LICENSE file * or at https://opensource.org/licenses/MIT. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.OurProvider = void 0; const tslib_1 = require("tslib"); const events_1 = tslib_1.__importDefault(require("events")); const uuid_1 = require("uuid"); class OurProvider extends events_1.default { constructor(name, status) { super(); this.name = name; this.componentId = (0, uuid_1.v4)(); this._status = status; this.actualStateDate = new Date().toISOString(); } get status() { return this._status; } get checks() { return { [`${this.name}:${this._status}`]: [ { componentId: this.componentId, componentType: 'component', observedValue: this._status, output: undefined, status: this._status, time: this.actualStateDate, }, ], }; } async start() { } async stop() { } async close() { } } exports.OurProvider = OurProvider; //# sourceMappingURL=Health.assets.js.map