UNPKG

@canonical/jujulib

Version:

Juju API client

57 lines (56 loc) 1.69 kB
/** Juju ApplicationScaler version 1. This facade is available on: Controller-machine-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"; /** Facade allows model-manager clients to watch and rescale services. */ class ApplicationScalerV1 { constructor(transport, info) { this.NAME = "ApplicationScaler"; this.VERSION = 1; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** Rescale causes any supplied services to be scaled up to their minimum size. */ rescale(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationScaler", request: "Rescale", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } /** Watch returns a watcher that sends the names of services whose unit count may be below their configured minimum. */ watch(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationScaler", request: "Watch", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } } ApplicationScalerV1.NAME = "ApplicationScaler"; ApplicationScalerV1.VERSION = 1; export default ApplicationScalerV1; //# sourceMappingURL=ApplicationScalerV1.js.map