@canonical/jujulib
Version:
Juju API client
44 lines (41 loc) • 1.05 kB
JavaScript
/**
Juju RaftLease 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.0 at the git SHA deb94d4.
Do not manually edit this file.
*/
import { autoBind } from "../../utils.js";
/**
*/
class RaftLeaseV2 {
constructor(transport, info) {
this.NAME = "RaftLease";
this.VERSION = 2;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
*/
applyLease(params) {
return new Promise((resolve, reject) => {
const req = {
type: "RaftLease",
request: "ApplyLease",
version: 2,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
RaftLeaseV2.NAME = "RaftLease";
RaftLeaseV2.VERSION = 2;
export default RaftLeaseV2;
//# sourceMappingURL=RaftLeaseV2.js.map