@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,1053 @@
|
|
|
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: ContainerControl.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ContainerControlDefinition = exports.RemoveContainerResponse = exports.RemoveContainerRequest = exports.ContainerActionResponse = exports.RestartContainerRequest = exports.StopContainerRequest = exports.StartContainerRequest = exports.GetLogsResponse = exports.LogLine = exports.GetLogsRequest = exports.ListContainersResponse = exports.ListContainersRequest = exports.logStreamSelectorToJSON = exports.logStreamSelectorFromJSON = exports.LogStreamSelector = exports.logStreamToJSON = exports.logStreamFromJSON = exports.LogStream = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const ContainerHost_1 = require("./ContainerHost");
|
|
12
|
+
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
13
|
+
exports.protobufPackage = "keelson.interfaces.container_control";
|
|
14
|
+
/**
|
|
15
|
+
* Which stream one log line came from. UNSPECIFIED is the honest answer for a
|
|
16
|
+
* TTY-allocated container, whose streams are merged before the runtime sees them
|
|
17
|
+
* and cannot be separated after the fact.
|
|
18
|
+
*/
|
|
19
|
+
var LogStream;
|
|
20
|
+
(function (LogStream) {
|
|
21
|
+
LogStream[LogStream["LOG_STREAM_UNSPECIFIED"] = 0] = "LOG_STREAM_UNSPECIFIED";
|
|
22
|
+
LogStream[LogStream["LOG_STREAM_STDOUT"] = 1] = "LOG_STREAM_STDOUT";
|
|
23
|
+
LogStream[LogStream["LOG_STREAM_STDERR"] = 2] = "LOG_STREAM_STDERR";
|
|
24
|
+
LogStream[LogStream["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
25
|
+
})(LogStream || (exports.LogStream = LogStream = {}));
|
|
26
|
+
function logStreamFromJSON(object) {
|
|
27
|
+
switch (object) {
|
|
28
|
+
case 0:
|
|
29
|
+
case "LOG_STREAM_UNSPECIFIED":
|
|
30
|
+
return LogStream.LOG_STREAM_UNSPECIFIED;
|
|
31
|
+
case 1:
|
|
32
|
+
case "LOG_STREAM_STDOUT":
|
|
33
|
+
return LogStream.LOG_STREAM_STDOUT;
|
|
34
|
+
case 2:
|
|
35
|
+
case "LOG_STREAM_STDERR":
|
|
36
|
+
return LogStream.LOG_STREAM_STDERR;
|
|
37
|
+
case -1:
|
|
38
|
+
case "UNRECOGNIZED":
|
|
39
|
+
default:
|
|
40
|
+
return LogStream.UNRECOGNIZED;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.logStreamFromJSON = logStreamFromJSON;
|
|
44
|
+
function logStreamToJSON(object) {
|
|
45
|
+
switch (object) {
|
|
46
|
+
case LogStream.LOG_STREAM_UNSPECIFIED:
|
|
47
|
+
return "LOG_STREAM_UNSPECIFIED";
|
|
48
|
+
case LogStream.LOG_STREAM_STDOUT:
|
|
49
|
+
return "LOG_STREAM_STDOUT";
|
|
50
|
+
case LogStream.LOG_STREAM_STDERR:
|
|
51
|
+
return "LOG_STREAM_STDERR";
|
|
52
|
+
case LogStream.UNRECOGNIZED:
|
|
53
|
+
default:
|
|
54
|
+
return "UNRECOGNIZED";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.logStreamToJSON = logStreamToJSON;
|
|
58
|
+
/**
|
|
59
|
+
* Which streams a caller wants back. Separate from LogStream so the zero value
|
|
60
|
+
* can mean "both" on the request side without meaning "both" on a line.
|
|
61
|
+
*/
|
|
62
|
+
var LogStreamSelector;
|
|
63
|
+
(function (LogStreamSelector) {
|
|
64
|
+
/** LOG_STREAM_SELECTOR_UNSPECIFIED - both */
|
|
65
|
+
LogStreamSelector[LogStreamSelector["LOG_STREAM_SELECTOR_UNSPECIFIED"] = 0] = "LOG_STREAM_SELECTOR_UNSPECIFIED";
|
|
66
|
+
LogStreamSelector[LogStreamSelector["LOG_STREAM_SELECTOR_STDOUT"] = 1] = "LOG_STREAM_SELECTOR_STDOUT";
|
|
67
|
+
LogStreamSelector[LogStreamSelector["LOG_STREAM_SELECTOR_STDERR"] = 2] = "LOG_STREAM_SELECTOR_STDERR";
|
|
68
|
+
LogStreamSelector[LogStreamSelector["LOG_STREAM_SELECTOR_BOTH"] = 3] = "LOG_STREAM_SELECTOR_BOTH";
|
|
69
|
+
LogStreamSelector[LogStreamSelector["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
70
|
+
})(LogStreamSelector || (exports.LogStreamSelector = LogStreamSelector = {}));
|
|
71
|
+
function logStreamSelectorFromJSON(object) {
|
|
72
|
+
switch (object) {
|
|
73
|
+
case 0:
|
|
74
|
+
case "LOG_STREAM_SELECTOR_UNSPECIFIED":
|
|
75
|
+
return LogStreamSelector.LOG_STREAM_SELECTOR_UNSPECIFIED;
|
|
76
|
+
case 1:
|
|
77
|
+
case "LOG_STREAM_SELECTOR_STDOUT":
|
|
78
|
+
return LogStreamSelector.LOG_STREAM_SELECTOR_STDOUT;
|
|
79
|
+
case 2:
|
|
80
|
+
case "LOG_STREAM_SELECTOR_STDERR":
|
|
81
|
+
return LogStreamSelector.LOG_STREAM_SELECTOR_STDERR;
|
|
82
|
+
case 3:
|
|
83
|
+
case "LOG_STREAM_SELECTOR_BOTH":
|
|
84
|
+
return LogStreamSelector.LOG_STREAM_SELECTOR_BOTH;
|
|
85
|
+
case -1:
|
|
86
|
+
case "UNRECOGNIZED":
|
|
87
|
+
default:
|
|
88
|
+
return LogStreamSelector.UNRECOGNIZED;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.logStreamSelectorFromJSON = logStreamSelectorFromJSON;
|
|
92
|
+
function logStreamSelectorToJSON(object) {
|
|
93
|
+
switch (object) {
|
|
94
|
+
case LogStreamSelector.LOG_STREAM_SELECTOR_UNSPECIFIED:
|
|
95
|
+
return "LOG_STREAM_SELECTOR_UNSPECIFIED";
|
|
96
|
+
case LogStreamSelector.LOG_STREAM_SELECTOR_STDOUT:
|
|
97
|
+
return "LOG_STREAM_SELECTOR_STDOUT";
|
|
98
|
+
case LogStreamSelector.LOG_STREAM_SELECTOR_STDERR:
|
|
99
|
+
return "LOG_STREAM_SELECTOR_STDERR";
|
|
100
|
+
case LogStreamSelector.LOG_STREAM_SELECTOR_BOTH:
|
|
101
|
+
return "LOG_STREAM_SELECTOR_BOTH";
|
|
102
|
+
case LogStreamSelector.UNRECOGNIZED:
|
|
103
|
+
default:
|
|
104
|
+
return "UNRECOGNIZED";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.logStreamSelectorToJSON = logStreamSelectorToJSON;
|
|
108
|
+
function createBaseListContainersRequest() {
|
|
109
|
+
return { runningOnly: false, nameGlob: "" };
|
|
110
|
+
}
|
|
111
|
+
exports.ListContainersRequest = {
|
|
112
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
113
|
+
if (message.runningOnly !== false) {
|
|
114
|
+
writer.uint32(8).bool(message.runningOnly);
|
|
115
|
+
}
|
|
116
|
+
if (message.nameGlob !== "") {
|
|
117
|
+
writer.uint32(18).string(message.nameGlob);
|
|
118
|
+
}
|
|
119
|
+
return writer;
|
|
120
|
+
},
|
|
121
|
+
decode(input, length) {
|
|
122
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
123
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
124
|
+
const message = createBaseListContainersRequest();
|
|
125
|
+
while (reader.pos < end) {
|
|
126
|
+
const tag = reader.uint32();
|
|
127
|
+
switch (tag >>> 3) {
|
|
128
|
+
case 1: {
|
|
129
|
+
if (tag !== 8) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
message.runningOnly = reader.bool();
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
case 2: {
|
|
136
|
+
if (tag !== 18) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
message.nameGlob = reader.string();
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
reader.skip(tag & 7);
|
|
147
|
+
}
|
|
148
|
+
return message;
|
|
149
|
+
},
|
|
150
|
+
fromJSON(object) {
|
|
151
|
+
return {
|
|
152
|
+
runningOnly: isSet(object.runningOnly) ? globalThis.Boolean(object.runningOnly) : false,
|
|
153
|
+
nameGlob: isSet(object.nameGlob) ? globalThis.String(object.nameGlob) : "",
|
|
154
|
+
};
|
|
155
|
+
},
|
|
156
|
+
toJSON(message) {
|
|
157
|
+
const obj = {};
|
|
158
|
+
if (message.runningOnly !== false) {
|
|
159
|
+
obj.runningOnly = message.runningOnly;
|
|
160
|
+
}
|
|
161
|
+
if (message.nameGlob !== "") {
|
|
162
|
+
obj.nameGlob = message.nameGlob;
|
|
163
|
+
}
|
|
164
|
+
return obj;
|
|
165
|
+
},
|
|
166
|
+
create(base) {
|
|
167
|
+
return exports.ListContainersRequest.fromPartial(base ?? {});
|
|
168
|
+
},
|
|
169
|
+
fromPartial(object) {
|
|
170
|
+
const message = createBaseListContainersRequest();
|
|
171
|
+
message.runningOnly = object.runningOnly ?? false;
|
|
172
|
+
message.nameGlob = object.nameGlob ?? "";
|
|
173
|
+
return message;
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
function createBaseListContainersResponse() {
|
|
177
|
+
return { containers: [], observedAt: undefined, controlEnabled: false, removeEnabled: false };
|
|
178
|
+
}
|
|
179
|
+
exports.ListContainersResponse = {
|
|
180
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
181
|
+
for (const v of message.containers) {
|
|
182
|
+
ContainerHost_1.ContainerInfo.encode(v, writer.uint32(10).fork()).join();
|
|
183
|
+
}
|
|
184
|
+
if (message.observedAt !== undefined) {
|
|
185
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.observedAt), writer.uint32(18).fork()).join();
|
|
186
|
+
}
|
|
187
|
+
if (message.controlEnabled !== false) {
|
|
188
|
+
writer.uint32(24).bool(message.controlEnabled);
|
|
189
|
+
}
|
|
190
|
+
if (message.removeEnabled !== false) {
|
|
191
|
+
writer.uint32(32).bool(message.removeEnabled);
|
|
192
|
+
}
|
|
193
|
+
return writer;
|
|
194
|
+
},
|
|
195
|
+
decode(input, length) {
|
|
196
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
197
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
198
|
+
const message = createBaseListContainersResponse();
|
|
199
|
+
while (reader.pos < end) {
|
|
200
|
+
const tag = reader.uint32();
|
|
201
|
+
switch (tag >>> 3) {
|
|
202
|
+
case 1: {
|
|
203
|
+
if (tag !== 10) {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
message.containers.push(ContainerHost_1.ContainerInfo.decode(reader, reader.uint32()));
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
case 2: {
|
|
210
|
+
if (tag !== 18) {
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
message.observedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
case 3: {
|
|
217
|
+
if (tag !== 24) {
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
message.controlEnabled = reader.bool();
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
case 4: {
|
|
224
|
+
if (tag !== 32) {
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
message.removeEnabled = reader.bool();
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
reader.skip(tag & 7);
|
|
235
|
+
}
|
|
236
|
+
return message;
|
|
237
|
+
},
|
|
238
|
+
fromJSON(object) {
|
|
239
|
+
return {
|
|
240
|
+
containers: globalThis.Array.isArray(object?.containers)
|
|
241
|
+
? object.containers.map((e) => ContainerHost_1.ContainerInfo.fromJSON(e))
|
|
242
|
+
: [],
|
|
243
|
+
observedAt: isSet(object.observedAt) ? fromJsonTimestamp(object.observedAt) : undefined,
|
|
244
|
+
controlEnabled: isSet(object.controlEnabled) ? globalThis.Boolean(object.controlEnabled) : false,
|
|
245
|
+
removeEnabled: isSet(object.removeEnabled) ? globalThis.Boolean(object.removeEnabled) : false,
|
|
246
|
+
};
|
|
247
|
+
},
|
|
248
|
+
toJSON(message) {
|
|
249
|
+
const obj = {};
|
|
250
|
+
if (message.containers?.length) {
|
|
251
|
+
obj.containers = message.containers.map((e) => ContainerHost_1.ContainerInfo.toJSON(e));
|
|
252
|
+
}
|
|
253
|
+
if (message.observedAt !== undefined) {
|
|
254
|
+
obj.observedAt = message.observedAt.toISOString();
|
|
255
|
+
}
|
|
256
|
+
if (message.controlEnabled !== false) {
|
|
257
|
+
obj.controlEnabled = message.controlEnabled;
|
|
258
|
+
}
|
|
259
|
+
if (message.removeEnabled !== false) {
|
|
260
|
+
obj.removeEnabled = message.removeEnabled;
|
|
261
|
+
}
|
|
262
|
+
return obj;
|
|
263
|
+
},
|
|
264
|
+
create(base) {
|
|
265
|
+
return exports.ListContainersResponse.fromPartial(base ?? {});
|
|
266
|
+
},
|
|
267
|
+
fromPartial(object) {
|
|
268
|
+
const message = createBaseListContainersResponse();
|
|
269
|
+
message.containers = object.containers?.map((e) => ContainerHost_1.ContainerInfo.fromPartial(e)) || [];
|
|
270
|
+
message.observedAt = object.observedAt ?? undefined;
|
|
271
|
+
message.controlEnabled = object.controlEnabled ?? false;
|
|
272
|
+
message.removeEnabled = object.removeEnabled ?? false;
|
|
273
|
+
return message;
|
|
274
|
+
},
|
|
275
|
+
};
|
|
276
|
+
function createBaseGetLogsRequest() {
|
|
277
|
+
return { name: "", tailLines: 0, since: undefined, stream: 0 };
|
|
278
|
+
}
|
|
279
|
+
exports.GetLogsRequest = {
|
|
280
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
281
|
+
if (message.name !== "") {
|
|
282
|
+
writer.uint32(10).string(message.name);
|
|
283
|
+
}
|
|
284
|
+
if (message.tailLines !== 0) {
|
|
285
|
+
writer.uint32(16).uint32(message.tailLines);
|
|
286
|
+
}
|
|
287
|
+
if (message.since !== undefined) {
|
|
288
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.since), writer.uint32(26).fork()).join();
|
|
289
|
+
}
|
|
290
|
+
if (message.stream !== 0) {
|
|
291
|
+
writer.uint32(32).int32(message.stream);
|
|
292
|
+
}
|
|
293
|
+
return writer;
|
|
294
|
+
},
|
|
295
|
+
decode(input, length) {
|
|
296
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
297
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
298
|
+
const message = createBaseGetLogsRequest();
|
|
299
|
+
while (reader.pos < end) {
|
|
300
|
+
const tag = reader.uint32();
|
|
301
|
+
switch (tag >>> 3) {
|
|
302
|
+
case 1: {
|
|
303
|
+
if (tag !== 10) {
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
message.name = reader.string();
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
case 2: {
|
|
310
|
+
if (tag !== 16) {
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
message.tailLines = reader.uint32();
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
case 3: {
|
|
317
|
+
if (tag !== 26) {
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
message.since = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
case 4: {
|
|
324
|
+
if (tag !== 32) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
message.stream = reader.int32();
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
reader.skip(tag & 7);
|
|
335
|
+
}
|
|
336
|
+
return message;
|
|
337
|
+
},
|
|
338
|
+
fromJSON(object) {
|
|
339
|
+
return {
|
|
340
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
341
|
+
tailLines: isSet(object.tailLines) ? globalThis.Number(object.tailLines) : 0,
|
|
342
|
+
since: isSet(object.since) ? fromJsonTimestamp(object.since) : undefined,
|
|
343
|
+
stream: isSet(object.stream) ? logStreamSelectorFromJSON(object.stream) : 0,
|
|
344
|
+
};
|
|
345
|
+
},
|
|
346
|
+
toJSON(message) {
|
|
347
|
+
const obj = {};
|
|
348
|
+
if (message.name !== "") {
|
|
349
|
+
obj.name = message.name;
|
|
350
|
+
}
|
|
351
|
+
if (message.tailLines !== 0) {
|
|
352
|
+
obj.tailLines = Math.round(message.tailLines);
|
|
353
|
+
}
|
|
354
|
+
if (message.since !== undefined) {
|
|
355
|
+
obj.since = message.since.toISOString();
|
|
356
|
+
}
|
|
357
|
+
if (message.stream !== 0) {
|
|
358
|
+
obj.stream = logStreamSelectorToJSON(message.stream);
|
|
359
|
+
}
|
|
360
|
+
return obj;
|
|
361
|
+
},
|
|
362
|
+
create(base) {
|
|
363
|
+
return exports.GetLogsRequest.fromPartial(base ?? {});
|
|
364
|
+
},
|
|
365
|
+
fromPartial(object) {
|
|
366
|
+
const message = createBaseGetLogsRequest();
|
|
367
|
+
message.name = object.name ?? "";
|
|
368
|
+
message.tailLines = object.tailLines ?? 0;
|
|
369
|
+
message.since = object.since ?? undefined;
|
|
370
|
+
message.stream = object.stream ?? 0;
|
|
371
|
+
return message;
|
|
372
|
+
},
|
|
373
|
+
};
|
|
374
|
+
function createBaseLogLine() {
|
|
375
|
+
return { time: undefined, stream: 0, text: "" };
|
|
376
|
+
}
|
|
377
|
+
exports.LogLine = {
|
|
378
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
379
|
+
if (message.time !== undefined) {
|
|
380
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).join();
|
|
381
|
+
}
|
|
382
|
+
if (message.stream !== 0) {
|
|
383
|
+
writer.uint32(16).int32(message.stream);
|
|
384
|
+
}
|
|
385
|
+
if (message.text !== "") {
|
|
386
|
+
writer.uint32(26).string(message.text);
|
|
387
|
+
}
|
|
388
|
+
return writer;
|
|
389
|
+
},
|
|
390
|
+
decode(input, length) {
|
|
391
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
392
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
393
|
+
const message = createBaseLogLine();
|
|
394
|
+
while (reader.pos < end) {
|
|
395
|
+
const tag = reader.uint32();
|
|
396
|
+
switch (tag >>> 3) {
|
|
397
|
+
case 1: {
|
|
398
|
+
if (tag !== 10) {
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
message.time = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
case 2: {
|
|
405
|
+
if (tag !== 16) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
message.stream = reader.int32();
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
case 3: {
|
|
412
|
+
if (tag !== 26) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
message.text = reader.string();
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
reader.skip(tag & 7);
|
|
423
|
+
}
|
|
424
|
+
return message;
|
|
425
|
+
},
|
|
426
|
+
fromJSON(object) {
|
|
427
|
+
return {
|
|
428
|
+
time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,
|
|
429
|
+
stream: isSet(object.stream) ? logStreamFromJSON(object.stream) : 0,
|
|
430
|
+
text: isSet(object.text) ? globalThis.String(object.text) : "",
|
|
431
|
+
};
|
|
432
|
+
},
|
|
433
|
+
toJSON(message) {
|
|
434
|
+
const obj = {};
|
|
435
|
+
if (message.time !== undefined) {
|
|
436
|
+
obj.time = message.time.toISOString();
|
|
437
|
+
}
|
|
438
|
+
if (message.stream !== 0) {
|
|
439
|
+
obj.stream = logStreamToJSON(message.stream);
|
|
440
|
+
}
|
|
441
|
+
if (message.text !== "") {
|
|
442
|
+
obj.text = message.text;
|
|
443
|
+
}
|
|
444
|
+
return obj;
|
|
445
|
+
},
|
|
446
|
+
create(base) {
|
|
447
|
+
return exports.LogLine.fromPartial(base ?? {});
|
|
448
|
+
},
|
|
449
|
+
fromPartial(object) {
|
|
450
|
+
const message = createBaseLogLine();
|
|
451
|
+
message.time = object.time ?? undefined;
|
|
452
|
+
message.stream = object.stream ?? 0;
|
|
453
|
+
message.text = object.text ?? "";
|
|
454
|
+
return message;
|
|
455
|
+
},
|
|
456
|
+
};
|
|
457
|
+
function createBaseGetLogsResponse() {
|
|
458
|
+
return { name: "", id: "", lines: [], truncated: false, tailLines: 0 };
|
|
459
|
+
}
|
|
460
|
+
exports.GetLogsResponse = {
|
|
461
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
462
|
+
if (message.name !== "") {
|
|
463
|
+
writer.uint32(10).string(message.name);
|
|
464
|
+
}
|
|
465
|
+
if (message.id !== "") {
|
|
466
|
+
writer.uint32(18).string(message.id);
|
|
467
|
+
}
|
|
468
|
+
for (const v of message.lines) {
|
|
469
|
+
exports.LogLine.encode(v, writer.uint32(26).fork()).join();
|
|
470
|
+
}
|
|
471
|
+
if (message.truncated !== false) {
|
|
472
|
+
writer.uint32(32).bool(message.truncated);
|
|
473
|
+
}
|
|
474
|
+
if (message.tailLines !== 0) {
|
|
475
|
+
writer.uint32(40).uint32(message.tailLines);
|
|
476
|
+
}
|
|
477
|
+
return writer;
|
|
478
|
+
},
|
|
479
|
+
decode(input, length) {
|
|
480
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
481
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
482
|
+
const message = createBaseGetLogsResponse();
|
|
483
|
+
while (reader.pos < end) {
|
|
484
|
+
const tag = reader.uint32();
|
|
485
|
+
switch (tag >>> 3) {
|
|
486
|
+
case 1: {
|
|
487
|
+
if (tag !== 10) {
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
message.name = reader.string();
|
|
491
|
+
continue;
|
|
492
|
+
}
|
|
493
|
+
case 2: {
|
|
494
|
+
if (tag !== 18) {
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
message.id = reader.string();
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
case 3: {
|
|
501
|
+
if (tag !== 26) {
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
message.lines.push(exports.LogLine.decode(reader, reader.uint32()));
|
|
505
|
+
continue;
|
|
506
|
+
}
|
|
507
|
+
case 4: {
|
|
508
|
+
if (tag !== 32) {
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
message.truncated = reader.bool();
|
|
512
|
+
continue;
|
|
513
|
+
}
|
|
514
|
+
case 5: {
|
|
515
|
+
if (tag !== 40) {
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
message.tailLines = reader.uint32();
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
reader.skip(tag & 7);
|
|
526
|
+
}
|
|
527
|
+
return message;
|
|
528
|
+
},
|
|
529
|
+
fromJSON(object) {
|
|
530
|
+
return {
|
|
531
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
532
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
533
|
+
lines: globalThis.Array.isArray(object?.lines) ? object.lines.map((e) => exports.LogLine.fromJSON(e)) : [],
|
|
534
|
+
truncated: isSet(object.truncated) ? globalThis.Boolean(object.truncated) : false,
|
|
535
|
+
tailLines: isSet(object.tailLines) ? globalThis.Number(object.tailLines) : 0,
|
|
536
|
+
};
|
|
537
|
+
},
|
|
538
|
+
toJSON(message) {
|
|
539
|
+
const obj = {};
|
|
540
|
+
if (message.name !== "") {
|
|
541
|
+
obj.name = message.name;
|
|
542
|
+
}
|
|
543
|
+
if (message.id !== "") {
|
|
544
|
+
obj.id = message.id;
|
|
545
|
+
}
|
|
546
|
+
if (message.lines?.length) {
|
|
547
|
+
obj.lines = message.lines.map((e) => exports.LogLine.toJSON(e));
|
|
548
|
+
}
|
|
549
|
+
if (message.truncated !== false) {
|
|
550
|
+
obj.truncated = message.truncated;
|
|
551
|
+
}
|
|
552
|
+
if (message.tailLines !== 0) {
|
|
553
|
+
obj.tailLines = Math.round(message.tailLines);
|
|
554
|
+
}
|
|
555
|
+
return obj;
|
|
556
|
+
},
|
|
557
|
+
create(base) {
|
|
558
|
+
return exports.GetLogsResponse.fromPartial(base ?? {});
|
|
559
|
+
},
|
|
560
|
+
fromPartial(object) {
|
|
561
|
+
const message = createBaseGetLogsResponse();
|
|
562
|
+
message.name = object.name ?? "";
|
|
563
|
+
message.id = object.id ?? "";
|
|
564
|
+
message.lines = object.lines?.map((e) => exports.LogLine.fromPartial(e)) || [];
|
|
565
|
+
message.truncated = object.truncated ?? false;
|
|
566
|
+
message.tailLines = object.tailLines ?? 0;
|
|
567
|
+
return message;
|
|
568
|
+
},
|
|
569
|
+
};
|
|
570
|
+
function createBaseStartContainerRequest() {
|
|
571
|
+
return { name: "" };
|
|
572
|
+
}
|
|
573
|
+
exports.StartContainerRequest = {
|
|
574
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
575
|
+
if (message.name !== "") {
|
|
576
|
+
writer.uint32(10).string(message.name);
|
|
577
|
+
}
|
|
578
|
+
return writer;
|
|
579
|
+
},
|
|
580
|
+
decode(input, length) {
|
|
581
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
582
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
583
|
+
const message = createBaseStartContainerRequest();
|
|
584
|
+
while (reader.pos < end) {
|
|
585
|
+
const tag = reader.uint32();
|
|
586
|
+
switch (tag >>> 3) {
|
|
587
|
+
case 1: {
|
|
588
|
+
if (tag !== 10) {
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
message.name = reader.string();
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
reader.skip(tag & 7);
|
|
599
|
+
}
|
|
600
|
+
return message;
|
|
601
|
+
},
|
|
602
|
+
fromJSON(object) {
|
|
603
|
+
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
|
|
604
|
+
},
|
|
605
|
+
toJSON(message) {
|
|
606
|
+
const obj = {};
|
|
607
|
+
if (message.name !== "") {
|
|
608
|
+
obj.name = message.name;
|
|
609
|
+
}
|
|
610
|
+
return obj;
|
|
611
|
+
},
|
|
612
|
+
create(base) {
|
|
613
|
+
return exports.StartContainerRequest.fromPartial(base ?? {});
|
|
614
|
+
},
|
|
615
|
+
fromPartial(object) {
|
|
616
|
+
const message = createBaseStartContainerRequest();
|
|
617
|
+
message.name = object.name ?? "";
|
|
618
|
+
return message;
|
|
619
|
+
},
|
|
620
|
+
};
|
|
621
|
+
function createBaseStopContainerRequest() {
|
|
622
|
+
return { name: "", timeoutS: 0 };
|
|
623
|
+
}
|
|
624
|
+
exports.StopContainerRequest = {
|
|
625
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
626
|
+
if (message.name !== "") {
|
|
627
|
+
writer.uint32(10).string(message.name);
|
|
628
|
+
}
|
|
629
|
+
if (message.timeoutS !== 0) {
|
|
630
|
+
writer.uint32(16).uint32(message.timeoutS);
|
|
631
|
+
}
|
|
632
|
+
return writer;
|
|
633
|
+
},
|
|
634
|
+
decode(input, length) {
|
|
635
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
636
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
637
|
+
const message = createBaseStopContainerRequest();
|
|
638
|
+
while (reader.pos < end) {
|
|
639
|
+
const tag = reader.uint32();
|
|
640
|
+
switch (tag >>> 3) {
|
|
641
|
+
case 1: {
|
|
642
|
+
if (tag !== 10) {
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
message.name = reader.string();
|
|
646
|
+
continue;
|
|
647
|
+
}
|
|
648
|
+
case 2: {
|
|
649
|
+
if (tag !== 16) {
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
message.timeoutS = reader.uint32();
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
reader.skip(tag & 7);
|
|
660
|
+
}
|
|
661
|
+
return message;
|
|
662
|
+
},
|
|
663
|
+
fromJSON(object) {
|
|
664
|
+
return {
|
|
665
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
666
|
+
timeoutS: isSet(object.timeoutS) ? globalThis.Number(object.timeoutS) : 0,
|
|
667
|
+
};
|
|
668
|
+
},
|
|
669
|
+
toJSON(message) {
|
|
670
|
+
const obj = {};
|
|
671
|
+
if (message.name !== "") {
|
|
672
|
+
obj.name = message.name;
|
|
673
|
+
}
|
|
674
|
+
if (message.timeoutS !== 0) {
|
|
675
|
+
obj.timeoutS = Math.round(message.timeoutS);
|
|
676
|
+
}
|
|
677
|
+
return obj;
|
|
678
|
+
},
|
|
679
|
+
create(base) {
|
|
680
|
+
return exports.StopContainerRequest.fromPartial(base ?? {});
|
|
681
|
+
},
|
|
682
|
+
fromPartial(object) {
|
|
683
|
+
const message = createBaseStopContainerRequest();
|
|
684
|
+
message.name = object.name ?? "";
|
|
685
|
+
message.timeoutS = object.timeoutS ?? 0;
|
|
686
|
+
return message;
|
|
687
|
+
},
|
|
688
|
+
};
|
|
689
|
+
function createBaseRestartContainerRequest() {
|
|
690
|
+
return { name: "", timeoutS: 0 };
|
|
691
|
+
}
|
|
692
|
+
exports.RestartContainerRequest = {
|
|
693
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
694
|
+
if (message.name !== "") {
|
|
695
|
+
writer.uint32(10).string(message.name);
|
|
696
|
+
}
|
|
697
|
+
if (message.timeoutS !== 0) {
|
|
698
|
+
writer.uint32(16).uint32(message.timeoutS);
|
|
699
|
+
}
|
|
700
|
+
return writer;
|
|
701
|
+
},
|
|
702
|
+
decode(input, length) {
|
|
703
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
704
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
705
|
+
const message = createBaseRestartContainerRequest();
|
|
706
|
+
while (reader.pos < end) {
|
|
707
|
+
const tag = reader.uint32();
|
|
708
|
+
switch (tag >>> 3) {
|
|
709
|
+
case 1: {
|
|
710
|
+
if (tag !== 10) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
message.name = reader.string();
|
|
714
|
+
continue;
|
|
715
|
+
}
|
|
716
|
+
case 2: {
|
|
717
|
+
if (tag !== 16) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
message.timeoutS = reader.uint32();
|
|
721
|
+
continue;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
725
|
+
break;
|
|
726
|
+
}
|
|
727
|
+
reader.skip(tag & 7);
|
|
728
|
+
}
|
|
729
|
+
return message;
|
|
730
|
+
},
|
|
731
|
+
fromJSON(object) {
|
|
732
|
+
return {
|
|
733
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
734
|
+
timeoutS: isSet(object.timeoutS) ? globalThis.Number(object.timeoutS) : 0,
|
|
735
|
+
};
|
|
736
|
+
},
|
|
737
|
+
toJSON(message) {
|
|
738
|
+
const obj = {};
|
|
739
|
+
if (message.name !== "") {
|
|
740
|
+
obj.name = message.name;
|
|
741
|
+
}
|
|
742
|
+
if (message.timeoutS !== 0) {
|
|
743
|
+
obj.timeoutS = Math.round(message.timeoutS);
|
|
744
|
+
}
|
|
745
|
+
return obj;
|
|
746
|
+
},
|
|
747
|
+
create(base) {
|
|
748
|
+
return exports.RestartContainerRequest.fromPartial(base ?? {});
|
|
749
|
+
},
|
|
750
|
+
fromPartial(object) {
|
|
751
|
+
const message = createBaseRestartContainerRequest();
|
|
752
|
+
message.name = object.name ?? "";
|
|
753
|
+
message.timeoutS = object.timeoutS ?? 0;
|
|
754
|
+
return message;
|
|
755
|
+
},
|
|
756
|
+
};
|
|
757
|
+
function createBaseContainerActionResponse() {
|
|
758
|
+
return { container: undefined };
|
|
759
|
+
}
|
|
760
|
+
exports.ContainerActionResponse = {
|
|
761
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
762
|
+
if (message.container !== undefined) {
|
|
763
|
+
ContainerHost_1.ContainerInfo.encode(message.container, writer.uint32(10).fork()).join();
|
|
764
|
+
}
|
|
765
|
+
return writer;
|
|
766
|
+
},
|
|
767
|
+
decode(input, length) {
|
|
768
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
769
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
770
|
+
const message = createBaseContainerActionResponse();
|
|
771
|
+
while (reader.pos < end) {
|
|
772
|
+
const tag = reader.uint32();
|
|
773
|
+
switch (tag >>> 3) {
|
|
774
|
+
case 1: {
|
|
775
|
+
if (tag !== 10) {
|
|
776
|
+
break;
|
|
777
|
+
}
|
|
778
|
+
message.container = ContainerHost_1.ContainerInfo.decode(reader, reader.uint32());
|
|
779
|
+
continue;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
reader.skip(tag & 7);
|
|
786
|
+
}
|
|
787
|
+
return message;
|
|
788
|
+
},
|
|
789
|
+
fromJSON(object) {
|
|
790
|
+
return { container: isSet(object.container) ? ContainerHost_1.ContainerInfo.fromJSON(object.container) : undefined };
|
|
791
|
+
},
|
|
792
|
+
toJSON(message) {
|
|
793
|
+
const obj = {};
|
|
794
|
+
if (message.container !== undefined) {
|
|
795
|
+
obj.container = ContainerHost_1.ContainerInfo.toJSON(message.container);
|
|
796
|
+
}
|
|
797
|
+
return obj;
|
|
798
|
+
},
|
|
799
|
+
create(base) {
|
|
800
|
+
return exports.ContainerActionResponse.fromPartial(base ?? {});
|
|
801
|
+
},
|
|
802
|
+
fromPartial(object) {
|
|
803
|
+
const message = createBaseContainerActionResponse();
|
|
804
|
+
message.container = (object.container !== undefined && object.container !== null)
|
|
805
|
+
? ContainerHost_1.ContainerInfo.fromPartial(object.container)
|
|
806
|
+
: undefined;
|
|
807
|
+
return message;
|
|
808
|
+
},
|
|
809
|
+
};
|
|
810
|
+
function createBaseRemoveContainerRequest() {
|
|
811
|
+
return { name: "", force: false, removeVolumes: false };
|
|
812
|
+
}
|
|
813
|
+
exports.RemoveContainerRequest = {
|
|
814
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
815
|
+
if (message.name !== "") {
|
|
816
|
+
writer.uint32(10).string(message.name);
|
|
817
|
+
}
|
|
818
|
+
if (message.force !== false) {
|
|
819
|
+
writer.uint32(16).bool(message.force);
|
|
820
|
+
}
|
|
821
|
+
if (message.removeVolumes !== false) {
|
|
822
|
+
writer.uint32(24).bool(message.removeVolumes);
|
|
823
|
+
}
|
|
824
|
+
return writer;
|
|
825
|
+
},
|
|
826
|
+
decode(input, length) {
|
|
827
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
828
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
829
|
+
const message = createBaseRemoveContainerRequest();
|
|
830
|
+
while (reader.pos < end) {
|
|
831
|
+
const tag = reader.uint32();
|
|
832
|
+
switch (tag >>> 3) {
|
|
833
|
+
case 1: {
|
|
834
|
+
if (tag !== 10) {
|
|
835
|
+
break;
|
|
836
|
+
}
|
|
837
|
+
message.name = reader.string();
|
|
838
|
+
continue;
|
|
839
|
+
}
|
|
840
|
+
case 2: {
|
|
841
|
+
if (tag !== 16) {
|
|
842
|
+
break;
|
|
843
|
+
}
|
|
844
|
+
message.force = reader.bool();
|
|
845
|
+
continue;
|
|
846
|
+
}
|
|
847
|
+
case 3: {
|
|
848
|
+
if (tag !== 24) {
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
message.removeVolumes = reader.bool();
|
|
852
|
+
continue;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
856
|
+
break;
|
|
857
|
+
}
|
|
858
|
+
reader.skip(tag & 7);
|
|
859
|
+
}
|
|
860
|
+
return message;
|
|
861
|
+
},
|
|
862
|
+
fromJSON(object) {
|
|
863
|
+
return {
|
|
864
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
865
|
+
force: isSet(object.force) ? globalThis.Boolean(object.force) : false,
|
|
866
|
+
removeVolumes: isSet(object.removeVolumes) ? globalThis.Boolean(object.removeVolumes) : false,
|
|
867
|
+
};
|
|
868
|
+
},
|
|
869
|
+
toJSON(message) {
|
|
870
|
+
const obj = {};
|
|
871
|
+
if (message.name !== "") {
|
|
872
|
+
obj.name = message.name;
|
|
873
|
+
}
|
|
874
|
+
if (message.force !== false) {
|
|
875
|
+
obj.force = message.force;
|
|
876
|
+
}
|
|
877
|
+
if (message.removeVolumes !== false) {
|
|
878
|
+
obj.removeVolumes = message.removeVolumes;
|
|
879
|
+
}
|
|
880
|
+
return obj;
|
|
881
|
+
},
|
|
882
|
+
create(base) {
|
|
883
|
+
return exports.RemoveContainerRequest.fromPartial(base ?? {});
|
|
884
|
+
},
|
|
885
|
+
fromPartial(object) {
|
|
886
|
+
const message = createBaseRemoveContainerRequest();
|
|
887
|
+
message.name = object.name ?? "";
|
|
888
|
+
message.force = object.force ?? false;
|
|
889
|
+
message.removeVolumes = object.removeVolumes ?? false;
|
|
890
|
+
return message;
|
|
891
|
+
},
|
|
892
|
+
};
|
|
893
|
+
function createBaseRemoveContainerResponse() {
|
|
894
|
+
return { name: "", id: "", forceApplied: false };
|
|
895
|
+
}
|
|
896
|
+
exports.RemoveContainerResponse = {
|
|
897
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
898
|
+
if (message.name !== "") {
|
|
899
|
+
writer.uint32(10).string(message.name);
|
|
900
|
+
}
|
|
901
|
+
if (message.id !== "") {
|
|
902
|
+
writer.uint32(18).string(message.id);
|
|
903
|
+
}
|
|
904
|
+
if (message.forceApplied !== false) {
|
|
905
|
+
writer.uint32(24).bool(message.forceApplied);
|
|
906
|
+
}
|
|
907
|
+
return writer;
|
|
908
|
+
},
|
|
909
|
+
decode(input, length) {
|
|
910
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
911
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
912
|
+
const message = createBaseRemoveContainerResponse();
|
|
913
|
+
while (reader.pos < end) {
|
|
914
|
+
const tag = reader.uint32();
|
|
915
|
+
switch (tag >>> 3) {
|
|
916
|
+
case 1: {
|
|
917
|
+
if (tag !== 10) {
|
|
918
|
+
break;
|
|
919
|
+
}
|
|
920
|
+
message.name = reader.string();
|
|
921
|
+
continue;
|
|
922
|
+
}
|
|
923
|
+
case 2: {
|
|
924
|
+
if (tag !== 18) {
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
927
|
+
message.id = reader.string();
|
|
928
|
+
continue;
|
|
929
|
+
}
|
|
930
|
+
case 3: {
|
|
931
|
+
if (tag !== 24) {
|
|
932
|
+
break;
|
|
933
|
+
}
|
|
934
|
+
message.forceApplied = reader.bool();
|
|
935
|
+
continue;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
939
|
+
break;
|
|
940
|
+
}
|
|
941
|
+
reader.skip(tag & 7);
|
|
942
|
+
}
|
|
943
|
+
return message;
|
|
944
|
+
},
|
|
945
|
+
fromJSON(object) {
|
|
946
|
+
return {
|
|
947
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
948
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
949
|
+
forceApplied: isSet(object.forceApplied) ? globalThis.Boolean(object.forceApplied) : false,
|
|
950
|
+
};
|
|
951
|
+
},
|
|
952
|
+
toJSON(message) {
|
|
953
|
+
const obj = {};
|
|
954
|
+
if (message.name !== "") {
|
|
955
|
+
obj.name = message.name;
|
|
956
|
+
}
|
|
957
|
+
if (message.id !== "") {
|
|
958
|
+
obj.id = message.id;
|
|
959
|
+
}
|
|
960
|
+
if (message.forceApplied !== false) {
|
|
961
|
+
obj.forceApplied = message.forceApplied;
|
|
962
|
+
}
|
|
963
|
+
return obj;
|
|
964
|
+
},
|
|
965
|
+
create(base) {
|
|
966
|
+
return exports.RemoveContainerResponse.fromPartial(base ?? {});
|
|
967
|
+
},
|
|
968
|
+
fromPartial(object) {
|
|
969
|
+
const message = createBaseRemoveContainerResponse();
|
|
970
|
+
message.name = object.name ?? "";
|
|
971
|
+
message.id = object.id ?? "";
|
|
972
|
+
message.forceApplied = object.forceApplied ?? false;
|
|
973
|
+
return message;
|
|
974
|
+
},
|
|
975
|
+
};
|
|
976
|
+
exports.ContainerControlDefinition = {
|
|
977
|
+
name: "ContainerControl",
|
|
978
|
+
fullName: "keelson.interfaces.container_control.ContainerControl",
|
|
979
|
+
methods: {
|
|
980
|
+
list: {
|
|
981
|
+
name: "list",
|
|
982
|
+
requestType: exports.ListContainersRequest,
|
|
983
|
+
requestStream: false,
|
|
984
|
+
responseType: exports.ListContainersResponse,
|
|
985
|
+
responseStream: false,
|
|
986
|
+
options: {},
|
|
987
|
+
},
|
|
988
|
+
logs: {
|
|
989
|
+
name: "logs",
|
|
990
|
+
requestType: exports.GetLogsRequest,
|
|
991
|
+
requestStream: false,
|
|
992
|
+
responseType: exports.GetLogsResponse,
|
|
993
|
+
responseStream: false,
|
|
994
|
+
options: {},
|
|
995
|
+
},
|
|
996
|
+
start: {
|
|
997
|
+
name: "start",
|
|
998
|
+
requestType: exports.StartContainerRequest,
|
|
999
|
+
requestStream: false,
|
|
1000
|
+
responseType: exports.ContainerActionResponse,
|
|
1001
|
+
responseStream: false,
|
|
1002
|
+
options: {},
|
|
1003
|
+
},
|
|
1004
|
+
stop: {
|
|
1005
|
+
name: "stop",
|
|
1006
|
+
requestType: exports.StopContainerRequest,
|
|
1007
|
+
requestStream: false,
|
|
1008
|
+
responseType: exports.ContainerActionResponse,
|
|
1009
|
+
responseStream: false,
|
|
1010
|
+
options: {},
|
|
1011
|
+
},
|
|
1012
|
+
restart: {
|
|
1013
|
+
name: "restart",
|
|
1014
|
+
requestType: exports.RestartContainerRequest,
|
|
1015
|
+
requestStream: false,
|
|
1016
|
+
responseType: exports.ContainerActionResponse,
|
|
1017
|
+
responseStream: false,
|
|
1018
|
+
options: {},
|
|
1019
|
+
},
|
|
1020
|
+
remove: {
|
|
1021
|
+
name: "remove",
|
|
1022
|
+
requestType: exports.RemoveContainerRequest,
|
|
1023
|
+
requestStream: false,
|
|
1024
|
+
responseType: exports.RemoveContainerResponse,
|
|
1025
|
+
responseStream: false,
|
|
1026
|
+
options: {},
|
|
1027
|
+
},
|
|
1028
|
+
},
|
|
1029
|
+
};
|
|
1030
|
+
function toTimestamp(date) {
|
|
1031
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
1032
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
1033
|
+
return { seconds, nanos };
|
|
1034
|
+
}
|
|
1035
|
+
function fromTimestamp(t) {
|
|
1036
|
+
let millis = (t.seconds || 0) * 1000;
|
|
1037
|
+
millis += (t.nanos || 0) / 1000000;
|
|
1038
|
+
return new globalThis.Date(millis);
|
|
1039
|
+
}
|
|
1040
|
+
function fromJsonTimestamp(o) {
|
|
1041
|
+
if (o instanceof globalThis.Date) {
|
|
1042
|
+
return o;
|
|
1043
|
+
}
|
|
1044
|
+
else if (typeof o === "string") {
|
|
1045
|
+
return new globalThis.Date(o);
|
|
1046
|
+
}
|
|
1047
|
+
else {
|
|
1048
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
function isSet(value) {
|
|
1052
|
+
return value !== null && value !== undefined;
|
|
1053
|
+
}
|