UNPKG

@canonical/jujulib

Version:
56 lines (55 loc) 1.6 kB
/** Juju MetricsDebug version 2. This facade is available on: Models NOTE: This file was generated using the Juju schema from Juju 3.3 at the git SHA 65fa4c1ee5. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** MetricsDebugAPI implements the metricsdebug interface and is the concrete implementation of the api end point. */ class MetricsDebugV2 { constructor(transport, info) { this.NAME = "MetricsDebug"; this.VERSION = 2; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** GetMetrics returns all metrics stored by the state server. */ getMetrics(params) { return new Promise((resolve, reject) => { const req = { type: "MetricsDebug", request: "GetMetrics", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetMeterStatus sets meter statuses for entities. */ setMeterStatus(params) { return new Promise((resolve, reject) => { const req = { type: "MetricsDebug", request: "SetMeterStatus", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } } MetricsDebugV2.NAME = "MetricsDebug"; MetricsDebugV2.VERSION = 2; export default MetricsDebugV2; //# sourceMappingURL=MetricsDebugV2.js.map