@cocalc/server
Version:
CoCalc server functionality: functions used by either the hub and the next.js server
54 lines (48 loc) • 1.61 kB
JavaScript
;
/*
cocalc-kubernetes support.
TODO/CRITICAL: I deleted this from target.ts, so be sure to make this.host be actually right!
if (project._kubernetes) {
// this is ugly -- need to determine host in case of kubernetes, since
// host as set in the project object is old/wrong.
const status = await callback2(project.status);
if (!status.ip) {
throw Error("must wait for project to start");
}
host = status.ip;
}
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = require("./base");
const logger_1 = __importDefault(require("@cocalc/backend/logger"));
const winston = (0, logger_1.default)("project-control-kubernetes");
class Project extends base_1.BaseProject {
async state() {
console.log("state");
throw Error("implement me");
}
async status() {
winston.debug("status ", this.project_id);
throw Error("implement me");
}
async start() {
winston.debug("start ", this.project_id);
throw Error("implement me");
}
async stop() {
winston.debug("stop ", this.project_id);
throw Error("implement me");
}
async copyPath(opts) {
winston.debug("doCopyPath ", this.project_id, opts);
throw Error("implement me");
}
}
function get(project_id) {
return (0, base_1.getProject)(project_id) ?? new Project(project_id);
}
exports.default = get;
//# sourceMappingURL=kubernetes.js.map