UNPKG

@canonical/jujulib

Version:

Juju API client

61 lines (59 loc) 1.75 kB
/** Juju FanConfigurer 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 FanConfigurerV1 { constructor(transport, info) { this.NAME = "FanConfigurer"; this.VERSION = 1; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** FanConfig returns current FAN configuration. */ fanConfig(params) { return new Promise((resolve, reject) => { const req = { type: "FanConfigurer", request: "FanConfig", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchForFanConfigChanges returns a NotifyWatcher that observes changes to the FAN configuration. so we use the regular error return. TODO(wpk) 2017-09-21 We should use Model directly, and watch only for FanConfig changes. */ watchForFanConfigChanges(params) { return new Promise((resolve, reject) => { const req = { type: "FanConfigurer", request: "WatchForFanConfigChanges", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } } FanConfigurerV1.NAME = "FanConfigurer"; FanConfigurerV1.VERSION = 1; export default FanConfigurerV1; //# sourceMappingURL=FanConfigurerV1.js.map