kurtosis-sdk 0.52.2 → 0.52.3
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/build/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js +7 -3
- package/build/core/kurtosis_core_rpc_api_bindings/executable_module_service_grpc_web_pb.js +7 -3
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_pb.d.ts +4 -4
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_pb.js +19 -19
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.d.ts +6 -6
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js +25 -21
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.d.ts +24 -20
- package/build/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js +88 -55
- package/build/engine/lib/constructor_calls.d.ts +2 -2
- package/build/engine/lib/constructor_calls.js +5 -5
- package/build/engine/lib/kurtosis_context/generic_engine_client.d.ts +2 -2
- package/build/engine/lib/kurtosis_context/grpc_node_engine_client.d.ts +3 -3
- package/build/engine/lib/kurtosis_context/grpc_node_engine_client.js +46 -33
- package/build/engine/lib/kurtosis_context/grpc_web_engine_client.d.ts +3 -3
- package/build/engine/lib/kurtosis_context/grpc_web_engine_client.js +45 -32
- package/build/engine/lib/kurtosis_context/kurtosis_context.d.ts +1 -1
- package/build/engine/lib/kurtosis_context/kurtosis_context.js +14 -9
- package/build/engine/lib/kurtosis_context/service_log.d.ts +5 -0
- package/build/engine/lib/kurtosis_context/service_log.js +13 -0
- package/build/engine/lib/kurtosis_context/service_logs_stream_content.d.ts +9 -0
- package/build/engine/lib/kurtosis_context/service_logs_stream_content.js +17 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +5 -1
- package/build/kurtosis_version/kurtosis_version.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
|
|
8
|
+
// versions:
|
|
9
|
+
// protoc-gen-grpc-web v1.4.1
|
|
10
|
+
// protoc v3.15.6
|
|
11
|
+
// source: api_container_service.proto
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
/* eslint-disable */
|
|
@@ -45,7 +49,7 @@ proto.api_container_api.ApiContainerServiceClient =
|
|
|
45
49
|
/**
|
|
46
50
|
* @private @const {string} The hostname
|
|
47
51
|
*/
|
|
48
|
-
this.hostname_ = hostname;
|
|
52
|
+
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
49
53
|
|
|
50
54
|
};
|
|
51
55
|
|
|
@@ -71,7 +75,7 @@ proto.api_container_api.ApiContainerServicePromiseClient =
|
|
|
71
75
|
/**
|
|
72
76
|
* @private @const {string} The hostname
|
|
73
77
|
*/
|
|
74
|
-
this.hostname_ = hostname;
|
|
78
|
+
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
75
79
|
|
|
76
80
|
};
|
|
77
81
|
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
|
|
8
|
+
// versions:
|
|
9
|
+
// protoc-gen-grpc-web v1.4.1
|
|
10
|
+
// protoc v3.15.6
|
|
11
|
+
// source: executable_module_service.proto
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
/* eslint-disable */
|
|
@@ -41,7 +45,7 @@ proto.module_api.ExecutableModuleServiceClient =
|
|
|
41
45
|
/**
|
|
42
46
|
* @private @const {string} The hostname
|
|
43
47
|
*/
|
|
44
|
-
this.hostname_ = hostname;
|
|
48
|
+
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
45
49
|
|
|
46
50
|
};
|
|
47
51
|
|
|
@@ -67,7 +71,7 @@ proto.module_api.ExecutableModuleServicePromiseClient =
|
|
|
67
71
|
/**
|
|
68
72
|
* @private @const {string} The hostname
|
|
69
73
|
*/
|
|
70
|
-
this.hostname_ = hostname;
|
|
74
|
+
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
71
75
|
|
|
72
76
|
};
|
|
73
77
|
|
|
@@ -14,7 +14,7 @@ interface IEngineServiceService extends grpc.ServiceDefinition<grpc.UntypedServi
|
|
|
14
14
|
stopEnclave: grpc.MethodDefinition<engine_service_pb.StopEnclaveArgs, google_protobuf_empty_pb.Empty>;
|
|
15
15
|
destroyEnclave: grpc.MethodDefinition<engine_service_pb.DestroyEnclaveArgs, google_protobuf_empty_pb.Empty>;
|
|
16
16
|
clean: grpc.MethodDefinition<engine_service_pb.CleanArgs, engine_service_pb.CleanResponse>;
|
|
17
|
-
|
|
17
|
+
getServiceLogs: grpc.MethodDefinition<engine_service_pb.GetServiceLogsArgs, engine_service_pb.GetServiceLogsResponse>;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export const EngineServiceService: IEngineServiceService;
|
|
@@ -26,7 +26,7 @@ export interface IEngineServiceServer extends grpc.UntypedServiceImplementation
|
|
|
26
26
|
stopEnclave: grpc.handleUnaryCall<engine_service_pb.StopEnclaveArgs, google_protobuf_empty_pb.Empty>;
|
|
27
27
|
destroyEnclave: grpc.handleUnaryCall<engine_service_pb.DestroyEnclaveArgs, google_protobuf_empty_pb.Empty>;
|
|
28
28
|
clean: grpc.handleUnaryCall<engine_service_pb.CleanArgs, engine_service_pb.CleanResponse>;
|
|
29
|
-
|
|
29
|
+
getServiceLogs: grpc.handleServerStreamingCall<engine_service_pb.GetServiceLogsArgs, engine_service_pb.GetServiceLogsResponse>;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export class EngineServiceClient extends grpc.Client {
|
|
@@ -49,6 +49,6 @@ export class EngineServiceClient extends grpc.Client {
|
|
|
49
49
|
clean(argument: engine_service_pb.CleanArgs, callback: grpc.requestCallback<engine_service_pb.CleanResponse>): grpc.ClientUnaryCall;
|
|
50
50
|
clean(argument: engine_service_pb.CleanArgs, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<engine_service_pb.CleanResponse>): grpc.ClientUnaryCall;
|
|
51
51
|
clean(argument: engine_service_pb.CleanArgs, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<engine_service_pb.CleanResponse>): grpc.ClientUnaryCall;
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
getServiceLogs(argument: engine_service_pb.GetServiceLogsArgs, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream<engine_service_pb.GetServiceLogsResponse>;
|
|
53
|
+
getServiceLogs(argument: engine_service_pb.GetServiceLogsArgs, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream<engine_service_pb.GetServiceLogsResponse>;
|
|
54
54
|
}
|
|
@@ -82,26 +82,26 @@ function deserialize_engine_api_GetEngineInfoResponse(buffer_arg) {
|
|
|
82
82
|
return engine_service_pb.GetEngineInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
function
|
|
86
|
-
if (!(arg instanceof engine_service_pb.
|
|
87
|
-
throw new Error('Expected argument of type engine_api.
|
|
85
|
+
function serialize_engine_api_GetServiceLogsArgs(arg) {
|
|
86
|
+
if (!(arg instanceof engine_service_pb.GetServiceLogsArgs)) {
|
|
87
|
+
throw new Error('Expected argument of type engine_api.GetServiceLogsArgs');
|
|
88
88
|
}
|
|
89
89
|
return Buffer.from(arg.serializeBinary());
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
function
|
|
93
|
-
return engine_service_pb.
|
|
92
|
+
function deserialize_engine_api_GetServiceLogsArgs(buffer_arg) {
|
|
93
|
+
return engine_service_pb.GetServiceLogsArgs.deserializeBinary(new Uint8Array(buffer_arg));
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function
|
|
97
|
-
if (!(arg instanceof engine_service_pb.
|
|
98
|
-
throw new Error('Expected argument of type engine_api.
|
|
96
|
+
function serialize_engine_api_GetServiceLogsResponse(arg) {
|
|
97
|
+
if (!(arg instanceof engine_service_pb.GetServiceLogsResponse)) {
|
|
98
|
+
throw new Error('Expected argument of type engine_api.GetServiceLogsResponse');
|
|
99
99
|
}
|
|
100
100
|
return Buffer.from(arg.serializeBinary());
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
function
|
|
104
|
-
return engine_service_pb.
|
|
103
|
+
function deserialize_engine_api_GetServiceLogsResponse(buffer_arg) {
|
|
104
|
+
return engine_service_pb.GetServiceLogsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
function serialize_engine_api_StopEnclaveArgs(arg) {
|
|
@@ -203,17 +203,17 @@ clean: {
|
|
|
203
203
|
responseSerialize: serialize_engine_api_CleanResponse,
|
|
204
204
|
responseDeserialize: deserialize_engine_api_CleanResponse,
|
|
205
205
|
},
|
|
206
|
-
// Get
|
|
207
|
-
|
|
208
|
-
path: '/engine_api.EngineService/
|
|
206
|
+
// Get service logs
|
|
207
|
+
getServiceLogs: {
|
|
208
|
+
path: '/engine_api.EngineService/GetServiceLogs',
|
|
209
209
|
requestStream: false,
|
|
210
210
|
responseStream: true,
|
|
211
|
-
requestType: engine_service_pb.
|
|
212
|
-
responseType: engine_service_pb.
|
|
213
|
-
requestSerialize:
|
|
214
|
-
requestDeserialize:
|
|
215
|
-
responseSerialize:
|
|
216
|
-
responseDeserialize:
|
|
211
|
+
requestType: engine_service_pb.GetServiceLogsArgs,
|
|
212
|
+
responseType: engine_service_pb.GetServiceLogsResponse,
|
|
213
|
+
requestSerialize: serialize_engine_api_GetServiceLogsArgs,
|
|
214
|
+
requestDeserialize: deserialize_engine_api_GetServiceLogsArgs,
|
|
215
|
+
responseSerialize: serialize_engine_api_GetServiceLogsResponse,
|
|
216
|
+
responseDeserialize: deserialize_engine_api_GetServiceLogsResponse,
|
|
217
217
|
},
|
|
218
218
|
};
|
|
219
219
|
|
|
@@ -51,10 +51,10 @@ export class EngineServiceClient {
|
|
|
51
51
|
response: engine_service_pb.CleanResponse) => void
|
|
52
52
|
): grpcWeb.ClientReadableStream<engine_service_pb.CleanResponse>;
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
request: engine_service_pb.
|
|
54
|
+
getServiceLogs(
|
|
55
|
+
request: engine_service_pb.GetServiceLogsArgs,
|
|
56
56
|
metadata?: grpcWeb.Metadata
|
|
57
|
-
): grpcWeb.ClientReadableStream<engine_service_pb.
|
|
57
|
+
): grpcWeb.ClientReadableStream<engine_service_pb.GetServiceLogsResponse>;
|
|
58
58
|
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -93,10 +93,10 @@ export class EngineServicePromiseClient {
|
|
|
93
93
|
metadata?: grpcWeb.Metadata
|
|
94
94
|
): Promise<engine_service_pb.CleanResponse>;
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
request: engine_service_pb.
|
|
96
|
+
getServiceLogs(
|
|
97
|
+
request: engine_service_pb.GetServiceLogsArgs,
|
|
98
98
|
metadata?: grpcWeb.Metadata
|
|
99
|
-
): grpcWeb.ClientReadableStream<engine_service_pb.
|
|
99
|
+
): grpcWeb.ClientReadableStream<engine_service_pb.GetServiceLogsResponse>;
|
|
100
100
|
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
|
|
8
|
+
// versions:
|
|
9
|
+
// protoc-gen-grpc-web v1.4.1
|
|
10
|
+
// protoc v3.15.6
|
|
11
|
+
// source: engine_service.proto
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
/* eslint-disable */
|
|
@@ -41,7 +45,7 @@ proto.engine_api.EngineServiceClient =
|
|
|
41
45
|
/**
|
|
42
46
|
* @private @const {string} The hostname
|
|
43
47
|
*/
|
|
44
|
-
this.hostname_ = hostname;
|
|
48
|
+
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
45
49
|
|
|
46
50
|
};
|
|
47
51
|
|
|
@@ -67,7 +71,7 @@ proto.engine_api.EngineServicePromiseClient =
|
|
|
67
71
|
/**
|
|
68
72
|
* @private @const {string} The hostname
|
|
69
73
|
*/
|
|
70
|
-
this.hostname_ = hostname;
|
|
74
|
+
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
71
75
|
|
|
72
76
|
};
|
|
73
77
|
|
|
@@ -441,56 +445,56 @@ proto.engine_api.EngineServicePromiseClient.prototype.clean =
|
|
|
441
445
|
/**
|
|
442
446
|
* @const
|
|
443
447
|
* @type {!grpc.web.MethodDescriptor<
|
|
444
|
-
* !proto.engine_api.
|
|
445
|
-
* !proto.engine_api.
|
|
448
|
+
* !proto.engine_api.GetServiceLogsArgs,
|
|
449
|
+
* !proto.engine_api.GetServiceLogsResponse>}
|
|
446
450
|
*/
|
|
447
|
-
const
|
|
448
|
-
'/engine_api.EngineService/
|
|
451
|
+
const methodDescriptor_EngineService_GetServiceLogs = new grpc.web.MethodDescriptor(
|
|
452
|
+
'/engine_api.EngineService/GetServiceLogs',
|
|
449
453
|
grpc.web.MethodType.SERVER_STREAMING,
|
|
450
|
-
proto.engine_api.
|
|
451
|
-
proto.engine_api.
|
|
454
|
+
proto.engine_api.GetServiceLogsArgs,
|
|
455
|
+
proto.engine_api.GetServiceLogsResponse,
|
|
452
456
|
/**
|
|
453
|
-
* @param {!proto.engine_api.
|
|
457
|
+
* @param {!proto.engine_api.GetServiceLogsArgs} request
|
|
454
458
|
* @return {!Uint8Array}
|
|
455
459
|
*/
|
|
456
460
|
function(request) {
|
|
457
461
|
return request.serializeBinary();
|
|
458
462
|
},
|
|
459
|
-
proto.engine_api.
|
|
463
|
+
proto.engine_api.GetServiceLogsResponse.deserializeBinary
|
|
460
464
|
);
|
|
461
465
|
|
|
462
466
|
|
|
463
467
|
/**
|
|
464
|
-
* @param {!proto.engine_api.
|
|
468
|
+
* @param {!proto.engine_api.GetServiceLogsArgs} request The request proto
|
|
465
469
|
* @param {?Object<string, string>=} metadata User defined
|
|
466
470
|
* call metadata
|
|
467
|
-
* @return {!grpc.web.ClientReadableStream<!proto.engine_api.
|
|
471
|
+
* @return {!grpc.web.ClientReadableStream<!proto.engine_api.GetServiceLogsResponse>}
|
|
468
472
|
* The XHR Node Readable Stream
|
|
469
473
|
*/
|
|
470
|
-
proto.engine_api.EngineServiceClient.prototype.
|
|
474
|
+
proto.engine_api.EngineServiceClient.prototype.getServiceLogs =
|
|
471
475
|
function(request, metadata) {
|
|
472
476
|
return this.client_.serverStreaming(this.hostname_ +
|
|
473
|
-
'/engine_api.EngineService/
|
|
477
|
+
'/engine_api.EngineService/GetServiceLogs',
|
|
474
478
|
request,
|
|
475
479
|
metadata || {},
|
|
476
|
-
|
|
480
|
+
methodDescriptor_EngineService_GetServiceLogs);
|
|
477
481
|
};
|
|
478
482
|
|
|
479
483
|
|
|
480
484
|
/**
|
|
481
|
-
* @param {!proto.engine_api.
|
|
485
|
+
* @param {!proto.engine_api.GetServiceLogsArgs} request The request proto
|
|
482
486
|
* @param {?Object<string, string>=} metadata User defined
|
|
483
487
|
* call metadata
|
|
484
|
-
* @return {!grpc.web.ClientReadableStream<!proto.engine_api.
|
|
488
|
+
* @return {!grpc.web.ClientReadableStream<!proto.engine_api.GetServiceLogsResponse>}
|
|
485
489
|
* The XHR Node Readable Stream
|
|
486
490
|
*/
|
|
487
|
-
proto.engine_api.EngineServicePromiseClient.prototype.
|
|
491
|
+
proto.engine_api.EngineServicePromiseClient.prototype.getServiceLogs =
|
|
488
492
|
function(request, metadata) {
|
|
489
493
|
return this.client_.serverStreaming(this.hostname_ +
|
|
490
|
-
'/engine_api.EngineService/
|
|
494
|
+
'/engine_api.EngineService/GetServiceLogs',
|
|
491
495
|
request,
|
|
492
496
|
metadata || {},
|
|
493
|
-
|
|
497
|
+
methodDescriptor_EngineService_GetServiceLogs);
|
|
494
498
|
};
|
|
495
499
|
|
|
496
500
|
|
|
@@ -255,25 +255,25 @@ export namespace CleanResponse {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
export class
|
|
258
|
+
export class GetServiceLogsArgs extends jspb.Message {
|
|
259
259
|
getEnclaveId(): string;
|
|
260
|
-
setEnclaveId(value: string):
|
|
260
|
+
setEnclaveId(value: string): GetServiceLogsArgs;
|
|
261
261
|
|
|
262
262
|
getServiceGuidSetMap(): jspb.Map<string, boolean>;
|
|
263
|
-
clearServiceGuidSetMap():
|
|
263
|
+
clearServiceGuidSetMap(): GetServiceLogsArgs;
|
|
264
264
|
|
|
265
265
|
getFollowLogs(): boolean;
|
|
266
|
-
setFollowLogs(value: boolean):
|
|
266
|
+
setFollowLogs(value: boolean): GetServiceLogsArgs;
|
|
267
267
|
|
|
268
268
|
serializeBinary(): Uint8Array;
|
|
269
|
-
toObject(includeInstance?: boolean):
|
|
270
|
-
static toObject(includeInstance: boolean, msg:
|
|
271
|
-
static serializeBinaryToWriter(message:
|
|
272
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
273
|
-
static deserializeBinaryFromReader(message:
|
|
269
|
+
toObject(includeInstance?: boolean): GetServiceLogsArgs.AsObject;
|
|
270
|
+
static toObject(includeInstance: boolean, msg: GetServiceLogsArgs): GetServiceLogsArgs.AsObject;
|
|
271
|
+
static serializeBinaryToWriter(message: GetServiceLogsArgs, writer: jspb.BinaryWriter): void;
|
|
272
|
+
static deserializeBinary(bytes: Uint8Array): GetServiceLogsArgs;
|
|
273
|
+
static deserializeBinaryFromReader(message: GetServiceLogsArgs, reader: jspb.BinaryReader): GetServiceLogsArgs;
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
export namespace
|
|
276
|
+
export namespace GetServiceLogsArgs {
|
|
277
277
|
export type AsObject = {
|
|
278
278
|
enclaveId: string,
|
|
279
279
|
serviceGuidSetMap: Array<[string, boolean]>,
|
|
@@ -281,21 +281,25 @@ export namespace GetUserServiceLogsArgs {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
export class
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
export class GetServiceLogsResponse extends jspb.Message {
|
|
285
|
+
getServiceLogsByServiceGuidMap(): jspb.Map<string, LogLine>;
|
|
286
|
+
clearServiceLogsByServiceGuidMap(): GetServiceLogsResponse;
|
|
287
|
+
|
|
288
|
+
getNotFoundServiceGuidSetMap(): jspb.Map<string, boolean>;
|
|
289
|
+
clearNotFoundServiceGuidSetMap(): GetServiceLogsResponse;
|
|
287
290
|
|
|
288
291
|
serializeBinary(): Uint8Array;
|
|
289
|
-
toObject(includeInstance?: boolean):
|
|
290
|
-
static toObject(includeInstance: boolean, msg:
|
|
291
|
-
static serializeBinaryToWriter(message:
|
|
292
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
293
|
-
static deserializeBinaryFromReader(message:
|
|
292
|
+
toObject(includeInstance?: boolean): GetServiceLogsResponse.AsObject;
|
|
293
|
+
static toObject(includeInstance: boolean, msg: GetServiceLogsResponse): GetServiceLogsResponse.AsObject;
|
|
294
|
+
static serializeBinaryToWriter(message: GetServiceLogsResponse, writer: jspb.BinaryWriter): void;
|
|
295
|
+
static deserializeBinary(bytes: Uint8Array): GetServiceLogsResponse;
|
|
296
|
+
static deserializeBinaryFromReader(message: GetServiceLogsResponse, reader: jspb.BinaryReader): GetServiceLogsResponse;
|
|
294
297
|
}
|
|
295
298
|
|
|
296
|
-
export namespace
|
|
299
|
+
export namespace GetServiceLogsResponse {
|
|
297
300
|
export type AsObject = {
|
|
298
|
-
|
|
301
|
+
serviceLogsByServiceGuidMap: Array<[string, LogLine.AsObject]>,
|
|
302
|
+
notFoundServiceGuidSetMap: Array<[string, boolean]>,
|
|
299
303
|
}
|
|
300
304
|
}
|
|
301
305
|
|
|
@@ -29,8 +29,8 @@ goog.exportSymbol('proto.engine_api.EnclaveContainersStatus', null, global);
|
|
|
29
29
|
goog.exportSymbol('proto.engine_api.EnclaveInfo', null, global);
|
|
30
30
|
goog.exportSymbol('proto.engine_api.GetEnclavesResponse', null, global);
|
|
31
31
|
goog.exportSymbol('proto.engine_api.GetEngineInfoResponse', null, global);
|
|
32
|
-
goog.exportSymbol('proto.engine_api.
|
|
33
|
-
goog.exportSymbol('proto.engine_api.
|
|
32
|
+
goog.exportSymbol('proto.engine_api.GetServiceLogsArgs', null, global);
|
|
33
|
+
goog.exportSymbol('proto.engine_api.GetServiceLogsResponse', null, global);
|
|
34
34
|
goog.exportSymbol('proto.engine_api.LogLine', null, global);
|
|
35
35
|
goog.exportSymbol('proto.engine_api.StopEnclaveArgs', null, global);
|
|
36
36
|
/**
|
|
@@ -274,16 +274,16 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
274
274
|
* @extends {jspb.Message}
|
|
275
275
|
* @constructor
|
|
276
276
|
*/
|
|
277
|
-
proto.engine_api.
|
|
277
|
+
proto.engine_api.GetServiceLogsArgs = function(opt_data) {
|
|
278
278
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
279
279
|
};
|
|
280
|
-
goog.inherits(proto.engine_api.
|
|
280
|
+
goog.inherits(proto.engine_api.GetServiceLogsArgs, jspb.Message);
|
|
281
281
|
if (goog.DEBUG && !COMPILED) {
|
|
282
282
|
/**
|
|
283
283
|
* @public
|
|
284
284
|
* @override
|
|
285
285
|
*/
|
|
286
|
-
proto.engine_api.
|
|
286
|
+
proto.engine_api.GetServiceLogsArgs.displayName = 'proto.engine_api.GetServiceLogsArgs';
|
|
287
287
|
}
|
|
288
288
|
/**
|
|
289
289
|
* Generated by JsPbCodeGenerator.
|
|
@@ -295,16 +295,16 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
295
295
|
* @extends {jspb.Message}
|
|
296
296
|
* @constructor
|
|
297
297
|
*/
|
|
298
|
-
proto.engine_api.
|
|
298
|
+
proto.engine_api.GetServiceLogsResponse = function(opt_data) {
|
|
299
299
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
300
300
|
};
|
|
301
|
-
goog.inherits(proto.engine_api.
|
|
301
|
+
goog.inherits(proto.engine_api.GetServiceLogsResponse, jspb.Message);
|
|
302
302
|
if (goog.DEBUG && !COMPILED) {
|
|
303
303
|
/**
|
|
304
304
|
* @public
|
|
305
305
|
* @override
|
|
306
306
|
*/
|
|
307
|
-
proto.engine_api.
|
|
307
|
+
proto.engine_api.GetServiceLogsResponse.displayName = 'proto.engine_api.GetServiceLogsResponse';
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
310
310
|
* Generated by JsPbCodeGenerator.
|
|
@@ -2202,8 +2202,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
|
2202
2202
|
* http://goto/soy-param-migration
|
|
2203
2203
|
* @return {!Object}
|
|
2204
2204
|
*/
|
|
2205
|
-
proto.engine_api.
|
|
2206
|
-
return proto.engine_api.
|
|
2205
|
+
proto.engine_api.GetServiceLogsArgs.prototype.toObject = function(opt_includeInstance) {
|
|
2206
|
+
return proto.engine_api.GetServiceLogsArgs.toObject(opt_includeInstance, this);
|
|
2207
2207
|
};
|
|
2208
2208
|
|
|
2209
2209
|
|
|
@@ -2212,11 +2212,11 @@ proto.engine_api.GetUserServiceLogsArgs.prototype.toObject = function(opt_includ
|
|
|
2212
2212
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
2213
2213
|
* the JSPB instance for transitional soy proto support:
|
|
2214
2214
|
* http://goto/soy-param-migration
|
|
2215
|
-
* @param {!proto.engine_api.
|
|
2215
|
+
* @param {!proto.engine_api.GetServiceLogsArgs} msg The msg instance to transform.
|
|
2216
2216
|
* @return {!Object}
|
|
2217
2217
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
2218
2218
|
*/
|
|
2219
|
-
proto.engine_api.
|
|
2219
|
+
proto.engine_api.GetServiceLogsArgs.toObject = function(includeInstance, msg) {
|
|
2220
2220
|
var f, obj = {
|
|
2221
2221
|
enclaveId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
2222
2222
|
serviceGuidSetMap: (f = msg.getServiceGuidSetMap()) ? f.toObject(includeInstance, undefined) : [],
|
|
@@ -2234,23 +2234,23 @@ proto.engine_api.GetUserServiceLogsArgs.toObject = function(includeInstance, msg
|
|
|
2234
2234
|
/**
|
|
2235
2235
|
* Deserializes binary data (in protobuf wire format).
|
|
2236
2236
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
2237
|
-
* @return {!proto.engine_api.
|
|
2237
|
+
* @return {!proto.engine_api.GetServiceLogsArgs}
|
|
2238
2238
|
*/
|
|
2239
|
-
proto.engine_api.
|
|
2239
|
+
proto.engine_api.GetServiceLogsArgs.deserializeBinary = function(bytes) {
|
|
2240
2240
|
var reader = new jspb.BinaryReader(bytes);
|
|
2241
|
-
var msg = new proto.engine_api.
|
|
2242
|
-
return proto.engine_api.
|
|
2241
|
+
var msg = new proto.engine_api.GetServiceLogsArgs;
|
|
2242
|
+
return proto.engine_api.GetServiceLogsArgs.deserializeBinaryFromReader(msg, reader);
|
|
2243
2243
|
};
|
|
2244
2244
|
|
|
2245
2245
|
|
|
2246
2246
|
/**
|
|
2247
2247
|
* Deserializes binary data (in protobuf wire format) from the
|
|
2248
2248
|
* given reader into the given message object.
|
|
2249
|
-
* @param {!proto.engine_api.
|
|
2249
|
+
* @param {!proto.engine_api.GetServiceLogsArgs} msg The message object to deserialize into.
|
|
2250
2250
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
2251
|
-
* @return {!proto.engine_api.
|
|
2251
|
+
* @return {!proto.engine_api.GetServiceLogsArgs}
|
|
2252
2252
|
*/
|
|
2253
|
-
proto.engine_api.
|
|
2253
|
+
proto.engine_api.GetServiceLogsArgs.deserializeBinaryFromReader = function(msg, reader) {
|
|
2254
2254
|
while (reader.nextField()) {
|
|
2255
2255
|
if (reader.isEndGroup()) {
|
|
2256
2256
|
break;
|
|
@@ -2284,9 +2284,9 @@ proto.engine_api.GetUserServiceLogsArgs.deserializeBinaryFromReader = function(m
|
|
|
2284
2284
|
* Serializes the message to binary data (in protobuf wire format).
|
|
2285
2285
|
* @return {!Uint8Array}
|
|
2286
2286
|
*/
|
|
2287
|
-
proto.engine_api.
|
|
2287
|
+
proto.engine_api.GetServiceLogsArgs.prototype.serializeBinary = function() {
|
|
2288
2288
|
var writer = new jspb.BinaryWriter();
|
|
2289
|
-
proto.engine_api.
|
|
2289
|
+
proto.engine_api.GetServiceLogsArgs.serializeBinaryToWriter(this, writer);
|
|
2290
2290
|
return writer.getResultBuffer();
|
|
2291
2291
|
};
|
|
2292
2292
|
|
|
@@ -2294,11 +2294,11 @@ proto.engine_api.GetUserServiceLogsArgs.prototype.serializeBinary = function() {
|
|
|
2294
2294
|
/**
|
|
2295
2295
|
* Serializes the given message to binary data (in protobuf wire
|
|
2296
2296
|
* format), writing to the given BinaryWriter.
|
|
2297
|
-
* @param {!proto.engine_api.
|
|
2297
|
+
* @param {!proto.engine_api.GetServiceLogsArgs} message
|
|
2298
2298
|
* @param {!jspb.BinaryWriter} writer
|
|
2299
2299
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
2300
2300
|
*/
|
|
2301
|
-
proto.engine_api.
|
|
2301
|
+
proto.engine_api.GetServiceLogsArgs.serializeBinaryToWriter = function(message, writer) {
|
|
2302
2302
|
var f = undefined;
|
|
2303
2303
|
f = message.getEnclaveId();
|
|
2304
2304
|
if (f.length > 0) {
|
|
@@ -2325,16 +2325,16 @@ proto.engine_api.GetUserServiceLogsArgs.serializeBinaryToWriter = function(messa
|
|
|
2325
2325
|
* optional string enclave_id = 1;
|
|
2326
2326
|
* @return {string}
|
|
2327
2327
|
*/
|
|
2328
|
-
proto.engine_api.
|
|
2328
|
+
proto.engine_api.GetServiceLogsArgs.prototype.getEnclaveId = function() {
|
|
2329
2329
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
2330
2330
|
};
|
|
2331
2331
|
|
|
2332
2332
|
|
|
2333
2333
|
/**
|
|
2334
2334
|
* @param {string} value
|
|
2335
|
-
* @return {!proto.engine_api.
|
|
2335
|
+
* @return {!proto.engine_api.GetServiceLogsArgs} returns this
|
|
2336
2336
|
*/
|
|
2337
|
-
proto.engine_api.
|
|
2337
|
+
proto.engine_api.GetServiceLogsArgs.prototype.setEnclaveId = function(value) {
|
|
2338
2338
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
2339
2339
|
};
|
|
2340
2340
|
|
|
@@ -2345,7 +2345,7 @@ proto.engine_api.GetUserServiceLogsArgs.prototype.setEnclaveId = function(value)
|
|
|
2345
2345
|
* empty, instead returning `undefined`
|
|
2346
2346
|
* @return {!jspb.Map<string,boolean>}
|
|
2347
2347
|
*/
|
|
2348
|
-
proto.engine_api.
|
|
2348
|
+
proto.engine_api.GetServiceLogsArgs.prototype.getServiceGuidSetMap = function(opt_noLazyCreate) {
|
|
2349
2349
|
return /** @type {!jspb.Map<string,boolean>} */ (
|
|
2350
2350
|
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
|
|
2351
2351
|
null));
|
|
@@ -2354,9 +2354,9 @@ proto.engine_api.GetUserServiceLogsArgs.prototype.getServiceGuidSetMap = functio
|
|
|
2354
2354
|
|
|
2355
2355
|
/**
|
|
2356
2356
|
* Clears values from the map. The map will be non-null.
|
|
2357
|
-
* @return {!proto.engine_api.
|
|
2357
|
+
* @return {!proto.engine_api.GetServiceLogsArgs} returns this
|
|
2358
2358
|
*/
|
|
2359
|
-
proto.engine_api.
|
|
2359
|
+
proto.engine_api.GetServiceLogsArgs.prototype.clearServiceGuidSetMap = function() {
|
|
2360
2360
|
this.getServiceGuidSetMap().clear();
|
|
2361
2361
|
return this;};
|
|
2362
2362
|
|
|
@@ -2365,16 +2365,16 @@ proto.engine_api.GetUserServiceLogsArgs.prototype.clearServiceGuidSetMap = funct
|
|
|
2365
2365
|
* optional bool follow_logs = 3;
|
|
2366
2366
|
* @return {boolean}
|
|
2367
2367
|
*/
|
|
2368
|
-
proto.engine_api.
|
|
2368
|
+
proto.engine_api.GetServiceLogsArgs.prototype.getFollowLogs = function() {
|
|
2369
2369
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
|
2370
2370
|
};
|
|
2371
2371
|
|
|
2372
2372
|
|
|
2373
2373
|
/**
|
|
2374
2374
|
* @param {boolean} value
|
|
2375
|
-
* @return {!proto.engine_api.
|
|
2375
|
+
* @return {!proto.engine_api.GetServiceLogsArgs} returns this
|
|
2376
2376
|
*/
|
|
2377
|
-
proto.engine_api.
|
|
2377
|
+
proto.engine_api.GetServiceLogsArgs.prototype.setFollowLogs = function(value) {
|
|
2378
2378
|
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
2379
2379
|
};
|
|
2380
2380
|
|
|
@@ -2395,8 +2395,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
|
2395
2395
|
* http://goto/soy-param-migration
|
|
2396
2396
|
* @return {!Object}
|
|
2397
2397
|
*/
|
|
2398
|
-
proto.engine_api.
|
|
2399
|
-
return proto.engine_api.
|
|
2398
|
+
proto.engine_api.GetServiceLogsResponse.prototype.toObject = function(opt_includeInstance) {
|
|
2399
|
+
return proto.engine_api.GetServiceLogsResponse.toObject(opt_includeInstance, this);
|
|
2400
2400
|
};
|
|
2401
2401
|
|
|
2402
2402
|
|
|
@@ -2405,13 +2405,14 @@ proto.engine_api.GetUserServiceLogsResponse.prototype.toObject = function(opt_in
|
|
|
2405
2405
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
2406
2406
|
* the JSPB instance for transitional soy proto support:
|
|
2407
2407
|
* http://goto/soy-param-migration
|
|
2408
|
-
* @param {!proto.engine_api.
|
|
2408
|
+
* @param {!proto.engine_api.GetServiceLogsResponse} msg The msg instance to transform.
|
|
2409
2409
|
* @return {!Object}
|
|
2410
2410
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
2411
2411
|
*/
|
|
2412
|
-
proto.engine_api.
|
|
2412
|
+
proto.engine_api.GetServiceLogsResponse.toObject = function(includeInstance, msg) {
|
|
2413
2413
|
var f, obj = {
|
|
2414
|
-
|
|
2414
|
+
serviceLogsByServiceGuidMap: (f = msg.getServiceLogsByServiceGuidMap()) ? f.toObject(includeInstance, proto.engine_api.LogLine.toObject) : [],
|
|
2415
|
+
notFoundServiceGuidSetMap: (f = msg.getNotFoundServiceGuidSetMap()) ? f.toObject(includeInstance, undefined) : []
|
|
2415
2416
|
};
|
|
2416
2417
|
|
|
2417
2418
|
if (includeInstance) {
|
|
@@ -2425,23 +2426,23 @@ proto.engine_api.GetUserServiceLogsResponse.toObject = function(includeInstance,
|
|
|
2425
2426
|
/**
|
|
2426
2427
|
* Deserializes binary data (in protobuf wire format).
|
|
2427
2428
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
2428
|
-
* @return {!proto.engine_api.
|
|
2429
|
+
* @return {!proto.engine_api.GetServiceLogsResponse}
|
|
2429
2430
|
*/
|
|
2430
|
-
proto.engine_api.
|
|
2431
|
+
proto.engine_api.GetServiceLogsResponse.deserializeBinary = function(bytes) {
|
|
2431
2432
|
var reader = new jspb.BinaryReader(bytes);
|
|
2432
|
-
var msg = new proto.engine_api.
|
|
2433
|
-
return proto.engine_api.
|
|
2433
|
+
var msg = new proto.engine_api.GetServiceLogsResponse;
|
|
2434
|
+
return proto.engine_api.GetServiceLogsResponse.deserializeBinaryFromReader(msg, reader);
|
|
2434
2435
|
};
|
|
2435
2436
|
|
|
2436
2437
|
|
|
2437
2438
|
/**
|
|
2438
2439
|
* Deserializes binary data (in protobuf wire format) from the
|
|
2439
2440
|
* given reader into the given message object.
|
|
2440
|
-
* @param {!proto.engine_api.
|
|
2441
|
+
* @param {!proto.engine_api.GetServiceLogsResponse} msg The message object to deserialize into.
|
|
2441
2442
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
2442
|
-
* @return {!proto.engine_api.
|
|
2443
|
+
* @return {!proto.engine_api.GetServiceLogsResponse}
|
|
2443
2444
|
*/
|
|
2444
|
-
proto.engine_api.
|
|
2445
|
+
proto.engine_api.GetServiceLogsResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
2445
2446
|
while (reader.nextField()) {
|
|
2446
2447
|
if (reader.isEndGroup()) {
|
|
2447
2448
|
break;
|
|
@@ -2449,11 +2450,17 @@ proto.engine_api.GetUserServiceLogsResponse.deserializeBinaryFromReader = functi
|
|
|
2449
2450
|
var field = reader.getFieldNumber();
|
|
2450
2451
|
switch (field) {
|
|
2451
2452
|
case 1:
|
|
2452
|
-
var value = msg.
|
|
2453
|
+
var value = msg.getServiceLogsByServiceGuidMap();
|
|
2453
2454
|
reader.readMessage(value, function(message, reader) {
|
|
2454
2455
|
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.engine_api.LogLine.deserializeBinaryFromReader, "", new proto.engine_api.LogLine());
|
|
2455
2456
|
});
|
|
2456
2457
|
break;
|
|
2458
|
+
case 2:
|
|
2459
|
+
var value = msg.getNotFoundServiceGuidSetMap();
|
|
2460
|
+
reader.readMessage(value, function(message, reader) {
|
|
2461
|
+
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool, null, "", false);
|
|
2462
|
+
});
|
|
2463
|
+
break;
|
|
2457
2464
|
default:
|
|
2458
2465
|
reader.skipField();
|
|
2459
2466
|
break;
|
|
@@ -2467,9 +2474,9 @@ proto.engine_api.GetUserServiceLogsResponse.deserializeBinaryFromReader = functi
|
|
|
2467
2474
|
* Serializes the message to binary data (in protobuf wire format).
|
|
2468
2475
|
* @return {!Uint8Array}
|
|
2469
2476
|
*/
|
|
2470
|
-
proto.engine_api.
|
|
2477
|
+
proto.engine_api.GetServiceLogsResponse.prototype.serializeBinary = function() {
|
|
2471
2478
|
var writer = new jspb.BinaryWriter();
|
|
2472
|
-
proto.engine_api.
|
|
2479
|
+
proto.engine_api.GetServiceLogsResponse.serializeBinaryToWriter(this, writer);
|
|
2473
2480
|
return writer.getResultBuffer();
|
|
2474
2481
|
};
|
|
2475
2482
|
|
|
@@ -2477,26 +2484,30 @@ proto.engine_api.GetUserServiceLogsResponse.prototype.serializeBinary = function
|
|
|
2477
2484
|
/**
|
|
2478
2485
|
* Serializes the given message to binary data (in protobuf wire
|
|
2479
2486
|
* format), writing to the given BinaryWriter.
|
|
2480
|
-
* @param {!proto.engine_api.
|
|
2487
|
+
* @param {!proto.engine_api.GetServiceLogsResponse} message
|
|
2481
2488
|
* @param {!jspb.BinaryWriter} writer
|
|
2482
2489
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
2483
2490
|
*/
|
|
2484
|
-
proto.engine_api.
|
|
2491
|
+
proto.engine_api.GetServiceLogsResponse.serializeBinaryToWriter = function(message, writer) {
|
|
2485
2492
|
var f = undefined;
|
|
2486
|
-
f = message.
|
|
2493
|
+
f = message.getServiceLogsByServiceGuidMap(true);
|
|
2487
2494
|
if (f && f.getLength() > 0) {
|
|
2488
2495
|
f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.engine_api.LogLine.serializeBinaryToWriter);
|
|
2489
2496
|
}
|
|
2497
|
+
f = message.getNotFoundServiceGuidSetMap(true);
|
|
2498
|
+
if (f && f.getLength() > 0) {
|
|
2499
|
+
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool);
|
|
2500
|
+
}
|
|
2490
2501
|
};
|
|
2491
2502
|
|
|
2492
2503
|
|
|
2493
2504
|
/**
|
|
2494
|
-
* map<string, LogLine>
|
|
2505
|
+
* map<string, LogLine> service_logs_by_service_guid = 1;
|
|
2495
2506
|
* @param {boolean=} opt_noLazyCreate Do not create the map if
|
|
2496
2507
|
* empty, instead returning `undefined`
|
|
2497
2508
|
* @return {!jspb.Map<string,!proto.engine_api.LogLine>}
|
|
2498
2509
|
*/
|
|
2499
|
-
proto.engine_api.
|
|
2510
|
+
proto.engine_api.GetServiceLogsResponse.prototype.getServiceLogsByServiceGuidMap = function(opt_noLazyCreate) {
|
|
2500
2511
|
return /** @type {!jspb.Map<string,!proto.engine_api.LogLine>} */ (
|
|
2501
2512
|
jspb.Message.getMapField(this, 1, opt_noLazyCreate,
|
|
2502
2513
|
proto.engine_api.LogLine));
|
|
@@ -2505,10 +2516,32 @@ proto.engine_api.GetUserServiceLogsResponse.prototype.getUserServiceLogsByUserSe
|
|
|
2505
2516
|
|
|
2506
2517
|
/**
|
|
2507
2518
|
* Clears values from the map. The map will be non-null.
|
|
2508
|
-
* @return {!proto.engine_api.
|
|
2519
|
+
* @return {!proto.engine_api.GetServiceLogsResponse} returns this
|
|
2520
|
+
*/
|
|
2521
|
+
proto.engine_api.GetServiceLogsResponse.prototype.clearServiceLogsByServiceGuidMap = function() {
|
|
2522
|
+
this.getServiceLogsByServiceGuidMap().clear();
|
|
2523
|
+
return this;};
|
|
2524
|
+
|
|
2525
|
+
|
|
2526
|
+
/**
|
|
2527
|
+
* map<string, bool> not_found_service_guid_set = 2;
|
|
2528
|
+
* @param {boolean=} opt_noLazyCreate Do not create the map if
|
|
2529
|
+
* empty, instead returning `undefined`
|
|
2530
|
+
* @return {!jspb.Map<string,boolean>}
|
|
2531
|
+
*/
|
|
2532
|
+
proto.engine_api.GetServiceLogsResponse.prototype.getNotFoundServiceGuidSetMap = function(opt_noLazyCreate) {
|
|
2533
|
+
return /** @type {!jspb.Map<string,boolean>} */ (
|
|
2534
|
+
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
|
|
2535
|
+
null));
|
|
2536
|
+
};
|
|
2537
|
+
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* Clears values from the map. The map will be non-null.
|
|
2541
|
+
* @return {!proto.engine_api.GetServiceLogsResponse} returns this
|
|
2509
2542
|
*/
|
|
2510
|
-
proto.engine_api.
|
|
2511
|
-
this.
|
|
2543
|
+
proto.engine_api.GetServiceLogsResponse.prototype.clearNotFoundServiceGuidSetMap = function() {
|
|
2544
|
+
this.getNotFoundServiceGuidSetMap().clear();
|
|
2512
2545
|
return this;};
|
|
2513
2546
|
|
|
2514
2547
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CleanArgs, CreateEnclaveArgs, DestroyEnclaveArgs,
|
|
1
|
+
import { CleanArgs, CreateEnclaveArgs, DestroyEnclaveArgs, GetServiceLogsArgs } from "../kurtosis_engine_rpc_api_bindings/engine_service_pb";
|
|
2
2
|
import { ServiceGUID } from "../../core/lib/services/service";
|
|
3
3
|
export declare function newCreateEnclaveArgs(enclaveId: string, apiContainerImageVersionTag: string, apiContainerLogLevel: string, isPartitioningEnabled: boolean): CreateEnclaveArgs;
|
|
4
4
|
export declare function newStopEnclaveArgs(enclaveId: string): DestroyEnclaveArgs;
|
|
5
5
|
export declare function newDestroyEnclaveArgs(enclaveId: string): DestroyEnclaveArgs;
|
|
6
6
|
export declare function newCleanArgs(shouldCleanAll: boolean): CleanArgs;
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function newGetServiceLogsArgs(enclaveID: string, serviceGUIDs: Set<ServiceGUID>, shouldFollowLogs: boolean): GetServiceLogsArgs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.newGetServiceLogsArgs = exports.newCleanArgs = exports.newDestroyEnclaveArgs = exports.newStopEnclaveArgs = exports.newCreateEnclaveArgs = void 0;
|
|
4
4
|
const engine_service_pb_1 = require("../kurtosis_engine_rpc_api_bindings/engine_service_pb");
|
|
5
5
|
// ====================================================================================================
|
|
6
6
|
// Kurtosis Context
|
|
@@ -32,15 +32,15 @@ function newCleanArgs(shouldCleanAll) {
|
|
|
32
32
|
return result;
|
|
33
33
|
}
|
|
34
34
|
exports.newCleanArgs = newCleanArgs;
|
|
35
|
-
function
|
|
36
|
-
const result = new engine_service_pb_1.
|
|
35
|
+
function newGetServiceLogsArgs(enclaveID, serviceGUIDs, shouldFollowLogs) {
|
|
36
|
+
const result = new engine_service_pb_1.GetServiceLogsArgs();
|
|
37
37
|
result.setEnclaveId(enclaveID);
|
|
38
38
|
const serviceGUIDSetMap = result.getServiceGuidSetMap();
|
|
39
39
|
const isServiceGUIDInSet = true;
|
|
40
|
-
for (const serviceGUID of
|
|
40
|
+
for (const serviceGUID of serviceGUIDs) {
|
|
41
41
|
serviceGUIDSetMap.set(serviceGUID, isServiceGUIDInSet);
|
|
42
42
|
}
|
|
43
43
|
result.setFollowLogs(shouldFollowLogs);
|
|
44
44
|
return result;
|
|
45
45
|
}
|
|
46
|
-
exports.
|
|
46
|
+
exports.newGetServiceLogsArgs = newGetServiceLogsArgs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Result } from "neverthrow";
|
|
3
|
-
import { CleanArgs, CleanResponse, CreateEnclaveArgs, CreateEnclaveResponse, DestroyEnclaveArgs, GetEnclavesResponse, GetEngineInfoResponse, StopEnclaveArgs,
|
|
3
|
+
import { CleanArgs, CleanResponse, CreateEnclaveArgs, CreateEnclaveResponse, DestroyEnclaveArgs, GetEnclavesResponse, GetEngineInfoResponse, StopEnclaveArgs, GetServiceLogsArgs } from "../../kurtosis_engine_rpc_api_bindings/engine_service_pb";
|
|
4
4
|
import { Readable } from "stream";
|
|
5
5
|
export interface GenericEngineClient {
|
|
6
6
|
getEngineInfo(): Promise<Result<GetEngineInfoResponse, Error>>;
|
|
@@ -9,5 +9,5 @@ export interface GenericEngineClient {
|
|
|
9
9
|
stopEnclave(stopEnclaveArgs: StopEnclaveArgs): Promise<Result<null, Error>>;
|
|
10
10
|
destroyEnclave(destroyEnclaveArgs: DestroyEnclaveArgs): Promise<Result<null, Error>>;
|
|
11
11
|
clean(cleanArgs: CleanArgs): Promise<Result<CleanResponse, Error>>;
|
|
12
|
-
|
|
12
|
+
getServiceLogs(getServiceLogsArgs: GetServiceLogsArgs): Promise<Result<Readable, Error>>;
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ import { Result } from 'neverthrow';
|
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
import type { EngineServiceClient as EngineServiceClientNode } from "../../kurtosis_engine_rpc_api_bindings/engine_service_grpc_pb";
|
|
5
5
|
import type { GenericEngineClient } from "./generic_engine_client";
|
|
6
|
-
import type { CleanArgs, CleanResponse, CreateEnclaveArgs, CreateEnclaveResponse, DestroyEnclaveArgs, GetEnclavesResponse, GetEngineInfoResponse,
|
|
6
|
+
import type { CleanArgs, CleanResponse, CreateEnclaveArgs, CreateEnclaveResponse, DestroyEnclaveArgs, GetEnclavesResponse, GetEngineInfoResponse, GetServiceLogsArgs, StopEnclaveArgs } from "../../kurtosis_engine_rpc_api_bindings/engine_service_pb";
|
|
7
7
|
export declare class GrpcNodeEngineClient implements GenericEngineClient {
|
|
8
8
|
private readonly client;
|
|
9
9
|
constructor(client: EngineServiceClientNode);
|
|
@@ -13,6 +13,6 @@ export declare class GrpcNodeEngineClient implements GenericEngineClient {
|
|
|
13
13
|
destroyEnclave(destroyEnclaveArgs: DestroyEnclaveArgs): Promise<Result<null, Error>>;
|
|
14
14
|
clean(cleanArgs: CleanArgs): Promise<Result<CleanResponse, Error>>;
|
|
15
15
|
getEnclavesResponse(): Promise<Result<GetEnclavesResponse, Error>>;
|
|
16
|
-
|
|
17
|
-
private
|
|
16
|
+
getServiceLogs(getServiceLogsArgs: GetServiceLogsArgs): Promise<Result<Readable, Error>>;
|
|
17
|
+
private createNewServiceLogsReadable;
|
|
18
18
|
}
|
|
@@ -14,12 +14,14 @@ const google_protobuf_empty_pb = require("google-protobuf/google/protobuf/empty_
|
|
|
14
14
|
const neverthrow_1 = require("neverthrow");
|
|
15
15
|
const stream_1 = require("stream");
|
|
16
16
|
const consts_1 = require("../consts");
|
|
17
|
+
const service_logs_stream_content_1 = require("./service_logs_stream_content");
|
|
18
|
+
const service_log_1 = require("./service_log");
|
|
17
19
|
const GRPC_STREAM_RESPONSE_DATA_EVENT_NAME = 'data';
|
|
18
20
|
const GRPC_STREAM_RESPONSE_ERROR_EVENT_NAME = 'error';
|
|
19
21
|
const GRPC_STREAM_RESPONSE_END_EVENT_NAME = 'end';
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
22
|
+
const SERVICE_LOGS_READABLE_ERROR_EVENT_NAME = 'error';
|
|
23
|
+
const SERVICE_LOGS_READABLE_END_EVENT_NAME = 'end';
|
|
24
|
+
const SERVICE_LOGS_READABLE_CLOSE_EVENT_NAME = 'close';
|
|
23
25
|
class GrpcNodeEngineClient {
|
|
24
26
|
constructor(client) {
|
|
25
27
|
this.client = client;
|
|
@@ -168,55 +170,66 @@ class GrpcNodeEngineClient {
|
|
|
168
170
|
return (0, neverthrow_1.ok)(getEnclavesResponseResult.value);
|
|
169
171
|
});
|
|
170
172
|
}
|
|
171
|
-
|
|
173
|
+
getServiceLogs(getServiceLogsArgs) {
|
|
172
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
resolve((0, neverthrow_1.ok)(
|
|
175
|
+
const streamServiceLogsPromise = new Promise((resolve, _unusedReject) => {
|
|
176
|
+
const getServiceLogsStreamResponse = this.client.getServiceLogs(getServiceLogsArgs);
|
|
177
|
+
resolve((0, neverthrow_1.ok)(getServiceLogsStreamResponse));
|
|
176
178
|
});
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
return (0, neverthrow_1.err)(
|
|
179
|
+
const streamServiceLogsResponseResult = yield streamServiceLogsPromise;
|
|
180
|
+
if (streamServiceLogsResponseResult.isErr()) {
|
|
181
|
+
return (0, neverthrow_1.err)(streamServiceLogsResponseResult.error);
|
|
180
182
|
}
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
|
|
183
|
+
const streamServiceLogsResponse = streamServiceLogsResponseResult.value;
|
|
184
|
+
const serviceLogsByGuid = new Map();
|
|
185
|
+
const serviceLogsReadable = this.createNewServiceLogsReadable(streamServiceLogsResponse);
|
|
186
|
+
streamServiceLogsResponse.on(GRPC_STREAM_RESPONSE_DATA_EVENT_NAME, function (getServiceLogsResponse) {
|
|
187
|
+
const serviceLogsByServiceGuidMap = getServiceLogsResponse.getServiceLogsByServiceGuidMap();
|
|
188
|
+
if (serviceLogsByServiceGuidMap !== undefined) {
|
|
189
|
+
serviceLogsByServiceGuidMap.forEach((ServiceLogLine, serviceGuidStr) => {
|
|
190
|
+
const serviceLogs = Array();
|
|
191
|
+
ServiceLogLine.getLineList().forEach((logLine) => {
|
|
192
|
+
const serviceLog = new service_log_1.ServiceLog(logLine);
|
|
193
|
+
serviceLogs.push(serviceLog);
|
|
194
|
+
});
|
|
195
|
+
serviceLogsByGuid.set(serviceGuidStr, serviceLogs);
|
|
189
196
|
});
|
|
190
197
|
}
|
|
191
|
-
|
|
198
|
+
const notFoundServiceGuidsMap = getServiceLogsResponse.getNotFoundServiceGuidSetMap();
|
|
199
|
+
const notFoundServiceGuids = new Set();
|
|
200
|
+
notFoundServiceGuidsMap.forEach((isGuidInMap, serviceGuidStr) => {
|
|
201
|
+
notFoundServiceGuids.add(serviceGuidStr);
|
|
202
|
+
});
|
|
203
|
+
const serviceLogsStreamContent = new service_logs_stream_content_1.ServiceLogsStreamContent(serviceLogsByGuid, notFoundServiceGuids);
|
|
204
|
+
serviceLogsReadable.push(serviceLogsStreamContent);
|
|
192
205
|
});
|
|
193
|
-
|
|
194
|
-
if (!
|
|
195
|
-
//Propagate the GRPC error to the
|
|
196
|
-
const grpcStreamErr = new Error(`An error has been returned from the
|
|
197
|
-
|
|
206
|
+
streamServiceLogsResponse.on(GRPC_STREAM_RESPONSE_ERROR_EVENT_NAME, (streamLogsErr) => {
|
|
207
|
+
if (!serviceLogsReadable.destroyed) {
|
|
208
|
+
//Propagate the GRPC error to the service logs readable
|
|
209
|
+
const grpcStreamErr = new Error(`An error has been returned from the service logs GRPC stream. Error:\n ${streamLogsErr}`);
|
|
210
|
+
serviceLogsReadable.emit(SERVICE_LOGS_READABLE_ERROR_EVENT_NAME, grpcStreamErr);
|
|
198
211
|
}
|
|
199
212
|
});
|
|
200
|
-
|
|
213
|
+
streamServiceLogsResponse.on(GRPC_STREAM_RESPONSE_END_EVENT_NAME, function () {
|
|
201
214
|
//Emit streams 'end' event when the GRPC stream has end
|
|
202
|
-
if (!
|
|
203
|
-
|
|
215
|
+
if (!serviceLogsReadable.destroyed) {
|
|
216
|
+
serviceLogsReadable.emit(SERVICE_LOGS_READABLE_END_EVENT_NAME);
|
|
204
217
|
}
|
|
205
218
|
});
|
|
206
|
-
return (0, neverthrow_1.ok)(
|
|
219
|
+
return (0, neverthrow_1.ok)(serviceLogsReadable);
|
|
207
220
|
});
|
|
208
221
|
}
|
|
209
|
-
|
|
210
|
-
const
|
|
222
|
+
createNewServiceLogsReadable(streamServiceLogsResponse) {
|
|
223
|
+
const serviceLogsReadable = new stream_1.Readable({
|
|
211
224
|
objectMode: true,
|
|
212
225
|
read() {
|
|
213
226
|
} //this is mandatory to implement, we implement empty as it's describe in the implementation examples here: https://nodesource.com/blog/understanding-streams-in-nodejs/
|
|
214
227
|
});
|
|
215
|
-
|
|
228
|
+
serviceLogsReadable.on(SERVICE_LOGS_READABLE_CLOSE_EVENT_NAME, function () {
|
|
216
229
|
//Cancel the GRPC stream when when users close the ServiceLogsReadable
|
|
217
|
-
|
|
230
|
+
streamServiceLogsResponse.cancel();
|
|
218
231
|
});
|
|
219
|
-
return
|
|
232
|
+
return serviceLogsReadable;
|
|
220
233
|
}
|
|
221
234
|
}
|
|
222
235
|
exports.GrpcNodeEngineClient = GrpcNodeEngineClient;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Result } from "neverthrow";
|
|
3
3
|
import type { EngineServiceClient as EngineServiceClientWeb } from "../../kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb";
|
|
4
4
|
import type { GenericEngineClient } from "./generic_engine_client";
|
|
5
|
-
import type { CleanArgs, CleanResponse, CreateEnclaveArgs, CreateEnclaveResponse, DestroyEnclaveArgs, GetEnclavesResponse, GetEngineInfoResponse, StopEnclaveArgs,
|
|
5
|
+
import type { CleanArgs, CleanResponse, CreateEnclaveArgs, CreateEnclaveResponse, DestroyEnclaveArgs, GetEnclavesResponse, GetEngineInfoResponse, StopEnclaveArgs, GetServiceLogsArgs } from "../../kurtosis_engine_rpc_api_bindings/engine_service_pb";
|
|
6
6
|
import { Readable } from "stream";
|
|
7
7
|
export declare class GrpcWebEngineClient implements GenericEngineClient {
|
|
8
8
|
private readonly client;
|
|
@@ -13,6 +13,6 @@ export declare class GrpcWebEngineClient implements GenericEngineClient {
|
|
|
13
13
|
destroyEnclave(destroyEnclaveArgs: DestroyEnclaveArgs): Promise<Result<null, Error>>;
|
|
14
14
|
clean(cleanArgs: CleanArgs): Promise<Result<CleanResponse, Error>>;
|
|
15
15
|
getEnclavesResponse(): Promise<Result<GetEnclavesResponse, Error>>;
|
|
16
|
-
|
|
17
|
-
private
|
|
16
|
+
getServiceLogs(getServiceLogsArgs: GetServiceLogsArgs): Promise<Result<Readable, Error>>;
|
|
17
|
+
private createNewServiceLogsReadable;
|
|
18
18
|
}
|
|
@@ -15,12 +15,14 @@ const google_protobuf_empty_pb = require("google-protobuf/google/protobuf/empty_
|
|
|
15
15
|
const neverthrow_1 = require("neverthrow");
|
|
16
16
|
const consts_1 = require("../consts");
|
|
17
17
|
const stream_1 = require("stream");
|
|
18
|
+
const service_log_1 = require("./service_log");
|
|
19
|
+
const service_logs_stream_content_1 = require("./service_logs_stream_content");
|
|
18
20
|
const GRPC_WEB_STREAM_RESPONSE_DATA_EVENT_NAME = 'data';
|
|
19
21
|
const GRPC_WEB_STREAM_RESPONSE_ERROR_EVENT_NAME = 'error';
|
|
20
22
|
const GRPC_WEB_STREAM_RESPONSE_END_EVENT_NAME = 'end';
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
23
|
+
const SERVICE_LOGS_READABLE_ERROR_EVENT_NAME = 'error';
|
|
24
|
+
const SERVICE_LOGS_READABLE_END_EVENT_NAME = 'end';
|
|
25
|
+
const SERVICE_LOGS_READABLE_CLOSE_EVENT_NAME = 'close';
|
|
24
26
|
class GrpcWebEngineClient {
|
|
25
27
|
constructor(client) {
|
|
26
28
|
this.client = client;
|
|
@@ -168,54 +170,65 @@ class GrpcWebEngineClient {
|
|
|
168
170
|
return (0, neverthrow_1.ok)(getEnclavesResponseResult.value);
|
|
169
171
|
});
|
|
170
172
|
}
|
|
171
|
-
|
|
173
|
+
getServiceLogs(getServiceLogsArgs) {
|
|
172
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
resolve((0, neverthrow_1.ok)(
|
|
175
|
+
const streamServiceLogsPromise = new Promise((resolve, _unusedReject) => {
|
|
176
|
+
const getServiceLogsStreamResponse = this.client.getServiceLogs(getServiceLogsArgs);
|
|
177
|
+
resolve((0, neverthrow_1.ok)(getServiceLogsStreamResponse));
|
|
176
178
|
});
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
return (0, neverthrow_1.err)(
|
|
179
|
+
const streamServiceLogsResponseResult = yield streamServiceLogsPromise;
|
|
180
|
+
if (streamServiceLogsResponseResult.isErr()) {
|
|
181
|
+
return (0, neverthrow_1.err)(streamServiceLogsResponseResult.error);
|
|
180
182
|
}
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
|
|
183
|
+
const streamServiceLogsResponse = streamServiceLogsResponseResult.value;
|
|
184
|
+
const serviceLogsByGuid = new Map();
|
|
185
|
+
const serviceLogsReadable = this.createNewServiceLogsReadable(streamServiceLogsResponse);
|
|
186
|
+
streamServiceLogsResponse.on(GRPC_WEB_STREAM_RESPONSE_DATA_EVENT_NAME, function (getServiceLogsResponse) {
|
|
187
|
+
const serviceLogsByUserServiceGuidMap = getServiceLogsResponse.getServiceLogsByServiceGuidMap();
|
|
188
|
+
if (serviceLogsByUserServiceGuidMap !== undefined) {
|
|
189
|
+
serviceLogsByUserServiceGuidMap.forEach((serviceLogLine, serviceGuidStr) => {
|
|
190
|
+
const serviceLogs = Array();
|
|
191
|
+
serviceLogLine.getLineList().forEach((logLine) => {
|
|
192
|
+
const serviceLog = new service_log_1.ServiceLog(logLine);
|
|
193
|
+
serviceLogs.push(serviceLog);
|
|
194
|
+
});
|
|
195
|
+
serviceLogsByGuid.set(serviceGuidStr, serviceLogs);
|
|
189
196
|
});
|
|
190
197
|
}
|
|
191
|
-
|
|
198
|
+
const notFoundServiceGuidsMap = getServiceLogsResponse.getNotFoundServiceGuidSetMap();
|
|
199
|
+
const notFoundServiceGuids = new Set();
|
|
200
|
+
notFoundServiceGuidsMap.forEach((isGuidInMap, serviceGuidStr) => {
|
|
201
|
+
notFoundServiceGuids.add(serviceGuidStr);
|
|
202
|
+
});
|
|
203
|
+
const serviceLogsStreamContent = new service_logs_stream_content_1.ServiceLogsStreamContent(serviceLogsByGuid, notFoundServiceGuids);
|
|
204
|
+
serviceLogsReadable.push(serviceLogsStreamContent);
|
|
192
205
|
});
|
|
193
|
-
|
|
194
|
-
if (!
|
|
206
|
+
streamServiceLogsResponse.on(GRPC_WEB_STREAM_RESPONSE_ERROR_EVENT_NAME, (streamLogsErr) => {
|
|
207
|
+
if (!serviceLogsReadable.destroyed) {
|
|
195
208
|
//Propagate the GRPC error to the user service logs readable
|
|
196
|
-
const grpcStreamErr = new Error(`An error has been returned from the
|
|
197
|
-
|
|
209
|
+
const grpcStreamErr = new Error(`An error has been returned from the service logs GRPC stream. Error:\n ${streamLogsErr}`);
|
|
210
|
+
serviceLogsReadable.emit(SERVICE_LOGS_READABLE_ERROR_EVENT_NAME, grpcStreamErr);
|
|
198
211
|
}
|
|
199
212
|
});
|
|
200
|
-
|
|
213
|
+
streamServiceLogsResponse.on(GRPC_WEB_STREAM_RESPONSE_END_EVENT_NAME, function () {
|
|
201
214
|
//Emit streams 'end' event when the GRPC stream has end
|
|
202
|
-
if (!
|
|
203
|
-
|
|
215
|
+
if (!serviceLogsReadable.destroyed) {
|
|
216
|
+
serviceLogsReadable.emit(SERVICE_LOGS_READABLE_END_EVENT_NAME);
|
|
204
217
|
}
|
|
205
218
|
});
|
|
206
|
-
return (0, neverthrow_1.ok)(
|
|
219
|
+
return (0, neverthrow_1.ok)(serviceLogsReadable);
|
|
207
220
|
});
|
|
208
221
|
}
|
|
209
|
-
|
|
210
|
-
const
|
|
222
|
+
createNewServiceLogsReadable(streamServiceLogsResponse) {
|
|
223
|
+
const serviceLogsReadable = new stream_1.Readable({
|
|
211
224
|
objectMode: true,
|
|
212
225
|
read() { } //this is mandatory to implement, we implement empty as it's describe in the implementation examples here: https://nodesource.com/blog/understanding-streams-in-nodejs/
|
|
213
226
|
});
|
|
214
|
-
|
|
227
|
+
serviceLogsReadable.on(SERVICE_LOGS_READABLE_CLOSE_EVENT_NAME, function () {
|
|
215
228
|
//Cancel the GRPC stream when when users close the ServiceLogsReadable
|
|
216
|
-
|
|
229
|
+
streamServiceLogsResponse.cancel();
|
|
217
230
|
});
|
|
218
|
-
return
|
|
231
|
+
return serviceLogsReadable;
|
|
219
232
|
}
|
|
220
233
|
}
|
|
221
234
|
exports.GrpcWebEngineClient = GrpcWebEngineClient;
|
|
@@ -15,7 +15,7 @@ export declare class KurtosisContext {
|
|
|
15
15
|
stopEnclave(enclaveId: EnclaveID): Promise<Result<null, Error>>;
|
|
16
16
|
destroyEnclave(enclaveId: EnclaveID): Promise<Result<null, Error>>;
|
|
17
17
|
clean(shouldCleanAll: boolean): Promise<Result<Set<string>, Error>>;
|
|
18
|
-
|
|
18
|
+
getServiceLogs(enclaveID: EnclaveID, serviceGUIDs: Set<ServiceGUID>, shouldFollowLogs: boolean): Promise<Result<Readable, Error>>;
|
|
19
19
|
private newEnclaveContextFromEnclaveInfo;
|
|
20
20
|
private static validateEngineApiVersion;
|
|
21
21
|
}
|
|
@@ -164,22 +164,27 @@ class KurtosisContext {
|
|
|
164
164
|
return (0, neverthrow_1.ok)(result);
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
//The Readable object returned will be constantly streaming the
|
|
168
|
-
//
|
|
167
|
+
//The Readable object returned will be constantly streaming the service logs information using the ServiceLogsStreamContent
|
|
168
|
+
//which contains two methods, the `getServiceLogsByServiceGuids` will return a map containing the service logs lines grouped by the service's GUID
|
|
169
|
+
//and the `getNotFoundServiceGuids` will return set of not found (in the logs database) service GUIDs
|
|
169
170
|
//Example of how to read the stream:
|
|
170
171
|
//
|
|
171
|
-
//serviceLogsReadable.on('data', (
|
|
172
|
+
//serviceLogsReadable.on('data', (serviceLogsStreamContent: serviceLogsStreamContent) => {
|
|
173
|
+
// const serviceLogsByServiceGuids: Map<ServiceGUID, Array<ServiceLog>> = serviceLogsStreamContent.getServiceLogsByServiceGuids()
|
|
174
|
+
//
|
|
175
|
+
// const notFoundServiceGuids: Set<ServiceGUID> = serviceLogsStreamContent.getNotFoundServiceGuids()
|
|
176
|
+
//
|
|
172
177
|
// //insert your code here
|
|
173
178
|
//})
|
|
174
179
|
//You can cancel receiving the stream from the service calling serviceLogsReadable.destroy()
|
|
175
|
-
|
|
180
|
+
getServiceLogs(enclaveID, serviceGUIDs, shouldFollowLogs) {
|
|
176
181
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
-
const
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
return (0, neverthrow_1.err)(
|
|
182
|
+
const getServiceLogsArgs = (0, constructor_calls_1.newGetServiceLogsArgs)(enclaveID, serviceGUIDs, shouldFollowLogs);
|
|
183
|
+
const streamServiceLogsResult = yield this.client.getServiceLogs(getServiceLogsArgs);
|
|
184
|
+
if (streamServiceLogsResult.isErr()) {
|
|
185
|
+
return (0, neverthrow_1.err)(streamServiceLogsResult.error);
|
|
181
186
|
}
|
|
182
|
-
const serviceLogsReadable =
|
|
187
|
+
const serviceLogsReadable = streamServiceLogsResult.value;
|
|
183
188
|
return (0, neverthrow_1.ok)(serviceLogsReadable);
|
|
184
189
|
});
|
|
185
190
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceLog = void 0;
|
|
4
|
+
//This is an object to represent a simple log line information
|
|
5
|
+
class ServiceLog {
|
|
6
|
+
constructor(content) {
|
|
7
|
+
this.content = content;
|
|
8
|
+
}
|
|
9
|
+
getContent() {
|
|
10
|
+
return this.content;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ServiceLog = ServiceLog;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ServiceGUID } from "../../../core/lib/services/service";
|
|
2
|
+
import { ServiceLog } from "./service_log";
|
|
3
|
+
export declare class ServiceLogsStreamContent {
|
|
4
|
+
private readonly serviceLogsByServiceGuids;
|
|
5
|
+
private readonly notFoundServiceGuids;
|
|
6
|
+
constructor(serviceLogsByServiceGuids: Map<ServiceGUID, Array<ServiceLog>>, notFoundServiceGuids: Set<ServiceGUID>);
|
|
7
|
+
getServiceLogsByServiceGuids(): Map<ServiceGUID, Array<ServiceLog>>;
|
|
8
|
+
getNotFoundServiceGuids(): Set<ServiceGUID>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceLogsStreamContent = void 0;
|
|
4
|
+
//This struct wrap the information returned by the user service logs GRPC stream
|
|
5
|
+
class ServiceLogsStreamContent {
|
|
6
|
+
constructor(serviceLogsByServiceGuids, notFoundServiceGuids) {
|
|
7
|
+
this.serviceLogsByServiceGuids = serviceLogsByServiceGuids;
|
|
8
|
+
this.notFoundServiceGuids = notFoundServiceGuids;
|
|
9
|
+
}
|
|
10
|
+
getServiceLogsByServiceGuids() {
|
|
11
|
+
return this.serviceLogsByServiceGuids;
|
|
12
|
+
}
|
|
13
|
+
getNotFoundServiceGuids() {
|
|
14
|
+
return this.notFoundServiceGuids;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ServiceLogsStreamContent = ServiceLogsStreamContent;
|
package/build/index.d.ts
CHANGED
|
@@ -16,4 +16,6 @@ export { PartitionConnections } from "./core/kurtosis_core_rpc_api_bindings/api_
|
|
|
16
16
|
export type { IExecutableModuleServiceServer } from "./core/kurtosis_core_rpc_api_bindings/executable_module_service_grpc_pb";
|
|
17
17
|
export { ExecuteArgs, ExecuteResponse } from "./core/kurtosis_core_rpc_api_bindings/executable_module_service_pb";
|
|
18
18
|
export { KurtosisContext, DEFAULT_GRPC_PROXY_ENGINE_SERVER_PORT_NUM, DEFAULT_GRPC_ENGINE_SERVER_PORT_NUM } from "./engine/lib/kurtosis_context/kurtosis_context";
|
|
19
|
+
export { ServiceLogsStreamContent } from "./engine/lib/kurtosis_context/service_logs_stream_content";
|
|
20
|
+
export { ServiceLog } from "./engine/lib/kurtosis_context/service_log";
|
|
19
21
|
export { EnclaveAPIContainerHostMachineInfo } from "./engine/kurtosis_engine_rpc_api_bindings/engine_service_pb";
|
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnclaveAPIContainerHostMachineInfo = exports.DEFAULT_GRPC_ENGINE_SERVER_PORT_NUM = exports.DEFAULT_GRPC_PROXY_ENGINE_SERVER_PORT_NUM = exports.KurtosisContext = exports.ExecuteResponse = exports.ExecuteArgs = exports.PartitionConnections = exports.getArgsFromEnv = exports.ModuleContainerArgs = exports.newGetModulesArgs = exports.newExecuteModuleArgs = exports.newWaitForHttpPostEndpointAvailabilityArgs = exports.newWaitForHttpGetEndpointAvailabilityArgs = exports.newPartitionConnectionInfo = exports.newPartitionConnections = exports.newRepartitionArgs = exports.newPartitionServices = exports.newRemoveServiceArgs = exports.newGetServicesArgs = exports.newStartServicesArgs = exports.newLoadModuleArgs = exports.newExecCommandArgs = exports.ModuleContext = exports.SoftPartitionConnection = exports.BlockedPartitionConnection = exports.UnblockedPartitionConnection = exports.EnclaveContext = exports.PortProtocol = exports.PortSpec = exports.ServiceContext = exports.ContainerConfigBuilder = exports.KURTOSIS_VERSION = void 0;
|
|
3
|
+
exports.EnclaveAPIContainerHostMachineInfo = exports.ServiceLog = exports.ServiceLogsStreamContent = exports.DEFAULT_GRPC_ENGINE_SERVER_PORT_NUM = exports.DEFAULT_GRPC_PROXY_ENGINE_SERVER_PORT_NUM = exports.KurtosisContext = exports.ExecuteResponse = exports.ExecuteArgs = exports.PartitionConnections = exports.getArgsFromEnv = exports.ModuleContainerArgs = exports.newGetModulesArgs = exports.newExecuteModuleArgs = exports.newWaitForHttpPostEndpointAvailabilityArgs = exports.newWaitForHttpGetEndpointAvailabilityArgs = exports.newPartitionConnectionInfo = exports.newPartitionConnections = exports.newRepartitionArgs = exports.newPartitionServices = exports.newRemoveServiceArgs = exports.newGetServicesArgs = exports.newStartServicesArgs = exports.newLoadModuleArgs = exports.newExecCommandArgs = exports.ModuleContext = exports.SoftPartitionConnection = exports.BlockedPartitionConnection = exports.UnblockedPartitionConnection = exports.EnclaveContext = exports.PortProtocol = exports.PortSpec = exports.ServiceContext = exports.ContainerConfigBuilder = exports.KURTOSIS_VERSION = void 0;
|
|
4
4
|
// Own Version
|
|
5
5
|
var kurtosis_version_1 = require("./kurtosis_version/kurtosis_version");
|
|
6
6
|
Object.defineProperty(exports, "KURTOSIS_VERSION", { enumerable: true, get: function () { return kurtosis_version_1.KURTOSIS_VERSION; } });
|
|
@@ -50,5 +50,9 @@ var kurtosis_context_1 = require("./engine/lib/kurtosis_context/kurtosis_context
|
|
|
50
50
|
Object.defineProperty(exports, "KurtosisContext", { enumerable: true, get: function () { return kurtosis_context_1.KurtosisContext; } });
|
|
51
51
|
Object.defineProperty(exports, "DEFAULT_GRPC_PROXY_ENGINE_SERVER_PORT_NUM", { enumerable: true, get: function () { return kurtosis_context_1.DEFAULT_GRPC_PROXY_ENGINE_SERVER_PORT_NUM; } });
|
|
52
52
|
Object.defineProperty(exports, "DEFAULT_GRPC_ENGINE_SERVER_PORT_NUM", { enumerable: true, get: function () { return kurtosis_context_1.DEFAULT_GRPC_ENGINE_SERVER_PORT_NUM; } });
|
|
53
|
+
var service_logs_stream_content_1 = require("./engine/lib/kurtosis_context/service_logs_stream_content");
|
|
54
|
+
Object.defineProperty(exports, "ServiceLogsStreamContent", { enumerable: true, get: function () { return service_logs_stream_content_1.ServiceLogsStreamContent; } });
|
|
55
|
+
var service_log_1 = require("./engine/lib/kurtosis_context/service_log");
|
|
56
|
+
Object.defineProperty(exports, "ServiceLog", { enumerable: true, get: function () { return service_log_1.ServiceLog; } });
|
|
53
57
|
var engine_service_pb_1 = require("./engine/kurtosis_engine_rpc_api_bindings/engine_service_pb");
|
|
54
58
|
Object.defineProperty(exports, "EnclaveAPIContainerHostMachineInfo", { enumerable: true, get: function () { return engine_service_pb_1.EnclaveAPIContainerHostMachineInfo; } });
|
|
@@ -4,5 +4,5 @@ exports.KURTOSIS_VERSION = void 0;
|
|
|
4
4
|
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
|
|
5
5
|
// This is necessary so that Kurt Core consumers (e.g. modules) will know if they're compatible with the currently-running
|
|
6
6
|
// API container
|
|
7
|
-
exports.KURTOSIS_VERSION = "0.52.
|
|
7
|
+
exports.KURTOSIS_VERSION = "0.52.3";
|
|
8
8
|
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kurtosis-sdk",
|
|
3
3
|
"//": "NOTE: DO NOT UPDATE THIS VERSION MANUALLY - IT WILL BE UPDATED DURING THE RELEASE PROCESS!",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.3",
|
|
5
5
|
"main": "./build/index",
|
|
6
6
|
"description": "This repo contains a Typescript client for communicating with the Kurtosis Engine server, which is responsible for creating, managing and destroying Kurtosis Enclaves.",
|
|
7
7
|
"types": "./build/index",
|