@kinotic-ai/system-api 5.0.0-beta.44 → 5.0.0-beta.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -9
- package/dist/index.d.cts +9 -18
- package/dist/index.d.ts +9 -18
- package/dist/index.js +5 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -117,17 +117,13 @@ var VmNodeStatusType;
|
|
|
117
117
|
})(VmNodeStatusType ||= {});
|
|
118
118
|
// packages/system-api/src/api/model/workload/VmNodeRegistration.ts
|
|
119
119
|
class VmNodeRegistration {
|
|
120
|
-
id;
|
|
121
|
-
name;
|
|
122
120
|
hostname;
|
|
123
121
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
124
122
|
totalCpus = 0;
|
|
125
123
|
totalMemoryMb = 0;
|
|
126
124
|
totalDiskMb = 0;
|
|
127
125
|
workloadDataDir = null;
|
|
128
|
-
constructor(
|
|
129
|
-
this.id = id;
|
|
130
|
-
this.name = name;
|
|
126
|
+
constructor(hostname) {
|
|
131
127
|
this.hostname = hostname;
|
|
132
128
|
}
|
|
133
129
|
}
|
|
@@ -235,11 +231,11 @@ class VmNodeOrchestrationServiceProxy {
|
|
|
235
231
|
registerNode(registration) {
|
|
236
232
|
return this.serviceProxy.invoke("registerNode", [registration]);
|
|
237
233
|
}
|
|
238
|
-
heartbeat(
|
|
239
|
-
return this.serviceProxy.invoke("heartbeat", [
|
|
234
|
+
heartbeat(problems) {
|
|
235
|
+
return this.serviceProxy.invoke("heartbeat", [problems]);
|
|
240
236
|
}
|
|
241
|
-
reportWorkloadStatus(
|
|
242
|
-
return this.serviceProxy.invoke("reportWorkloadStatus", [
|
|
237
|
+
reportWorkloadStatus(reports) {
|
|
238
|
+
return this.serviceProxy.invoke("reportWorkloadStatus", [reports]);
|
|
243
239
|
}
|
|
244
240
|
deregisterNode(nodeId) {
|
|
245
241
|
return this.serviceProxy.invoke("deregisterNode", [nodeId]);
|
package/dist/index.d.cts
CHANGED
|
@@ -97,18 +97,10 @@ declare class VmNode implements Reconcilable<VmNodeState> {
|
|
|
97
97
|
constructor(id: string, name: string, hostname: string);
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* DTO sent by a vm-manager process when it registers with the server.
|
|
101
|
-
*
|
|
100
|
+
* DTO sent by a vm-manager process when it registers with the server. Contains only the information the node
|
|
101
|
+
* knows about itself: the node's id and name are those of the machine it authenticates as.
|
|
102
102
|
*/
|
|
103
103
|
declare class VmNodeRegistration {
|
|
104
|
-
/**
|
|
105
|
-
* Unique identifier for this node.
|
|
106
|
-
*/
|
|
107
|
-
id: string;
|
|
108
|
-
/**
|
|
109
|
-
* Human-readable name for the node.
|
|
110
|
-
*/
|
|
111
|
-
name: string;
|
|
112
104
|
/**
|
|
113
105
|
* The hostname or address of the node.
|
|
114
106
|
*/
|
|
@@ -133,7 +125,7 @@ declare class VmNodeRegistration {
|
|
|
133
125
|
* Base directory every workload volume mount on this node must live under.
|
|
134
126
|
*/
|
|
135
127
|
workloadDataDir: string | null;
|
|
136
|
-
constructor(
|
|
128
|
+
constructor(hostname: string);
|
|
137
129
|
}
|
|
138
130
|
import { WorkloadStatus } from "@kinotic-ai/management-api";
|
|
139
131
|
/**
|
|
@@ -307,7 +299,8 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
307
299
|
private readonly serviceProxy;
|
|
308
300
|
constructor(kinotic: IKinotic4);
|
|
309
301
|
/**
|
|
310
|
-
* Registers this
|
|
302
|
+
* Registers the machine this client authenticated as with the orchestrator, as a node whose id is the
|
|
303
|
+
* machine's id and whose name is the machine's display name.
|
|
311
304
|
* @param registration the node registration info
|
|
312
305
|
* @return a Promise resolving to the registered VmNode
|
|
313
306
|
*/
|
|
@@ -315,21 +308,19 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
315
308
|
/**
|
|
316
309
|
* Sends a heartbeat to indicate this node is still alive, carrying what it can still
|
|
317
310
|
* guarantee. A node reporting problems stops receiving workloads until it reports none.
|
|
318
|
-
* @param nodeId the id of this node
|
|
319
311
|
* @param problems what the node can no longer guarantee, empty when it is fit
|
|
320
312
|
* @return a Promise resolving to the updated VmNode
|
|
321
313
|
*/
|
|
322
|
-
heartbeat(
|
|
314
|
+
heartbeat(problems: string[]): Promise<VmNode>;
|
|
323
315
|
/**
|
|
324
316
|
* Reports the actual status of workloads on this node so the server's records track
|
|
325
317
|
* transitions the orchestrator did not initiate.
|
|
326
|
-
* @param nodeId the id of this node
|
|
327
318
|
* @param reports one report per workload
|
|
328
319
|
*/
|
|
329
|
-
reportWorkloadStatus(
|
|
320
|
+
reportWorkloadStatus(reports: WorkloadStatusReport[]): Promise<void>;
|
|
330
321
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param nodeId the id of
|
|
322
|
+
* Asks for a node's removal from the orchestrator.
|
|
323
|
+
* @param nodeId the id of the node
|
|
333
324
|
*/
|
|
334
325
|
deregisterNode(nodeId: string): Promise<void>;
|
|
335
326
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -97,18 +97,10 @@ declare class VmNode implements Reconcilable<VmNodeState> {
|
|
|
97
97
|
constructor(id: string, name: string, hostname: string);
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* DTO sent by a vm-manager process when it registers with the server.
|
|
101
|
-
*
|
|
100
|
+
* DTO sent by a vm-manager process when it registers with the server. Contains only the information the node
|
|
101
|
+
* knows about itself: the node's id and name are those of the machine it authenticates as.
|
|
102
102
|
*/
|
|
103
103
|
declare class VmNodeRegistration {
|
|
104
|
-
/**
|
|
105
|
-
* Unique identifier for this node.
|
|
106
|
-
*/
|
|
107
|
-
id: string;
|
|
108
|
-
/**
|
|
109
|
-
* Human-readable name for the node.
|
|
110
|
-
*/
|
|
111
|
-
name: string;
|
|
112
104
|
/**
|
|
113
105
|
* The hostname or address of the node.
|
|
114
106
|
*/
|
|
@@ -133,7 +125,7 @@ declare class VmNodeRegistration {
|
|
|
133
125
|
* Base directory every workload volume mount on this node must live under.
|
|
134
126
|
*/
|
|
135
127
|
workloadDataDir: string | null;
|
|
136
|
-
constructor(
|
|
128
|
+
constructor(hostname: string);
|
|
137
129
|
}
|
|
138
130
|
import { WorkloadStatus } from "@kinotic-ai/management-api";
|
|
139
131
|
/**
|
|
@@ -307,7 +299,8 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
307
299
|
private readonly serviceProxy;
|
|
308
300
|
constructor(kinotic: IKinotic4);
|
|
309
301
|
/**
|
|
310
|
-
* Registers this
|
|
302
|
+
* Registers the machine this client authenticated as with the orchestrator, as a node whose id is the
|
|
303
|
+
* machine's id and whose name is the machine's display name.
|
|
311
304
|
* @param registration the node registration info
|
|
312
305
|
* @return a Promise resolving to the registered VmNode
|
|
313
306
|
*/
|
|
@@ -315,21 +308,19 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
315
308
|
/**
|
|
316
309
|
* Sends a heartbeat to indicate this node is still alive, carrying what it can still
|
|
317
310
|
* guarantee. A node reporting problems stops receiving workloads until it reports none.
|
|
318
|
-
* @param nodeId the id of this node
|
|
319
311
|
* @param problems what the node can no longer guarantee, empty when it is fit
|
|
320
312
|
* @return a Promise resolving to the updated VmNode
|
|
321
313
|
*/
|
|
322
|
-
heartbeat(
|
|
314
|
+
heartbeat(problems: string[]): Promise<VmNode>;
|
|
323
315
|
/**
|
|
324
316
|
* Reports the actual status of workloads on this node so the server's records track
|
|
325
317
|
* transitions the orchestrator did not initiate.
|
|
326
|
-
* @param nodeId the id of this node
|
|
327
318
|
* @param reports one report per workload
|
|
328
319
|
*/
|
|
329
|
-
reportWorkloadStatus(
|
|
320
|
+
reportWorkloadStatus(reports: WorkloadStatusReport[]): Promise<void>;
|
|
330
321
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param nodeId the id of
|
|
322
|
+
* Asks for a node's removal from the orchestrator.
|
|
323
|
+
* @param nodeId the id of the node
|
|
333
324
|
*/
|
|
334
325
|
deregisterNode(nodeId: string): Promise<void>;
|
|
335
326
|
}
|
package/dist/index.js
CHANGED
|
@@ -41,17 +41,13 @@ var VmNodeStatusType;
|
|
|
41
41
|
})(VmNodeStatusType ||= {});
|
|
42
42
|
// packages/system-api/src/api/model/workload/VmNodeRegistration.ts
|
|
43
43
|
class VmNodeRegistration {
|
|
44
|
-
id;
|
|
45
|
-
name;
|
|
46
44
|
hostname;
|
|
47
45
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
48
46
|
totalCpus = 0;
|
|
49
47
|
totalMemoryMb = 0;
|
|
50
48
|
totalDiskMb = 0;
|
|
51
49
|
workloadDataDir = null;
|
|
52
|
-
constructor(
|
|
53
|
-
this.id = id;
|
|
54
|
-
this.name = name;
|
|
50
|
+
constructor(hostname) {
|
|
55
51
|
this.hostname = hostname;
|
|
56
52
|
}
|
|
57
53
|
}
|
|
@@ -159,11 +155,11 @@ class VmNodeOrchestrationServiceProxy {
|
|
|
159
155
|
registerNode(registration) {
|
|
160
156
|
return this.serviceProxy.invoke("registerNode", [registration]);
|
|
161
157
|
}
|
|
162
|
-
heartbeat(
|
|
163
|
-
return this.serviceProxy.invoke("heartbeat", [
|
|
158
|
+
heartbeat(problems) {
|
|
159
|
+
return this.serviceProxy.invoke("heartbeat", [problems]);
|
|
164
160
|
}
|
|
165
|
-
reportWorkloadStatus(
|
|
166
|
-
return this.serviceProxy.invoke("reportWorkloadStatus", [
|
|
161
|
+
reportWorkloadStatus(reports) {
|
|
162
|
+
return this.serviceProxy.invoke("reportWorkloadStatus", [reports]);
|
|
167
163
|
}
|
|
168
164
|
deregisterNode(nodeId) {
|
|
169
165
|
return this.serviceProxy.invoke("deregisterNode", [nodeId]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/system-api",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Client API for the Kinotic platform's system plane: the workload and node orchestration services system machines and operators use.",
|
|
6
6
|
"files": [
|