UNPKG

@canonical/jujulib

Version:
46 lines (45 loc) 1.44 kB
/** Juju ResourcesHookContext 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"; /** UnitFacade is the resources portion of the uniter's API facade. */ class ResourcesHookContextV1 { constructor(transport, info) { this.NAME = "ResourcesHookContext"; this.VERSION = 1; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** GetResourceInfo returns the resource info for each of the given resource names (for the implicit application). If any one is missing then the corresponding result is set with errors.NotFound. */ getResourceInfo(params) { return new Promise((resolve, reject) => { const req = { type: "ResourcesHookContext", request: "GetResourceInfo", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } } ResourcesHookContextV1.NAME = "ResourcesHookContext"; ResourcesHookContextV1.VERSION = 1; export default ResourcesHookContextV1; //# sourceMappingURL=ResourcesHookContextV1.js.map