UNPKG

@canonical/jujulib

Version:

Juju API client

60 lines (58 loc) 1.72 kB
/** Juju CAASApplication version 1. This facade is available on: Controller-machine-agent Machine-agent Unit-agent 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"; /** */ class CAASApplicationV1 { constructor(transport, info) { this.NAME = "CAASApplication"; this.VERSION = 1; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** UnitIntroduction sets the status of each given entity. */ unitIntroduction(params) { return new Promise((resolve, reject) => { const req = { type: "CAASApplication", request: "UnitIntroduction", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } /** UnitTerminating should be called by the CAASUnitTerminationWorker when the agent receives a signal to exit. UnitTerminating will return how the agent should shutdown. */ unitTerminating(params) { return new Promise((resolve, reject) => { const req = { type: "CAASApplication", request: "UnitTerminating", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } } CAASApplicationV1.NAME = "CAASApplication"; CAASApplicationV1.VERSION = 1; export default CAASApplicationV1; //# sourceMappingURL=CAASApplicationV1.js.map