@canonical/jujulib
Version:
Juju API client
57 lines (56 loc) • 1.68 kB
JavaScript
/**
Juju ModelSummaryWatcher version 1.
This facade is available on:
Controllers
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";
/**
SrvModelSummaryWatcher defines the API methods on a ModelSummaryWatcher.
*/
class ModelSummaryWatcherV1 {
constructor(transport, info) {
this.NAME = "ModelSummaryWatcher";
this.VERSION = 1;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
Next will return the current state of everything on the first call
and subsequent calls will return just those model summaries that have
changed.
*/
next(params) {
return new Promise((resolve, reject) => {
const req = {
type: "ModelSummaryWatcher",
request: "Next",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
Stop stops the watcher.
*/
stop(params) {
return new Promise((resolve, reject) => {
const req = {
type: "ModelSummaryWatcher",
request: "Stop",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
ModelSummaryWatcherV1.NAME = "ModelSummaryWatcher";
ModelSummaryWatcherV1.VERSION = 1;
export default ModelSummaryWatcherV1;
//# sourceMappingURL=ModelSummaryWatcherV1.js.map