UNPKG

@canonical/jujulib

Version:
55 lines (54 loc) 1.49 kB
/** Juju Cleaner version 2. 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"; /** CleanerAPI implements the API used by the cleaner worker. */ class CleanerV2 { constructor(transport, info) { this.NAME = "Cleaner"; this.VERSION = 2; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** Cleanup triggers a state cleanup */ cleanup(params) { return new Promise((resolve, reject) => { const req = { type: "Cleaner", request: "Cleanup", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchCleanups watches for cleanups to be performed in state. */ watchCleanups(params) { return new Promise((resolve, reject) => { const req = { type: "Cleaner", request: "WatchCleanups", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } } CleanerV2.NAME = "Cleaner"; CleanerV2.VERSION = 2; export default CleanerV2; //# sourceMappingURL=CleanerV2.js.map