@canonical/jujulib
Version:
Juju API client
58 lines (57 loc) • 1.71 kB
JavaScript
/**
Juju ProxyUpdater version 2.
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";
/**
API provides the ProxyUpdater version 2 facade.
*/
class ProxyUpdaterV2 {
constructor(transport, info) {
this.NAME = "ProxyUpdater";
this.VERSION = 2;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
ProxyConfig returns the proxy settings for the current model.
*/
proxyConfig(params) {
return new Promise((resolve, reject) => {
const req = {
type: "ProxyUpdater",
request: "ProxyConfig",
version: 2,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
WatchForProxyConfigAndAPIHostPortChanges watches for changes to the proxy and api host port settings.
*/
watchForProxyConfigAndAPIHostPortChanges(params) {
return new Promise((resolve, reject) => {
const req = {
type: "ProxyUpdater",
request: "WatchForProxyConfigAndAPIHostPortChanges",
version: 2,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
ProxyUpdaterV2.NAME = "ProxyUpdater";
ProxyUpdaterV2.VERSION = 2;
export default ProxyUpdaterV2;
//# sourceMappingURL=ProxyUpdaterV2.js.map