@rise-maritime/keelson-js 0.6.0-alpha.255.dev.1 → 0.6.0-alpha.275.dev.2
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.d.ts +83 -8
- package/dist/index.js +23 -1
- package/dist/index.test.js +31 -0
- package/dist/interfaces/AlarmAck.d.ts +2 -2
- package/dist/interfaces/AlarmAck.js +2 -2
- package/dist/interfaces/ContainerControl.d.ts +239 -0
- package/dist/interfaces/ContainerControl.js +1053 -0
- package/dist/interfaces/ContainerHost.d.ts +403 -0
- package/dist/interfaces/ContainerHost.js +1230 -0
- package/dist/interfaces/ErrorResponse.d.ts +7 -2
- package/dist/interfaces/ErrorResponse.js +12 -2
- package/dist/interfaces/Route.d.ts +141 -6
- package/dist/interfaces/Route.js +309 -4
- package/dist/interfaces/RoutePlanner.d.ts +19 -1
- package/dist/interfaces/RoutePlanner.js +23 -1
- package/dist/interfaces/ScenarioControl.d.ts +132 -3
- package/dist/interfaces/ScenarioControl.js +439 -37
- package/dist/interfaces/VehicleNavigation.d.ts +55 -0
- package/dist/interfaces/VehicleNavigation.js +233 -1
- package/dist/interfaces/VehicleSimulatorControl.d.ts +0 -83
- package/dist/interfaces/VehicleSimulatorControl.js +1 -293
- package/dist/interfaces/serviceRegistry.d.ts +84 -8
- package/dist/interfaces/serviceRegistry.js +4 -0
- package/dist/interfaces.json +2 -0
- package/dist/payloads/AdviceDisposition.d.ts +55 -0
- package/dist/payloads/AdviceDisposition.js +242 -0
- package/dist/payloads/ChecklistHandover.d.ts +522 -0
- package/dist/payloads/ChecklistHandover.js +1735 -0
- package/dist/payloads/ContainerHost.d.ts +407 -0
- package/dist/payloads/ContainerHost.js +1245 -0
- package/dist/payloads/Encounter.d.ts +104 -0
- package/dist/payloads/Encounter.js +573 -0
- package/dist/payloads/NavigationAdvice.d.ts +94 -0
- package/dist/payloads/NavigationAdvice.js +596 -0
- package/dist/payloads/NavigationState.d.ts +90 -0
- package/dist/payloads/NavigationState.js +377 -0
- package/dist/payloads/Route.d.ts +142 -6
- package/dist/payloads/Route.js +318 -4
- package/dist/payloads/RouteExecution.d.ts +7 -0
- package/dist/payloads/ScenarioEvent.d.ts +14 -0
- package/dist/payloads/ScenarioEvent.js +16 -0
- package/dist/payloads/index.d.ts +1 -1
- package/dist/payloads/index.js +2 -2
- package/dist/payloads/index.keelson.d.ts +10 -4
- package/dist/payloads/index.keelson.js +10 -4
- package/dist/qos.json +6 -0
- package/dist/subjects.json +20 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.6.1
|
|
5
|
+
// protoc v6.30.2
|
|
6
|
+
// source: ContainerHost.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ContainerHostStats = exports.ContainerResourceUsage = exports.ContainerHostStatus = exports.ContainerInfo = exports.containerStatusTriggerToJSON = exports.containerStatusTriggerFromJSON = exports.ContainerStatusTrigger = exports.containerHealthStatusToJSON = exports.containerHealthStatusFromJSON = exports.ContainerHealthStatus = exports.containerRestartPolicyToJSON = exports.containerRestartPolicyFromJSON = exports.ContainerRestartPolicy = exports.containerStateToJSON = exports.containerStateFromJSON = exports.ContainerState = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
12
|
+
exports.protobufPackage = "keelson";
|
|
13
|
+
/**
|
|
14
|
+
* The container lifecycle states. Values mirror the Docker Engine's state
|
|
15
|
+
* vocabulary, which containerd and podman also use. ContainerInfo.raw_state
|
|
16
|
+
* carries whatever the runtime actually said, so a state this enum does not yet
|
|
17
|
+
* model is preserved rather than flattened to UNSPECIFIED.
|
|
18
|
+
*/
|
|
19
|
+
var ContainerState;
|
|
20
|
+
(function (ContainerState) {
|
|
21
|
+
ContainerState[ContainerState["CONTAINER_STATE_UNSPECIFIED"] = 0] = "CONTAINER_STATE_UNSPECIFIED";
|
|
22
|
+
ContainerState[ContainerState["CONTAINER_STATE_CREATED"] = 1] = "CONTAINER_STATE_CREATED";
|
|
23
|
+
ContainerState[ContainerState["CONTAINER_STATE_RUNNING"] = 2] = "CONTAINER_STATE_RUNNING";
|
|
24
|
+
ContainerState[ContainerState["CONTAINER_STATE_PAUSED"] = 3] = "CONTAINER_STATE_PAUSED";
|
|
25
|
+
ContainerState[ContainerState["CONTAINER_STATE_RESTARTING"] = 4] = "CONTAINER_STATE_RESTARTING";
|
|
26
|
+
ContainerState[ContainerState["CONTAINER_STATE_REMOVING"] = 5] = "CONTAINER_STATE_REMOVING";
|
|
27
|
+
ContainerState[ContainerState["CONTAINER_STATE_EXITED"] = 6] = "CONTAINER_STATE_EXITED";
|
|
28
|
+
ContainerState[ContainerState["CONTAINER_STATE_DEAD"] = 7] = "CONTAINER_STATE_DEAD";
|
|
29
|
+
ContainerState[ContainerState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
30
|
+
})(ContainerState || (exports.ContainerState = ContainerState = {}));
|
|
31
|
+
function containerStateFromJSON(object) {
|
|
32
|
+
switch (object) {
|
|
33
|
+
case 0:
|
|
34
|
+
case "CONTAINER_STATE_UNSPECIFIED":
|
|
35
|
+
return ContainerState.CONTAINER_STATE_UNSPECIFIED;
|
|
36
|
+
case 1:
|
|
37
|
+
case "CONTAINER_STATE_CREATED":
|
|
38
|
+
return ContainerState.CONTAINER_STATE_CREATED;
|
|
39
|
+
case 2:
|
|
40
|
+
case "CONTAINER_STATE_RUNNING":
|
|
41
|
+
return ContainerState.CONTAINER_STATE_RUNNING;
|
|
42
|
+
case 3:
|
|
43
|
+
case "CONTAINER_STATE_PAUSED":
|
|
44
|
+
return ContainerState.CONTAINER_STATE_PAUSED;
|
|
45
|
+
case 4:
|
|
46
|
+
case "CONTAINER_STATE_RESTARTING":
|
|
47
|
+
return ContainerState.CONTAINER_STATE_RESTARTING;
|
|
48
|
+
case 5:
|
|
49
|
+
case "CONTAINER_STATE_REMOVING":
|
|
50
|
+
return ContainerState.CONTAINER_STATE_REMOVING;
|
|
51
|
+
case 6:
|
|
52
|
+
case "CONTAINER_STATE_EXITED":
|
|
53
|
+
return ContainerState.CONTAINER_STATE_EXITED;
|
|
54
|
+
case 7:
|
|
55
|
+
case "CONTAINER_STATE_DEAD":
|
|
56
|
+
return ContainerState.CONTAINER_STATE_DEAD;
|
|
57
|
+
case -1:
|
|
58
|
+
case "UNRECOGNIZED":
|
|
59
|
+
default:
|
|
60
|
+
return ContainerState.UNRECOGNIZED;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.containerStateFromJSON = containerStateFromJSON;
|
|
64
|
+
function containerStateToJSON(object) {
|
|
65
|
+
switch (object) {
|
|
66
|
+
case ContainerState.CONTAINER_STATE_UNSPECIFIED:
|
|
67
|
+
return "CONTAINER_STATE_UNSPECIFIED";
|
|
68
|
+
case ContainerState.CONTAINER_STATE_CREATED:
|
|
69
|
+
return "CONTAINER_STATE_CREATED";
|
|
70
|
+
case ContainerState.CONTAINER_STATE_RUNNING:
|
|
71
|
+
return "CONTAINER_STATE_RUNNING";
|
|
72
|
+
case ContainerState.CONTAINER_STATE_PAUSED:
|
|
73
|
+
return "CONTAINER_STATE_PAUSED";
|
|
74
|
+
case ContainerState.CONTAINER_STATE_RESTARTING:
|
|
75
|
+
return "CONTAINER_STATE_RESTARTING";
|
|
76
|
+
case ContainerState.CONTAINER_STATE_REMOVING:
|
|
77
|
+
return "CONTAINER_STATE_REMOVING";
|
|
78
|
+
case ContainerState.CONTAINER_STATE_EXITED:
|
|
79
|
+
return "CONTAINER_STATE_EXITED";
|
|
80
|
+
case ContainerState.CONTAINER_STATE_DEAD:
|
|
81
|
+
return "CONTAINER_STATE_DEAD";
|
|
82
|
+
case ContainerState.UNRECOGNIZED:
|
|
83
|
+
default:
|
|
84
|
+
return "UNRECOGNIZED";
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.containerStateToJSON = containerStateToJSON;
|
|
88
|
+
/**
|
|
89
|
+
* The runtime's restart policy for a container. NO is spelled explicitly because
|
|
90
|
+
* the Docker API reports it as the empty string, which is indistinguishable from
|
|
91
|
+
* "not reported" once it reaches a UI.
|
|
92
|
+
*/
|
|
93
|
+
var ContainerRestartPolicy;
|
|
94
|
+
(function (ContainerRestartPolicy) {
|
|
95
|
+
ContainerRestartPolicy[ContainerRestartPolicy["CONTAINER_RESTART_POLICY_UNSPECIFIED"] = 0] = "CONTAINER_RESTART_POLICY_UNSPECIFIED";
|
|
96
|
+
ContainerRestartPolicy[ContainerRestartPolicy["CONTAINER_RESTART_POLICY_NO"] = 1] = "CONTAINER_RESTART_POLICY_NO";
|
|
97
|
+
ContainerRestartPolicy[ContainerRestartPolicy["CONTAINER_RESTART_POLICY_ALWAYS"] = 2] = "CONTAINER_RESTART_POLICY_ALWAYS";
|
|
98
|
+
ContainerRestartPolicy[ContainerRestartPolicy["CONTAINER_RESTART_POLICY_UNLESS_STOPPED"] = 3] = "CONTAINER_RESTART_POLICY_UNLESS_STOPPED";
|
|
99
|
+
ContainerRestartPolicy[ContainerRestartPolicy["CONTAINER_RESTART_POLICY_ON_FAILURE"] = 4] = "CONTAINER_RESTART_POLICY_ON_FAILURE";
|
|
100
|
+
ContainerRestartPolicy[ContainerRestartPolicy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
101
|
+
})(ContainerRestartPolicy || (exports.ContainerRestartPolicy = ContainerRestartPolicy = {}));
|
|
102
|
+
function containerRestartPolicyFromJSON(object) {
|
|
103
|
+
switch (object) {
|
|
104
|
+
case 0:
|
|
105
|
+
case "CONTAINER_RESTART_POLICY_UNSPECIFIED":
|
|
106
|
+
return ContainerRestartPolicy.CONTAINER_RESTART_POLICY_UNSPECIFIED;
|
|
107
|
+
case 1:
|
|
108
|
+
case "CONTAINER_RESTART_POLICY_NO":
|
|
109
|
+
return ContainerRestartPolicy.CONTAINER_RESTART_POLICY_NO;
|
|
110
|
+
case 2:
|
|
111
|
+
case "CONTAINER_RESTART_POLICY_ALWAYS":
|
|
112
|
+
return ContainerRestartPolicy.CONTAINER_RESTART_POLICY_ALWAYS;
|
|
113
|
+
case 3:
|
|
114
|
+
case "CONTAINER_RESTART_POLICY_UNLESS_STOPPED":
|
|
115
|
+
return ContainerRestartPolicy.CONTAINER_RESTART_POLICY_UNLESS_STOPPED;
|
|
116
|
+
case 4:
|
|
117
|
+
case "CONTAINER_RESTART_POLICY_ON_FAILURE":
|
|
118
|
+
return ContainerRestartPolicy.CONTAINER_RESTART_POLICY_ON_FAILURE;
|
|
119
|
+
case -1:
|
|
120
|
+
case "UNRECOGNIZED":
|
|
121
|
+
default:
|
|
122
|
+
return ContainerRestartPolicy.UNRECOGNIZED;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.containerRestartPolicyFromJSON = containerRestartPolicyFromJSON;
|
|
126
|
+
function containerRestartPolicyToJSON(object) {
|
|
127
|
+
switch (object) {
|
|
128
|
+
case ContainerRestartPolicy.CONTAINER_RESTART_POLICY_UNSPECIFIED:
|
|
129
|
+
return "CONTAINER_RESTART_POLICY_UNSPECIFIED";
|
|
130
|
+
case ContainerRestartPolicy.CONTAINER_RESTART_POLICY_NO:
|
|
131
|
+
return "CONTAINER_RESTART_POLICY_NO";
|
|
132
|
+
case ContainerRestartPolicy.CONTAINER_RESTART_POLICY_ALWAYS:
|
|
133
|
+
return "CONTAINER_RESTART_POLICY_ALWAYS";
|
|
134
|
+
case ContainerRestartPolicy.CONTAINER_RESTART_POLICY_UNLESS_STOPPED:
|
|
135
|
+
return "CONTAINER_RESTART_POLICY_UNLESS_STOPPED";
|
|
136
|
+
case ContainerRestartPolicy.CONTAINER_RESTART_POLICY_ON_FAILURE:
|
|
137
|
+
return "CONTAINER_RESTART_POLICY_ON_FAILURE";
|
|
138
|
+
case ContainerRestartPolicy.UNRECOGNIZED:
|
|
139
|
+
default:
|
|
140
|
+
return "UNRECOGNIZED";
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.containerRestartPolicyToJSON = containerRestartPolicyToJSON;
|
|
144
|
+
/**
|
|
145
|
+
* Health-check result. NONE and UNSPECIFIED are different answers: NONE means the
|
|
146
|
+
* container declares no health check, UNSPECIFIED means the responder could not
|
|
147
|
+
* determine one.
|
|
148
|
+
*/
|
|
149
|
+
var ContainerHealthStatus;
|
|
150
|
+
(function (ContainerHealthStatus) {
|
|
151
|
+
ContainerHealthStatus[ContainerHealthStatus["CONTAINER_HEALTH_STATUS_UNSPECIFIED"] = 0] = "CONTAINER_HEALTH_STATUS_UNSPECIFIED";
|
|
152
|
+
ContainerHealthStatus[ContainerHealthStatus["CONTAINER_HEALTH_STATUS_NONE"] = 1] = "CONTAINER_HEALTH_STATUS_NONE";
|
|
153
|
+
ContainerHealthStatus[ContainerHealthStatus["CONTAINER_HEALTH_STATUS_STARTING"] = 2] = "CONTAINER_HEALTH_STATUS_STARTING";
|
|
154
|
+
ContainerHealthStatus[ContainerHealthStatus["CONTAINER_HEALTH_STATUS_HEALTHY"] = 3] = "CONTAINER_HEALTH_STATUS_HEALTHY";
|
|
155
|
+
ContainerHealthStatus[ContainerHealthStatus["CONTAINER_HEALTH_STATUS_UNHEALTHY"] = 4] = "CONTAINER_HEALTH_STATUS_UNHEALTHY";
|
|
156
|
+
ContainerHealthStatus[ContainerHealthStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
157
|
+
})(ContainerHealthStatus || (exports.ContainerHealthStatus = ContainerHealthStatus = {}));
|
|
158
|
+
function containerHealthStatusFromJSON(object) {
|
|
159
|
+
switch (object) {
|
|
160
|
+
case 0:
|
|
161
|
+
case "CONTAINER_HEALTH_STATUS_UNSPECIFIED":
|
|
162
|
+
return ContainerHealthStatus.CONTAINER_HEALTH_STATUS_UNSPECIFIED;
|
|
163
|
+
case 1:
|
|
164
|
+
case "CONTAINER_HEALTH_STATUS_NONE":
|
|
165
|
+
return ContainerHealthStatus.CONTAINER_HEALTH_STATUS_NONE;
|
|
166
|
+
case 2:
|
|
167
|
+
case "CONTAINER_HEALTH_STATUS_STARTING":
|
|
168
|
+
return ContainerHealthStatus.CONTAINER_HEALTH_STATUS_STARTING;
|
|
169
|
+
case 3:
|
|
170
|
+
case "CONTAINER_HEALTH_STATUS_HEALTHY":
|
|
171
|
+
return ContainerHealthStatus.CONTAINER_HEALTH_STATUS_HEALTHY;
|
|
172
|
+
case 4:
|
|
173
|
+
case "CONTAINER_HEALTH_STATUS_UNHEALTHY":
|
|
174
|
+
return ContainerHealthStatus.CONTAINER_HEALTH_STATUS_UNHEALTHY;
|
|
175
|
+
case -1:
|
|
176
|
+
case "UNRECOGNIZED":
|
|
177
|
+
default:
|
|
178
|
+
return ContainerHealthStatus.UNRECOGNIZED;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.containerHealthStatusFromJSON = containerHealthStatusFromJSON;
|
|
182
|
+
function containerHealthStatusToJSON(object) {
|
|
183
|
+
switch (object) {
|
|
184
|
+
case ContainerHealthStatus.CONTAINER_HEALTH_STATUS_UNSPECIFIED:
|
|
185
|
+
return "CONTAINER_HEALTH_STATUS_UNSPECIFIED";
|
|
186
|
+
case ContainerHealthStatus.CONTAINER_HEALTH_STATUS_NONE:
|
|
187
|
+
return "CONTAINER_HEALTH_STATUS_NONE";
|
|
188
|
+
case ContainerHealthStatus.CONTAINER_HEALTH_STATUS_STARTING:
|
|
189
|
+
return "CONTAINER_HEALTH_STATUS_STARTING";
|
|
190
|
+
case ContainerHealthStatus.CONTAINER_HEALTH_STATUS_HEALTHY:
|
|
191
|
+
return "CONTAINER_HEALTH_STATUS_HEALTHY";
|
|
192
|
+
case ContainerHealthStatus.CONTAINER_HEALTH_STATUS_UNHEALTHY:
|
|
193
|
+
return "CONTAINER_HEALTH_STATUS_UNHEALTHY";
|
|
194
|
+
case ContainerHealthStatus.UNRECOGNIZED:
|
|
195
|
+
default:
|
|
196
|
+
return "UNRECOGNIZED";
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
exports.containerHealthStatusToJSON = containerHealthStatusToJSON;
|
|
200
|
+
var ContainerStatusTrigger;
|
|
201
|
+
(function (ContainerStatusTrigger) {
|
|
202
|
+
ContainerStatusTrigger[ContainerStatusTrigger["CONTAINER_STATUS_TRIGGER_UNSPECIFIED"] = 0] = "CONTAINER_STATUS_TRIGGER_UNSPECIFIED";
|
|
203
|
+
/** CONTAINER_STATUS_TRIGGER_CHANGE - The container set changed since the previous sample. */
|
|
204
|
+
ContainerStatusTrigger[ContainerStatusTrigger["CONTAINER_STATUS_TRIGGER_CHANGE"] = 1] = "CONTAINER_STATUS_TRIGGER_CHANGE";
|
|
205
|
+
/**
|
|
206
|
+
* CONTAINER_STATUS_TRIGGER_HEARTBEAT - Nothing changed; this is the keep-alive. Zenoh pub/sub does not backfill,
|
|
207
|
+
* so without a periodic republish a subscriber that joins during a quiet
|
|
208
|
+
* period would wait indefinitely for its first value.
|
|
209
|
+
*/
|
|
210
|
+
ContainerStatusTrigger[ContainerStatusTrigger["CONTAINER_STATUS_TRIGGER_HEARTBEAT"] = 2] = "CONTAINER_STATUS_TRIGGER_HEARTBEAT";
|
|
211
|
+
ContainerStatusTrigger[ContainerStatusTrigger["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
212
|
+
})(ContainerStatusTrigger || (exports.ContainerStatusTrigger = ContainerStatusTrigger = {}));
|
|
213
|
+
function containerStatusTriggerFromJSON(object) {
|
|
214
|
+
switch (object) {
|
|
215
|
+
case 0:
|
|
216
|
+
case "CONTAINER_STATUS_TRIGGER_UNSPECIFIED":
|
|
217
|
+
return ContainerStatusTrigger.CONTAINER_STATUS_TRIGGER_UNSPECIFIED;
|
|
218
|
+
case 1:
|
|
219
|
+
case "CONTAINER_STATUS_TRIGGER_CHANGE":
|
|
220
|
+
return ContainerStatusTrigger.CONTAINER_STATUS_TRIGGER_CHANGE;
|
|
221
|
+
case 2:
|
|
222
|
+
case "CONTAINER_STATUS_TRIGGER_HEARTBEAT":
|
|
223
|
+
return ContainerStatusTrigger.CONTAINER_STATUS_TRIGGER_HEARTBEAT;
|
|
224
|
+
case -1:
|
|
225
|
+
case "UNRECOGNIZED":
|
|
226
|
+
default:
|
|
227
|
+
return ContainerStatusTrigger.UNRECOGNIZED;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
exports.containerStatusTriggerFromJSON = containerStatusTriggerFromJSON;
|
|
231
|
+
function containerStatusTriggerToJSON(object) {
|
|
232
|
+
switch (object) {
|
|
233
|
+
case ContainerStatusTrigger.CONTAINER_STATUS_TRIGGER_UNSPECIFIED:
|
|
234
|
+
return "CONTAINER_STATUS_TRIGGER_UNSPECIFIED";
|
|
235
|
+
case ContainerStatusTrigger.CONTAINER_STATUS_TRIGGER_CHANGE:
|
|
236
|
+
return "CONTAINER_STATUS_TRIGGER_CHANGE";
|
|
237
|
+
case ContainerStatusTrigger.CONTAINER_STATUS_TRIGGER_HEARTBEAT:
|
|
238
|
+
return "CONTAINER_STATUS_TRIGGER_HEARTBEAT";
|
|
239
|
+
case ContainerStatusTrigger.UNRECOGNIZED:
|
|
240
|
+
default:
|
|
241
|
+
return "UNRECOGNIZED";
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
exports.containerStatusTriggerToJSON = containerStatusTriggerToJSON;
|
|
245
|
+
function createBaseContainerInfo() {
|
|
246
|
+
return {
|
|
247
|
+
name: "",
|
|
248
|
+
id: "",
|
|
249
|
+
image: "",
|
|
250
|
+
state: 0,
|
|
251
|
+
rawState: "",
|
|
252
|
+
createdAt: undefined,
|
|
253
|
+
startedAt: undefined,
|
|
254
|
+
finishedAt: undefined,
|
|
255
|
+
exitCode: undefined,
|
|
256
|
+
restartPolicy: 0,
|
|
257
|
+
restartPolicyMaxRetries: 0,
|
|
258
|
+
restartCount: 0,
|
|
259
|
+
health: 0,
|
|
260
|
+
controllable: false,
|
|
261
|
+
composeProject: "",
|
|
262
|
+
composeService: "",
|
|
263
|
+
removable: false,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
exports.ContainerInfo = {
|
|
267
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
268
|
+
if (message.name !== "") {
|
|
269
|
+
writer.uint32(10).string(message.name);
|
|
270
|
+
}
|
|
271
|
+
if (message.id !== "") {
|
|
272
|
+
writer.uint32(18).string(message.id);
|
|
273
|
+
}
|
|
274
|
+
if (message.image !== "") {
|
|
275
|
+
writer.uint32(26).string(message.image);
|
|
276
|
+
}
|
|
277
|
+
if (message.state !== 0) {
|
|
278
|
+
writer.uint32(32).int32(message.state);
|
|
279
|
+
}
|
|
280
|
+
if (message.rawState !== "") {
|
|
281
|
+
writer.uint32(42).string(message.rawState);
|
|
282
|
+
}
|
|
283
|
+
if (message.createdAt !== undefined) {
|
|
284
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).join();
|
|
285
|
+
}
|
|
286
|
+
if (message.startedAt !== undefined) {
|
|
287
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(58).fork()).join();
|
|
288
|
+
}
|
|
289
|
+
if (message.finishedAt !== undefined) {
|
|
290
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(66).fork()).join();
|
|
291
|
+
}
|
|
292
|
+
if (message.exitCode !== undefined) {
|
|
293
|
+
writer.uint32(72).int32(message.exitCode);
|
|
294
|
+
}
|
|
295
|
+
if (message.restartPolicy !== 0) {
|
|
296
|
+
writer.uint32(80).int32(message.restartPolicy);
|
|
297
|
+
}
|
|
298
|
+
if (message.restartPolicyMaxRetries !== 0) {
|
|
299
|
+
writer.uint32(88).uint32(message.restartPolicyMaxRetries);
|
|
300
|
+
}
|
|
301
|
+
if (message.restartCount !== 0) {
|
|
302
|
+
writer.uint32(96).uint32(message.restartCount);
|
|
303
|
+
}
|
|
304
|
+
if (message.health !== 0) {
|
|
305
|
+
writer.uint32(104).int32(message.health);
|
|
306
|
+
}
|
|
307
|
+
if (message.controllable !== false) {
|
|
308
|
+
writer.uint32(112).bool(message.controllable);
|
|
309
|
+
}
|
|
310
|
+
if (message.composeProject !== "") {
|
|
311
|
+
writer.uint32(122).string(message.composeProject);
|
|
312
|
+
}
|
|
313
|
+
if (message.composeService !== "") {
|
|
314
|
+
writer.uint32(130).string(message.composeService);
|
|
315
|
+
}
|
|
316
|
+
if (message.removable !== false) {
|
|
317
|
+
writer.uint32(136).bool(message.removable);
|
|
318
|
+
}
|
|
319
|
+
return writer;
|
|
320
|
+
},
|
|
321
|
+
decode(input, length) {
|
|
322
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
323
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
324
|
+
const message = createBaseContainerInfo();
|
|
325
|
+
while (reader.pos < end) {
|
|
326
|
+
const tag = reader.uint32();
|
|
327
|
+
switch (tag >>> 3) {
|
|
328
|
+
case 1: {
|
|
329
|
+
if (tag !== 10) {
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
message.name = reader.string();
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
case 2: {
|
|
336
|
+
if (tag !== 18) {
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
message.id = reader.string();
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
case 3: {
|
|
343
|
+
if (tag !== 26) {
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
message.image = reader.string();
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
case 4: {
|
|
350
|
+
if (tag !== 32) {
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
message.state = reader.int32();
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
case 5: {
|
|
357
|
+
if (tag !== 42) {
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
message.rawState = reader.string();
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
case 6: {
|
|
364
|
+
if (tag !== 50) {
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
case 7: {
|
|
371
|
+
if (tag !== 58) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
case 8: {
|
|
378
|
+
if (tag !== 66) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
case 9: {
|
|
385
|
+
if (tag !== 72) {
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
message.exitCode = reader.int32();
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
case 10: {
|
|
392
|
+
if (tag !== 80) {
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
message.restartPolicy = reader.int32();
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
case 11: {
|
|
399
|
+
if (tag !== 88) {
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
message.restartPolicyMaxRetries = reader.uint32();
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
case 12: {
|
|
406
|
+
if (tag !== 96) {
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
message.restartCount = reader.uint32();
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
case 13: {
|
|
413
|
+
if (tag !== 104) {
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
message.health = reader.int32();
|
|
417
|
+
continue;
|
|
418
|
+
}
|
|
419
|
+
case 14: {
|
|
420
|
+
if (tag !== 112) {
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
message.controllable = reader.bool();
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
case 15: {
|
|
427
|
+
if (tag !== 122) {
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
message.composeProject = reader.string();
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
case 16: {
|
|
434
|
+
if (tag !== 130) {
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
message.composeService = reader.string();
|
|
438
|
+
continue;
|
|
439
|
+
}
|
|
440
|
+
case 17: {
|
|
441
|
+
if (tag !== 136) {
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
message.removable = reader.bool();
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
reader.skip(tag & 7);
|
|
452
|
+
}
|
|
453
|
+
return message;
|
|
454
|
+
},
|
|
455
|
+
fromJSON(object) {
|
|
456
|
+
return {
|
|
457
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
458
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
459
|
+
image: isSet(object.image) ? globalThis.String(object.image) : "",
|
|
460
|
+
state: isSet(object.state) ? containerStateFromJSON(object.state) : 0,
|
|
461
|
+
rawState: isSet(object.rawState) ? globalThis.String(object.rawState) : "",
|
|
462
|
+
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
463
|
+
startedAt: isSet(object.startedAt) ? fromJsonTimestamp(object.startedAt) : undefined,
|
|
464
|
+
finishedAt: isSet(object.finishedAt) ? fromJsonTimestamp(object.finishedAt) : undefined,
|
|
465
|
+
exitCode: isSet(object.exitCode) ? globalThis.Number(object.exitCode) : undefined,
|
|
466
|
+
restartPolicy: isSet(object.restartPolicy) ? containerRestartPolicyFromJSON(object.restartPolicy) : 0,
|
|
467
|
+
restartPolicyMaxRetries: isSet(object.restartPolicyMaxRetries)
|
|
468
|
+
? globalThis.Number(object.restartPolicyMaxRetries)
|
|
469
|
+
: 0,
|
|
470
|
+
restartCount: isSet(object.restartCount) ? globalThis.Number(object.restartCount) : 0,
|
|
471
|
+
health: isSet(object.health) ? containerHealthStatusFromJSON(object.health) : 0,
|
|
472
|
+
controllable: isSet(object.controllable) ? globalThis.Boolean(object.controllable) : false,
|
|
473
|
+
composeProject: isSet(object.composeProject) ? globalThis.String(object.composeProject) : "",
|
|
474
|
+
composeService: isSet(object.composeService) ? globalThis.String(object.composeService) : "",
|
|
475
|
+
removable: isSet(object.removable) ? globalThis.Boolean(object.removable) : false,
|
|
476
|
+
};
|
|
477
|
+
},
|
|
478
|
+
toJSON(message) {
|
|
479
|
+
const obj = {};
|
|
480
|
+
if (message.name !== "") {
|
|
481
|
+
obj.name = message.name;
|
|
482
|
+
}
|
|
483
|
+
if (message.id !== "") {
|
|
484
|
+
obj.id = message.id;
|
|
485
|
+
}
|
|
486
|
+
if (message.image !== "") {
|
|
487
|
+
obj.image = message.image;
|
|
488
|
+
}
|
|
489
|
+
if (message.state !== 0) {
|
|
490
|
+
obj.state = containerStateToJSON(message.state);
|
|
491
|
+
}
|
|
492
|
+
if (message.rawState !== "") {
|
|
493
|
+
obj.rawState = message.rawState;
|
|
494
|
+
}
|
|
495
|
+
if (message.createdAt !== undefined) {
|
|
496
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
497
|
+
}
|
|
498
|
+
if (message.startedAt !== undefined) {
|
|
499
|
+
obj.startedAt = message.startedAt.toISOString();
|
|
500
|
+
}
|
|
501
|
+
if (message.finishedAt !== undefined) {
|
|
502
|
+
obj.finishedAt = message.finishedAt.toISOString();
|
|
503
|
+
}
|
|
504
|
+
if (message.exitCode !== undefined) {
|
|
505
|
+
obj.exitCode = Math.round(message.exitCode);
|
|
506
|
+
}
|
|
507
|
+
if (message.restartPolicy !== 0) {
|
|
508
|
+
obj.restartPolicy = containerRestartPolicyToJSON(message.restartPolicy);
|
|
509
|
+
}
|
|
510
|
+
if (message.restartPolicyMaxRetries !== 0) {
|
|
511
|
+
obj.restartPolicyMaxRetries = Math.round(message.restartPolicyMaxRetries);
|
|
512
|
+
}
|
|
513
|
+
if (message.restartCount !== 0) {
|
|
514
|
+
obj.restartCount = Math.round(message.restartCount);
|
|
515
|
+
}
|
|
516
|
+
if (message.health !== 0) {
|
|
517
|
+
obj.health = containerHealthStatusToJSON(message.health);
|
|
518
|
+
}
|
|
519
|
+
if (message.controllable !== false) {
|
|
520
|
+
obj.controllable = message.controllable;
|
|
521
|
+
}
|
|
522
|
+
if (message.composeProject !== "") {
|
|
523
|
+
obj.composeProject = message.composeProject;
|
|
524
|
+
}
|
|
525
|
+
if (message.composeService !== "") {
|
|
526
|
+
obj.composeService = message.composeService;
|
|
527
|
+
}
|
|
528
|
+
if (message.removable !== false) {
|
|
529
|
+
obj.removable = message.removable;
|
|
530
|
+
}
|
|
531
|
+
return obj;
|
|
532
|
+
},
|
|
533
|
+
create(base) {
|
|
534
|
+
return exports.ContainerInfo.fromPartial(base ?? {});
|
|
535
|
+
},
|
|
536
|
+
fromPartial(object) {
|
|
537
|
+
const message = createBaseContainerInfo();
|
|
538
|
+
message.name = object.name ?? "";
|
|
539
|
+
message.id = object.id ?? "";
|
|
540
|
+
message.image = object.image ?? "";
|
|
541
|
+
message.state = object.state ?? 0;
|
|
542
|
+
message.rawState = object.rawState ?? "";
|
|
543
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
544
|
+
message.startedAt = object.startedAt ?? undefined;
|
|
545
|
+
message.finishedAt = object.finishedAt ?? undefined;
|
|
546
|
+
message.exitCode = object.exitCode ?? undefined;
|
|
547
|
+
message.restartPolicy = object.restartPolicy ?? 0;
|
|
548
|
+
message.restartPolicyMaxRetries = object.restartPolicyMaxRetries ?? 0;
|
|
549
|
+
message.restartCount = object.restartCount ?? 0;
|
|
550
|
+
message.health = object.health ?? 0;
|
|
551
|
+
message.controllable = object.controllable ?? false;
|
|
552
|
+
message.composeProject = object.composeProject ?? "";
|
|
553
|
+
message.composeService = object.composeService ?? "";
|
|
554
|
+
message.removable = object.removable ?? false;
|
|
555
|
+
return message;
|
|
556
|
+
},
|
|
557
|
+
};
|
|
558
|
+
function createBaseContainerHostStatus() {
|
|
559
|
+
return {
|
|
560
|
+
containers: [],
|
|
561
|
+
observedAt: undefined,
|
|
562
|
+
controlEnabled: false,
|
|
563
|
+
trigger: 0,
|
|
564
|
+
sequence: 0,
|
|
565
|
+
removeEnabled: false,
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
exports.ContainerHostStatus = {
|
|
569
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
570
|
+
for (const v of message.containers) {
|
|
571
|
+
exports.ContainerInfo.encode(v, writer.uint32(10).fork()).join();
|
|
572
|
+
}
|
|
573
|
+
if (message.observedAt !== undefined) {
|
|
574
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.observedAt), writer.uint32(18).fork()).join();
|
|
575
|
+
}
|
|
576
|
+
if (message.controlEnabled !== false) {
|
|
577
|
+
writer.uint32(24).bool(message.controlEnabled);
|
|
578
|
+
}
|
|
579
|
+
if (message.trigger !== 0) {
|
|
580
|
+
writer.uint32(32).int32(message.trigger);
|
|
581
|
+
}
|
|
582
|
+
if (message.sequence !== 0) {
|
|
583
|
+
writer.uint32(40).uint64(message.sequence);
|
|
584
|
+
}
|
|
585
|
+
if (message.removeEnabled !== false) {
|
|
586
|
+
writer.uint32(48).bool(message.removeEnabled);
|
|
587
|
+
}
|
|
588
|
+
return writer;
|
|
589
|
+
},
|
|
590
|
+
decode(input, length) {
|
|
591
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
592
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
593
|
+
const message = createBaseContainerHostStatus();
|
|
594
|
+
while (reader.pos < end) {
|
|
595
|
+
const tag = reader.uint32();
|
|
596
|
+
switch (tag >>> 3) {
|
|
597
|
+
case 1: {
|
|
598
|
+
if (tag !== 10) {
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
601
|
+
message.containers.push(exports.ContainerInfo.decode(reader, reader.uint32()));
|
|
602
|
+
continue;
|
|
603
|
+
}
|
|
604
|
+
case 2: {
|
|
605
|
+
if (tag !== 18) {
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
message.observedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
609
|
+
continue;
|
|
610
|
+
}
|
|
611
|
+
case 3: {
|
|
612
|
+
if (tag !== 24) {
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
message.controlEnabled = reader.bool();
|
|
616
|
+
continue;
|
|
617
|
+
}
|
|
618
|
+
case 4: {
|
|
619
|
+
if (tag !== 32) {
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
message.trigger = reader.int32();
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
case 5: {
|
|
626
|
+
if (tag !== 40) {
|
|
627
|
+
break;
|
|
628
|
+
}
|
|
629
|
+
message.sequence = longToNumber(reader.uint64());
|
|
630
|
+
continue;
|
|
631
|
+
}
|
|
632
|
+
case 6: {
|
|
633
|
+
if (tag !== 48) {
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
message.removeEnabled = reader.bool();
|
|
637
|
+
continue;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
641
|
+
break;
|
|
642
|
+
}
|
|
643
|
+
reader.skip(tag & 7);
|
|
644
|
+
}
|
|
645
|
+
return message;
|
|
646
|
+
},
|
|
647
|
+
fromJSON(object) {
|
|
648
|
+
return {
|
|
649
|
+
containers: globalThis.Array.isArray(object?.containers)
|
|
650
|
+
? object.containers.map((e) => exports.ContainerInfo.fromJSON(e))
|
|
651
|
+
: [],
|
|
652
|
+
observedAt: isSet(object.observedAt) ? fromJsonTimestamp(object.observedAt) : undefined,
|
|
653
|
+
controlEnabled: isSet(object.controlEnabled) ? globalThis.Boolean(object.controlEnabled) : false,
|
|
654
|
+
trigger: isSet(object.trigger) ? containerStatusTriggerFromJSON(object.trigger) : 0,
|
|
655
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
656
|
+
removeEnabled: isSet(object.removeEnabled) ? globalThis.Boolean(object.removeEnabled) : false,
|
|
657
|
+
};
|
|
658
|
+
},
|
|
659
|
+
toJSON(message) {
|
|
660
|
+
const obj = {};
|
|
661
|
+
if (message.containers?.length) {
|
|
662
|
+
obj.containers = message.containers.map((e) => exports.ContainerInfo.toJSON(e));
|
|
663
|
+
}
|
|
664
|
+
if (message.observedAt !== undefined) {
|
|
665
|
+
obj.observedAt = message.observedAt.toISOString();
|
|
666
|
+
}
|
|
667
|
+
if (message.controlEnabled !== false) {
|
|
668
|
+
obj.controlEnabled = message.controlEnabled;
|
|
669
|
+
}
|
|
670
|
+
if (message.trigger !== 0) {
|
|
671
|
+
obj.trigger = containerStatusTriggerToJSON(message.trigger);
|
|
672
|
+
}
|
|
673
|
+
if (message.sequence !== 0) {
|
|
674
|
+
obj.sequence = Math.round(message.sequence);
|
|
675
|
+
}
|
|
676
|
+
if (message.removeEnabled !== false) {
|
|
677
|
+
obj.removeEnabled = message.removeEnabled;
|
|
678
|
+
}
|
|
679
|
+
return obj;
|
|
680
|
+
},
|
|
681
|
+
create(base) {
|
|
682
|
+
return exports.ContainerHostStatus.fromPartial(base ?? {});
|
|
683
|
+
},
|
|
684
|
+
fromPartial(object) {
|
|
685
|
+
const message = createBaseContainerHostStatus();
|
|
686
|
+
message.containers = object.containers?.map((e) => exports.ContainerInfo.fromPartial(e)) || [];
|
|
687
|
+
message.observedAt = object.observedAt ?? undefined;
|
|
688
|
+
message.controlEnabled = object.controlEnabled ?? false;
|
|
689
|
+
message.trigger = object.trigger ?? 0;
|
|
690
|
+
message.sequence = object.sequence ?? 0;
|
|
691
|
+
message.removeEnabled = object.removeEnabled ?? false;
|
|
692
|
+
return message;
|
|
693
|
+
},
|
|
694
|
+
};
|
|
695
|
+
function createBaseContainerResourceUsage() {
|
|
696
|
+
return {
|
|
697
|
+
name: "",
|
|
698
|
+
id: "",
|
|
699
|
+
cpuLoadPct: undefined,
|
|
700
|
+
onlineCpus: undefined,
|
|
701
|
+
memoryUsedBytes: 0,
|
|
702
|
+
memoryLimitBytes: undefined,
|
|
703
|
+
memoryUsedPct: undefined,
|
|
704
|
+
networkRxBytes: undefined,
|
|
705
|
+
networkTxBytes: undefined,
|
|
706
|
+
networkRxBytesPerSecond: undefined,
|
|
707
|
+
networkTxBytesPerSecond: undefined,
|
|
708
|
+
blockReadBytes: undefined,
|
|
709
|
+
blockWriteBytes: undefined,
|
|
710
|
+
blockReadBytesPerSecond: undefined,
|
|
711
|
+
blockWriteBytesPerSecond: undefined,
|
|
712
|
+
pidsCurrent: 0,
|
|
713
|
+
pidsLimit: undefined,
|
|
714
|
+
cpuAllocationCores: undefined,
|
|
715
|
+
cpuShares: undefined,
|
|
716
|
+
cpusetCpus: "",
|
|
717
|
+
cpuThrottledPeriods: undefined,
|
|
718
|
+
cpuThrottledTimeNs: undefined,
|
|
719
|
+
sampleWindowS: undefined,
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
exports.ContainerResourceUsage = {
|
|
723
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
724
|
+
if (message.name !== "") {
|
|
725
|
+
writer.uint32(10).string(message.name);
|
|
726
|
+
}
|
|
727
|
+
if (message.id !== "") {
|
|
728
|
+
writer.uint32(18).string(message.id);
|
|
729
|
+
}
|
|
730
|
+
if (message.cpuLoadPct !== undefined) {
|
|
731
|
+
writer.uint32(25).double(message.cpuLoadPct);
|
|
732
|
+
}
|
|
733
|
+
if (message.onlineCpus !== undefined) {
|
|
734
|
+
writer.uint32(32).uint32(message.onlineCpus);
|
|
735
|
+
}
|
|
736
|
+
if (message.memoryUsedBytes !== 0) {
|
|
737
|
+
writer.uint32(40).int64(message.memoryUsedBytes);
|
|
738
|
+
}
|
|
739
|
+
if (message.memoryLimitBytes !== undefined) {
|
|
740
|
+
writer.uint32(48).int64(message.memoryLimitBytes);
|
|
741
|
+
}
|
|
742
|
+
if (message.memoryUsedPct !== undefined) {
|
|
743
|
+
writer.uint32(57).double(message.memoryUsedPct);
|
|
744
|
+
}
|
|
745
|
+
if (message.networkRxBytes !== undefined) {
|
|
746
|
+
writer.uint32(64).int64(message.networkRxBytes);
|
|
747
|
+
}
|
|
748
|
+
if (message.networkTxBytes !== undefined) {
|
|
749
|
+
writer.uint32(72).int64(message.networkTxBytes);
|
|
750
|
+
}
|
|
751
|
+
if (message.networkRxBytesPerSecond !== undefined) {
|
|
752
|
+
writer.uint32(81).double(message.networkRxBytesPerSecond);
|
|
753
|
+
}
|
|
754
|
+
if (message.networkTxBytesPerSecond !== undefined) {
|
|
755
|
+
writer.uint32(89).double(message.networkTxBytesPerSecond);
|
|
756
|
+
}
|
|
757
|
+
if (message.blockReadBytes !== undefined) {
|
|
758
|
+
writer.uint32(96).int64(message.blockReadBytes);
|
|
759
|
+
}
|
|
760
|
+
if (message.blockWriteBytes !== undefined) {
|
|
761
|
+
writer.uint32(104).int64(message.blockWriteBytes);
|
|
762
|
+
}
|
|
763
|
+
if (message.blockReadBytesPerSecond !== undefined) {
|
|
764
|
+
writer.uint32(113).double(message.blockReadBytesPerSecond);
|
|
765
|
+
}
|
|
766
|
+
if (message.blockWriteBytesPerSecond !== undefined) {
|
|
767
|
+
writer.uint32(121).double(message.blockWriteBytesPerSecond);
|
|
768
|
+
}
|
|
769
|
+
if (message.pidsCurrent !== 0) {
|
|
770
|
+
writer.uint32(128).uint32(message.pidsCurrent);
|
|
771
|
+
}
|
|
772
|
+
if (message.pidsLimit !== undefined) {
|
|
773
|
+
writer.uint32(136).uint32(message.pidsLimit);
|
|
774
|
+
}
|
|
775
|
+
if (message.cpuAllocationCores !== undefined) {
|
|
776
|
+
writer.uint32(145).double(message.cpuAllocationCores);
|
|
777
|
+
}
|
|
778
|
+
if (message.cpuShares !== undefined) {
|
|
779
|
+
writer.uint32(152).uint32(message.cpuShares);
|
|
780
|
+
}
|
|
781
|
+
if (message.cpusetCpus !== "") {
|
|
782
|
+
writer.uint32(162).string(message.cpusetCpus);
|
|
783
|
+
}
|
|
784
|
+
if (message.cpuThrottledPeriods !== undefined) {
|
|
785
|
+
writer.uint32(168).uint64(message.cpuThrottledPeriods);
|
|
786
|
+
}
|
|
787
|
+
if (message.cpuThrottledTimeNs !== undefined) {
|
|
788
|
+
writer.uint32(176).uint64(message.cpuThrottledTimeNs);
|
|
789
|
+
}
|
|
790
|
+
if (message.sampleWindowS !== undefined) {
|
|
791
|
+
writer.uint32(185).double(message.sampleWindowS);
|
|
792
|
+
}
|
|
793
|
+
return writer;
|
|
794
|
+
},
|
|
795
|
+
decode(input, length) {
|
|
796
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
797
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
798
|
+
const message = createBaseContainerResourceUsage();
|
|
799
|
+
while (reader.pos < end) {
|
|
800
|
+
const tag = reader.uint32();
|
|
801
|
+
switch (tag >>> 3) {
|
|
802
|
+
case 1: {
|
|
803
|
+
if (tag !== 10) {
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
message.name = reader.string();
|
|
807
|
+
continue;
|
|
808
|
+
}
|
|
809
|
+
case 2: {
|
|
810
|
+
if (tag !== 18) {
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
message.id = reader.string();
|
|
814
|
+
continue;
|
|
815
|
+
}
|
|
816
|
+
case 3: {
|
|
817
|
+
if (tag !== 25) {
|
|
818
|
+
break;
|
|
819
|
+
}
|
|
820
|
+
message.cpuLoadPct = reader.double();
|
|
821
|
+
continue;
|
|
822
|
+
}
|
|
823
|
+
case 4: {
|
|
824
|
+
if (tag !== 32) {
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
827
|
+
message.onlineCpus = reader.uint32();
|
|
828
|
+
continue;
|
|
829
|
+
}
|
|
830
|
+
case 5: {
|
|
831
|
+
if (tag !== 40) {
|
|
832
|
+
break;
|
|
833
|
+
}
|
|
834
|
+
message.memoryUsedBytes = longToNumber(reader.int64());
|
|
835
|
+
continue;
|
|
836
|
+
}
|
|
837
|
+
case 6: {
|
|
838
|
+
if (tag !== 48) {
|
|
839
|
+
break;
|
|
840
|
+
}
|
|
841
|
+
message.memoryLimitBytes = longToNumber(reader.int64());
|
|
842
|
+
continue;
|
|
843
|
+
}
|
|
844
|
+
case 7: {
|
|
845
|
+
if (tag !== 57) {
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
message.memoryUsedPct = reader.double();
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
case 8: {
|
|
852
|
+
if (tag !== 64) {
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
message.networkRxBytes = longToNumber(reader.int64());
|
|
856
|
+
continue;
|
|
857
|
+
}
|
|
858
|
+
case 9: {
|
|
859
|
+
if (tag !== 72) {
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
message.networkTxBytes = longToNumber(reader.int64());
|
|
863
|
+
continue;
|
|
864
|
+
}
|
|
865
|
+
case 10: {
|
|
866
|
+
if (tag !== 81) {
|
|
867
|
+
break;
|
|
868
|
+
}
|
|
869
|
+
message.networkRxBytesPerSecond = reader.double();
|
|
870
|
+
continue;
|
|
871
|
+
}
|
|
872
|
+
case 11: {
|
|
873
|
+
if (tag !== 89) {
|
|
874
|
+
break;
|
|
875
|
+
}
|
|
876
|
+
message.networkTxBytesPerSecond = reader.double();
|
|
877
|
+
continue;
|
|
878
|
+
}
|
|
879
|
+
case 12: {
|
|
880
|
+
if (tag !== 96) {
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
message.blockReadBytes = longToNumber(reader.int64());
|
|
884
|
+
continue;
|
|
885
|
+
}
|
|
886
|
+
case 13: {
|
|
887
|
+
if (tag !== 104) {
|
|
888
|
+
break;
|
|
889
|
+
}
|
|
890
|
+
message.blockWriteBytes = longToNumber(reader.int64());
|
|
891
|
+
continue;
|
|
892
|
+
}
|
|
893
|
+
case 14: {
|
|
894
|
+
if (tag !== 113) {
|
|
895
|
+
break;
|
|
896
|
+
}
|
|
897
|
+
message.blockReadBytesPerSecond = reader.double();
|
|
898
|
+
continue;
|
|
899
|
+
}
|
|
900
|
+
case 15: {
|
|
901
|
+
if (tag !== 121) {
|
|
902
|
+
break;
|
|
903
|
+
}
|
|
904
|
+
message.blockWriteBytesPerSecond = reader.double();
|
|
905
|
+
continue;
|
|
906
|
+
}
|
|
907
|
+
case 16: {
|
|
908
|
+
if (tag !== 128) {
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
message.pidsCurrent = reader.uint32();
|
|
912
|
+
continue;
|
|
913
|
+
}
|
|
914
|
+
case 17: {
|
|
915
|
+
if (tag !== 136) {
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
message.pidsLimit = reader.uint32();
|
|
919
|
+
continue;
|
|
920
|
+
}
|
|
921
|
+
case 18: {
|
|
922
|
+
if (tag !== 145) {
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
message.cpuAllocationCores = reader.double();
|
|
926
|
+
continue;
|
|
927
|
+
}
|
|
928
|
+
case 19: {
|
|
929
|
+
if (tag !== 152) {
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
message.cpuShares = reader.uint32();
|
|
933
|
+
continue;
|
|
934
|
+
}
|
|
935
|
+
case 20: {
|
|
936
|
+
if (tag !== 162) {
|
|
937
|
+
break;
|
|
938
|
+
}
|
|
939
|
+
message.cpusetCpus = reader.string();
|
|
940
|
+
continue;
|
|
941
|
+
}
|
|
942
|
+
case 21: {
|
|
943
|
+
if (tag !== 168) {
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
message.cpuThrottledPeriods = longToNumber(reader.uint64());
|
|
947
|
+
continue;
|
|
948
|
+
}
|
|
949
|
+
case 22: {
|
|
950
|
+
if (tag !== 176) {
|
|
951
|
+
break;
|
|
952
|
+
}
|
|
953
|
+
message.cpuThrottledTimeNs = longToNumber(reader.uint64());
|
|
954
|
+
continue;
|
|
955
|
+
}
|
|
956
|
+
case 23: {
|
|
957
|
+
if (tag !== 185) {
|
|
958
|
+
break;
|
|
959
|
+
}
|
|
960
|
+
message.sampleWindowS = reader.double();
|
|
961
|
+
continue;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
965
|
+
break;
|
|
966
|
+
}
|
|
967
|
+
reader.skip(tag & 7);
|
|
968
|
+
}
|
|
969
|
+
return message;
|
|
970
|
+
},
|
|
971
|
+
fromJSON(object) {
|
|
972
|
+
return {
|
|
973
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
974
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
975
|
+
cpuLoadPct: isSet(object.cpuLoadPct) ? globalThis.Number(object.cpuLoadPct) : undefined,
|
|
976
|
+
onlineCpus: isSet(object.onlineCpus) ? globalThis.Number(object.onlineCpus) : undefined,
|
|
977
|
+
memoryUsedBytes: isSet(object.memoryUsedBytes) ? globalThis.Number(object.memoryUsedBytes) : 0,
|
|
978
|
+
memoryLimitBytes: isSet(object.memoryLimitBytes) ? globalThis.Number(object.memoryLimitBytes) : undefined,
|
|
979
|
+
memoryUsedPct: isSet(object.memoryUsedPct) ? globalThis.Number(object.memoryUsedPct) : undefined,
|
|
980
|
+
networkRxBytes: isSet(object.networkRxBytes) ? globalThis.Number(object.networkRxBytes) : undefined,
|
|
981
|
+
networkTxBytes: isSet(object.networkTxBytes) ? globalThis.Number(object.networkTxBytes) : undefined,
|
|
982
|
+
networkRxBytesPerSecond: isSet(object.networkRxBytesPerSecond)
|
|
983
|
+
? globalThis.Number(object.networkRxBytesPerSecond)
|
|
984
|
+
: undefined,
|
|
985
|
+
networkTxBytesPerSecond: isSet(object.networkTxBytesPerSecond)
|
|
986
|
+
? globalThis.Number(object.networkTxBytesPerSecond)
|
|
987
|
+
: undefined,
|
|
988
|
+
blockReadBytes: isSet(object.blockReadBytes) ? globalThis.Number(object.blockReadBytes) : undefined,
|
|
989
|
+
blockWriteBytes: isSet(object.blockWriteBytes) ? globalThis.Number(object.blockWriteBytes) : undefined,
|
|
990
|
+
blockReadBytesPerSecond: isSet(object.blockReadBytesPerSecond)
|
|
991
|
+
? globalThis.Number(object.blockReadBytesPerSecond)
|
|
992
|
+
: undefined,
|
|
993
|
+
blockWriteBytesPerSecond: isSet(object.blockWriteBytesPerSecond)
|
|
994
|
+
? globalThis.Number(object.blockWriteBytesPerSecond)
|
|
995
|
+
: undefined,
|
|
996
|
+
pidsCurrent: isSet(object.pidsCurrent) ? globalThis.Number(object.pidsCurrent) : 0,
|
|
997
|
+
pidsLimit: isSet(object.pidsLimit) ? globalThis.Number(object.pidsLimit) : undefined,
|
|
998
|
+
cpuAllocationCores: isSet(object.cpuAllocationCores) ? globalThis.Number(object.cpuAllocationCores) : undefined,
|
|
999
|
+
cpuShares: isSet(object.cpuShares) ? globalThis.Number(object.cpuShares) : undefined,
|
|
1000
|
+
cpusetCpus: isSet(object.cpusetCpus) ? globalThis.String(object.cpusetCpus) : "",
|
|
1001
|
+
cpuThrottledPeriods: isSet(object.cpuThrottledPeriods)
|
|
1002
|
+
? globalThis.Number(object.cpuThrottledPeriods)
|
|
1003
|
+
: undefined,
|
|
1004
|
+
cpuThrottledTimeNs: isSet(object.cpuThrottledTimeNs) ? globalThis.Number(object.cpuThrottledTimeNs) : undefined,
|
|
1005
|
+
sampleWindowS: isSet(object.sampleWindowS) ? globalThis.Number(object.sampleWindowS) : undefined,
|
|
1006
|
+
};
|
|
1007
|
+
},
|
|
1008
|
+
toJSON(message) {
|
|
1009
|
+
const obj = {};
|
|
1010
|
+
if (message.name !== "") {
|
|
1011
|
+
obj.name = message.name;
|
|
1012
|
+
}
|
|
1013
|
+
if (message.id !== "") {
|
|
1014
|
+
obj.id = message.id;
|
|
1015
|
+
}
|
|
1016
|
+
if (message.cpuLoadPct !== undefined) {
|
|
1017
|
+
obj.cpuLoadPct = message.cpuLoadPct;
|
|
1018
|
+
}
|
|
1019
|
+
if (message.onlineCpus !== undefined) {
|
|
1020
|
+
obj.onlineCpus = Math.round(message.onlineCpus);
|
|
1021
|
+
}
|
|
1022
|
+
if (message.memoryUsedBytes !== 0) {
|
|
1023
|
+
obj.memoryUsedBytes = Math.round(message.memoryUsedBytes);
|
|
1024
|
+
}
|
|
1025
|
+
if (message.memoryLimitBytes !== undefined) {
|
|
1026
|
+
obj.memoryLimitBytes = Math.round(message.memoryLimitBytes);
|
|
1027
|
+
}
|
|
1028
|
+
if (message.memoryUsedPct !== undefined) {
|
|
1029
|
+
obj.memoryUsedPct = message.memoryUsedPct;
|
|
1030
|
+
}
|
|
1031
|
+
if (message.networkRxBytes !== undefined) {
|
|
1032
|
+
obj.networkRxBytes = Math.round(message.networkRxBytes);
|
|
1033
|
+
}
|
|
1034
|
+
if (message.networkTxBytes !== undefined) {
|
|
1035
|
+
obj.networkTxBytes = Math.round(message.networkTxBytes);
|
|
1036
|
+
}
|
|
1037
|
+
if (message.networkRxBytesPerSecond !== undefined) {
|
|
1038
|
+
obj.networkRxBytesPerSecond = message.networkRxBytesPerSecond;
|
|
1039
|
+
}
|
|
1040
|
+
if (message.networkTxBytesPerSecond !== undefined) {
|
|
1041
|
+
obj.networkTxBytesPerSecond = message.networkTxBytesPerSecond;
|
|
1042
|
+
}
|
|
1043
|
+
if (message.blockReadBytes !== undefined) {
|
|
1044
|
+
obj.blockReadBytes = Math.round(message.blockReadBytes);
|
|
1045
|
+
}
|
|
1046
|
+
if (message.blockWriteBytes !== undefined) {
|
|
1047
|
+
obj.blockWriteBytes = Math.round(message.blockWriteBytes);
|
|
1048
|
+
}
|
|
1049
|
+
if (message.blockReadBytesPerSecond !== undefined) {
|
|
1050
|
+
obj.blockReadBytesPerSecond = message.blockReadBytesPerSecond;
|
|
1051
|
+
}
|
|
1052
|
+
if (message.blockWriteBytesPerSecond !== undefined) {
|
|
1053
|
+
obj.blockWriteBytesPerSecond = message.blockWriteBytesPerSecond;
|
|
1054
|
+
}
|
|
1055
|
+
if (message.pidsCurrent !== 0) {
|
|
1056
|
+
obj.pidsCurrent = Math.round(message.pidsCurrent);
|
|
1057
|
+
}
|
|
1058
|
+
if (message.pidsLimit !== undefined) {
|
|
1059
|
+
obj.pidsLimit = Math.round(message.pidsLimit);
|
|
1060
|
+
}
|
|
1061
|
+
if (message.cpuAllocationCores !== undefined) {
|
|
1062
|
+
obj.cpuAllocationCores = message.cpuAllocationCores;
|
|
1063
|
+
}
|
|
1064
|
+
if (message.cpuShares !== undefined) {
|
|
1065
|
+
obj.cpuShares = Math.round(message.cpuShares);
|
|
1066
|
+
}
|
|
1067
|
+
if (message.cpusetCpus !== "") {
|
|
1068
|
+
obj.cpusetCpus = message.cpusetCpus;
|
|
1069
|
+
}
|
|
1070
|
+
if (message.cpuThrottledPeriods !== undefined) {
|
|
1071
|
+
obj.cpuThrottledPeriods = Math.round(message.cpuThrottledPeriods);
|
|
1072
|
+
}
|
|
1073
|
+
if (message.cpuThrottledTimeNs !== undefined) {
|
|
1074
|
+
obj.cpuThrottledTimeNs = Math.round(message.cpuThrottledTimeNs);
|
|
1075
|
+
}
|
|
1076
|
+
if (message.sampleWindowS !== undefined) {
|
|
1077
|
+
obj.sampleWindowS = message.sampleWindowS;
|
|
1078
|
+
}
|
|
1079
|
+
return obj;
|
|
1080
|
+
},
|
|
1081
|
+
create(base) {
|
|
1082
|
+
return exports.ContainerResourceUsage.fromPartial(base ?? {});
|
|
1083
|
+
},
|
|
1084
|
+
fromPartial(object) {
|
|
1085
|
+
const message = createBaseContainerResourceUsage();
|
|
1086
|
+
message.name = object.name ?? "";
|
|
1087
|
+
message.id = object.id ?? "";
|
|
1088
|
+
message.cpuLoadPct = object.cpuLoadPct ?? undefined;
|
|
1089
|
+
message.onlineCpus = object.onlineCpus ?? undefined;
|
|
1090
|
+
message.memoryUsedBytes = object.memoryUsedBytes ?? 0;
|
|
1091
|
+
message.memoryLimitBytes = object.memoryLimitBytes ?? undefined;
|
|
1092
|
+
message.memoryUsedPct = object.memoryUsedPct ?? undefined;
|
|
1093
|
+
message.networkRxBytes = object.networkRxBytes ?? undefined;
|
|
1094
|
+
message.networkTxBytes = object.networkTxBytes ?? undefined;
|
|
1095
|
+
message.networkRxBytesPerSecond = object.networkRxBytesPerSecond ?? undefined;
|
|
1096
|
+
message.networkTxBytesPerSecond = object.networkTxBytesPerSecond ?? undefined;
|
|
1097
|
+
message.blockReadBytes = object.blockReadBytes ?? undefined;
|
|
1098
|
+
message.blockWriteBytes = object.blockWriteBytes ?? undefined;
|
|
1099
|
+
message.blockReadBytesPerSecond = object.blockReadBytesPerSecond ?? undefined;
|
|
1100
|
+
message.blockWriteBytesPerSecond = object.blockWriteBytesPerSecond ?? undefined;
|
|
1101
|
+
message.pidsCurrent = object.pidsCurrent ?? 0;
|
|
1102
|
+
message.pidsLimit = object.pidsLimit ?? undefined;
|
|
1103
|
+
message.cpuAllocationCores = object.cpuAllocationCores ?? undefined;
|
|
1104
|
+
message.cpuShares = object.cpuShares ?? undefined;
|
|
1105
|
+
message.cpusetCpus = object.cpusetCpus ?? "";
|
|
1106
|
+
message.cpuThrottledPeriods = object.cpuThrottledPeriods ?? undefined;
|
|
1107
|
+
message.cpuThrottledTimeNs = object.cpuThrottledTimeNs ?? undefined;
|
|
1108
|
+
message.sampleWindowS = object.sampleWindowS ?? undefined;
|
|
1109
|
+
return message;
|
|
1110
|
+
},
|
|
1111
|
+
};
|
|
1112
|
+
function createBaseContainerHostStats() {
|
|
1113
|
+
return { containers: [], observedAt: undefined, sequence: 0 };
|
|
1114
|
+
}
|
|
1115
|
+
exports.ContainerHostStats = {
|
|
1116
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1117
|
+
for (const v of message.containers) {
|
|
1118
|
+
exports.ContainerResourceUsage.encode(v, writer.uint32(10).fork()).join();
|
|
1119
|
+
}
|
|
1120
|
+
if (message.observedAt !== undefined) {
|
|
1121
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.observedAt), writer.uint32(18).fork()).join();
|
|
1122
|
+
}
|
|
1123
|
+
if (message.sequence !== 0) {
|
|
1124
|
+
writer.uint32(24).uint64(message.sequence);
|
|
1125
|
+
}
|
|
1126
|
+
return writer;
|
|
1127
|
+
},
|
|
1128
|
+
decode(input, length) {
|
|
1129
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1130
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1131
|
+
const message = createBaseContainerHostStats();
|
|
1132
|
+
while (reader.pos < end) {
|
|
1133
|
+
const tag = reader.uint32();
|
|
1134
|
+
switch (tag >>> 3) {
|
|
1135
|
+
case 1: {
|
|
1136
|
+
if (tag !== 10) {
|
|
1137
|
+
break;
|
|
1138
|
+
}
|
|
1139
|
+
message.containers.push(exports.ContainerResourceUsage.decode(reader, reader.uint32()));
|
|
1140
|
+
continue;
|
|
1141
|
+
}
|
|
1142
|
+
case 2: {
|
|
1143
|
+
if (tag !== 18) {
|
|
1144
|
+
break;
|
|
1145
|
+
}
|
|
1146
|
+
message.observedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1147
|
+
continue;
|
|
1148
|
+
}
|
|
1149
|
+
case 3: {
|
|
1150
|
+
if (tag !== 24) {
|
|
1151
|
+
break;
|
|
1152
|
+
}
|
|
1153
|
+
message.sequence = longToNumber(reader.uint64());
|
|
1154
|
+
continue;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1158
|
+
break;
|
|
1159
|
+
}
|
|
1160
|
+
reader.skip(tag & 7);
|
|
1161
|
+
}
|
|
1162
|
+
return message;
|
|
1163
|
+
},
|
|
1164
|
+
fromJSON(object) {
|
|
1165
|
+
return {
|
|
1166
|
+
containers: globalThis.Array.isArray(object?.containers)
|
|
1167
|
+
? object.containers.map((e) => exports.ContainerResourceUsage.fromJSON(e))
|
|
1168
|
+
: [],
|
|
1169
|
+
observedAt: isSet(object.observedAt) ? fromJsonTimestamp(object.observedAt) : undefined,
|
|
1170
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
1171
|
+
};
|
|
1172
|
+
},
|
|
1173
|
+
toJSON(message) {
|
|
1174
|
+
const obj = {};
|
|
1175
|
+
if (message.containers?.length) {
|
|
1176
|
+
obj.containers = message.containers.map((e) => exports.ContainerResourceUsage.toJSON(e));
|
|
1177
|
+
}
|
|
1178
|
+
if (message.observedAt !== undefined) {
|
|
1179
|
+
obj.observedAt = message.observedAt.toISOString();
|
|
1180
|
+
}
|
|
1181
|
+
if (message.sequence !== 0) {
|
|
1182
|
+
obj.sequence = Math.round(message.sequence);
|
|
1183
|
+
}
|
|
1184
|
+
return obj;
|
|
1185
|
+
},
|
|
1186
|
+
create(base) {
|
|
1187
|
+
return exports.ContainerHostStats.fromPartial(base ?? {});
|
|
1188
|
+
},
|
|
1189
|
+
fromPartial(object) {
|
|
1190
|
+
const message = createBaseContainerHostStats();
|
|
1191
|
+
message.containers = object.containers?.map((e) => exports.ContainerResourceUsage.fromPartial(e)) || [];
|
|
1192
|
+
message.observedAt = object.observedAt ?? undefined;
|
|
1193
|
+
message.sequence = object.sequence ?? 0;
|
|
1194
|
+
return message;
|
|
1195
|
+
},
|
|
1196
|
+
};
|
|
1197
|
+
function toTimestamp(date) {
|
|
1198
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
1199
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
1200
|
+
return { seconds, nanos };
|
|
1201
|
+
}
|
|
1202
|
+
function fromTimestamp(t) {
|
|
1203
|
+
let millis = (t.seconds || 0) * 1000;
|
|
1204
|
+
millis += (t.nanos || 0) / 1000000;
|
|
1205
|
+
return new globalThis.Date(millis);
|
|
1206
|
+
}
|
|
1207
|
+
function fromJsonTimestamp(o) {
|
|
1208
|
+
if (o instanceof globalThis.Date) {
|
|
1209
|
+
return o;
|
|
1210
|
+
}
|
|
1211
|
+
else if (typeof o === "string") {
|
|
1212
|
+
return new globalThis.Date(o);
|
|
1213
|
+
}
|
|
1214
|
+
else {
|
|
1215
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
function longToNumber(int64) {
|
|
1219
|
+
const num = globalThis.Number(int64.toString());
|
|
1220
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1221
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1222
|
+
}
|
|
1223
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1224
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1225
|
+
}
|
|
1226
|
+
return num;
|
|
1227
|
+
}
|
|
1228
|
+
function isSet(value) {
|
|
1229
|
+
return value !== null && value !== undefined;
|
|
1230
|
+
}
|