UNPKG

@canonical/jujulib

Version:
44 lines (43 loc) 1.26 kB
/** Juju MetricsAdder version 2. This facade is available on: Controller-machine-agent Machine-agent Unit-agent 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"; /** MetricsAdderAPI implements the metrics adder interface and is the concrete implementation of the API end point. */ class MetricsAdderV2 { constructor(transport, info) { this.NAME = "MetricsAdder"; this.VERSION = 2; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** AddMetricBatches implements the MetricsAdder interface. */ addMetricBatches(params) { return new Promise((resolve, reject) => { const req = { type: "MetricsAdder", request: "AddMetricBatches", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } } MetricsAdderV2.NAME = "MetricsAdder"; MetricsAdderV2.VERSION = 2; export default MetricsAdderV2; //# sourceMappingURL=MetricsAdderV2.js.map