@gitpod/supervisor-api-grpcweb 0.1.5-pd-ssh-gateway.10 → 0.1.5-pd-fix-gosimple.0

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.
@@ -31,11 +31,41 @@ type NotificationServiceRespond = {
31
31
  readonly responseType: typeof notification_pb.RespondResponse;
32
32
  };
33
33
 
34
+ type NotificationServiceSubscribeActive = {
35
+ readonly methodName: string;
36
+ readonly service: typeof NotificationService;
37
+ readonly requestStream: false;
38
+ readonly responseStream: true;
39
+ readonly requestType: typeof notification_pb.SubscribeActiveRequest;
40
+ readonly responseType: typeof notification_pb.SubscribeActiveResponse;
41
+ };
42
+
43
+ type NotificationServiceNotifyActive = {
44
+ readonly methodName: string;
45
+ readonly service: typeof NotificationService;
46
+ readonly requestStream: false;
47
+ readonly responseStream: false;
48
+ readonly requestType: typeof notification_pb.NotifyActiveRequest;
49
+ readonly responseType: typeof notification_pb.NotifyActiveResponse;
50
+ };
51
+
52
+ type NotificationServiceNotifyActiveRespond = {
53
+ readonly methodName: string;
54
+ readonly service: typeof NotificationService;
55
+ readonly requestStream: false;
56
+ readonly responseStream: false;
57
+ readonly requestType: typeof notification_pb.NotifyActiveRespondRequest;
58
+ readonly responseType: typeof notification_pb.NotifyActiveRespondResponse;
59
+ };
60
+
34
61
  export class NotificationService {
35
62
  static readonly serviceName: string;
36
63
  static readonly Notify: NotificationServiceNotify;
37
64
  static readonly Subscribe: NotificationServiceSubscribe;
38
65
  static readonly Respond: NotificationServiceRespond;
66
+ static readonly SubscribeActive: NotificationServiceSubscribeActive;
67
+ static readonly NotifyActive: NotificationServiceNotifyActive;
68
+ static readonly NotifyActiveRespond: NotificationServiceNotifyActiveRespond;
39
69
  }
40
70
 
41
71
  export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -89,5 +119,24 @@ export class NotificationServiceClient {
89
119
  requestMessage: notification_pb.RespondRequest,
90
120
  callback: (error: ServiceError|null, responseMessage: notification_pb.RespondResponse|null) => void
91
121
  ): UnaryResponse;
122
+ subscribeActive(requestMessage: notification_pb.SubscribeActiveRequest, metadata?: grpc.Metadata): ResponseStream<notification_pb.SubscribeActiveResponse>;
123
+ notifyActive(
124
+ requestMessage: notification_pb.NotifyActiveRequest,
125
+ metadata: grpc.Metadata,
126
+ callback: (error: ServiceError|null, responseMessage: notification_pb.NotifyActiveResponse|null) => void
127
+ ): UnaryResponse;
128
+ notifyActive(
129
+ requestMessage: notification_pb.NotifyActiveRequest,
130
+ callback: (error: ServiceError|null, responseMessage: notification_pb.NotifyActiveResponse|null) => void
131
+ ): UnaryResponse;
132
+ notifyActiveRespond(
133
+ requestMessage: notification_pb.NotifyActiveRespondRequest,
134
+ metadata: grpc.Metadata,
135
+ callback: (error: ServiceError|null, responseMessage: notification_pb.NotifyActiveRespondResponse|null) => void
136
+ ): UnaryResponse;
137
+ notifyActiveRespond(
138
+ requestMessage: notification_pb.NotifyActiveRespondRequest,
139
+ callback: (error: ServiceError|null, responseMessage: notification_pb.NotifyActiveRespondResponse|null) => void
140
+ ): UnaryResponse;
92
141
  }
93
142
 
@@ -37,6 +37,33 @@ NotificationService.Respond = {
37
37
  responseType: notification_pb.RespondResponse
38
38
  };
39
39
 
40
+ NotificationService.SubscribeActive = {
41
+ methodName: "SubscribeActive",
42
+ service: NotificationService,
43
+ requestStream: false,
44
+ responseStream: true,
45
+ requestType: notification_pb.SubscribeActiveRequest,
46
+ responseType: notification_pb.SubscribeActiveResponse
47
+ };
48
+
49
+ NotificationService.NotifyActive = {
50
+ methodName: "NotifyActive",
51
+ service: NotificationService,
52
+ requestStream: false,
53
+ responseStream: false,
54
+ requestType: notification_pb.NotifyActiveRequest,
55
+ responseType: notification_pb.NotifyActiveResponse
56
+ };
57
+
58
+ NotificationService.NotifyActiveRespond = {
59
+ methodName: "NotifyActiveRespond",
60
+ service: NotificationService,
61
+ requestStream: false,
62
+ responseStream: false,
63
+ requestType: notification_pb.NotifyActiveRespondRequest,
64
+ responseType: notification_pb.NotifyActiveRespondResponse
65
+ };
66
+
40
67
  exports.NotificationService = NotificationService;
41
68
 
42
69
  function NotificationServiceClient(serviceHost, options) {
@@ -145,5 +172,106 @@ NotificationServiceClient.prototype.respond = function respond(requestMessage, m
145
172
  };
146
173
  };
147
174
 
175
+ NotificationServiceClient.prototype.subscribeActive = function subscribeActive(requestMessage, metadata) {
176
+ var listeners = {
177
+ data: [],
178
+ end: [],
179
+ status: []
180
+ };
181
+ var client = grpc.invoke(NotificationService.SubscribeActive, {
182
+ request: requestMessage,
183
+ host: this.serviceHost,
184
+ metadata: metadata,
185
+ transport: this.options.transport,
186
+ debug: this.options.debug,
187
+ onMessage: function (responseMessage) {
188
+ listeners.data.forEach(function (handler) {
189
+ handler(responseMessage);
190
+ });
191
+ },
192
+ onEnd: function (status, statusMessage, trailers) {
193
+ listeners.status.forEach(function (handler) {
194
+ handler({ code: status, details: statusMessage, metadata: trailers });
195
+ });
196
+ listeners.end.forEach(function (handler) {
197
+ handler({ code: status, details: statusMessage, metadata: trailers });
198
+ });
199
+ listeners = null;
200
+ }
201
+ });
202
+ return {
203
+ on: function (type, handler) {
204
+ listeners[type].push(handler);
205
+ return this;
206
+ },
207
+ cancel: function () {
208
+ listeners = null;
209
+ client.close();
210
+ }
211
+ };
212
+ };
213
+
214
+ NotificationServiceClient.prototype.notifyActive = function notifyActive(requestMessage, metadata, callback) {
215
+ if (arguments.length === 2) {
216
+ callback = arguments[1];
217
+ }
218
+ var client = grpc.unary(NotificationService.NotifyActive, {
219
+ request: requestMessage,
220
+ host: this.serviceHost,
221
+ metadata: metadata,
222
+ transport: this.options.transport,
223
+ debug: this.options.debug,
224
+ onEnd: function (response) {
225
+ if (callback) {
226
+ if (response.status !== grpc.Code.OK) {
227
+ var err = new Error(response.statusMessage);
228
+ err.code = response.status;
229
+ err.metadata = response.trailers;
230
+ callback(err, null);
231
+ } else {
232
+ callback(null, response.message);
233
+ }
234
+ }
235
+ }
236
+ });
237
+ return {
238
+ cancel: function () {
239
+ callback = null;
240
+ client.close();
241
+ }
242
+ };
243
+ };
244
+
245
+ NotificationServiceClient.prototype.notifyActiveRespond = function notifyActiveRespond(requestMessage, metadata, callback) {
246
+ if (arguments.length === 2) {
247
+ callback = arguments[1];
248
+ }
249
+ var client = grpc.unary(NotificationService.NotifyActiveRespond, {
250
+ request: requestMessage,
251
+ host: this.serviceHost,
252
+ metadata: metadata,
253
+ transport: this.options.transport,
254
+ debug: this.options.debug,
255
+ onEnd: function (response) {
256
+ if (callback) {
257
+ if (response.status !== grpc.Code.OK) {
258
+ var err = new Error(response.statusMessage);
259
+ err.code = response.status;
260
+ err.metadata = response.trailers;
261
+ callback(err, null);
262
+ } else {
263
+ callback(null, response.message);
264
+ }
265
+ }
266
+ }
267
+ });
268
+ return {
269
+ cancel: function () {
270
+ callback = null;
271
+ client.close();
272
+ }
273
+ };
274
+ };
275
+
148
276
  exports.NotificationServiceClient = NotificationServiceClient;
149
277
 
package/lib/port_pb.js CHANGED
@@ -13,13 +13,7 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = (function() {
17
- if (this) { return this; }
18
- if (typeof window !== 'undefined') { return window; }
19
- if (typeof global !== 'undefined') { return global; }
20
- if (typeof self !== 'undefined') { return self; }
21
- return Function('return this')();
22
- }.call(null));
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
23
17
 
24
18
  goog.exportSymbol('proto.supervisor.AutoTunnelRequest', null, global);
25
19
  goog.exportSymbol('proto.supervisor.AutoTunnelResponse', null, global);
@@ -92,6 +92,12 @@ export namespace IDEStatusResponse {
92
92
  getLabel(): string;
93
93
  setLabel(value: string): void;
94
94
 
95
+ getClientid(): string;
96
+ setClientid(value: string): void;
97
+
98
+ getKind(): string;
99
+ setKind(value: string): void;
100
+
95
101
  serializeBinary(): Uint8Array;
96
102
  toObject(includeInstance?: boolean): DesktopStatus.AsObject;
97
103
  static toObject(includeInstance: boolean, msg: DesktopStatus): DesktopStatus.AsObject;
@@ -106,6 +112,8 @@ export namespace IDEStatusResponse {
106
112
  export type AsObject = {
107
113
  link: string,
108
114
  label: string,
115
+ clientid: string,
116
+ kind: string,
109
117
  }
110
118
  }
111
119
  }
@@ -439,6 +447,74 @@ export namespace TaskPresentation {
439
447
  }
440
448
  }
441
449
 
450
+ export class ResourcesStatuRequest extends jspb.Message {
451
+ serializeBinary(): Uint8Array;
452
+ toObject(includeInstance?: boolean): ResourcesStatuRequest.AsObject;
453
+ static toObject(includeInstance: boolean, msg: ResourcesStatuRequest): ResourcesStatuRequest.AsObject;
454
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
455
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
456
+ static serializeBinaryToWriter(message: ResourcesStatuRequest, writer: jspb.BinaryWriter): void;
457
+ static deserializeBinary(bytes: Uint8Array): ResourcesStatuRequest;
458
+ static deserializeBinaryFromReader(message: ResourcesStatuRequest, reader: jspb.BinaryReader): ResourcesStatuRequest;
459
+ }
460
+
461
+ export namespace ResourcesStatuRequest {
462
+ export type AsObject = {
463
+ }
464
+ }
465
+
466
+ export class ResourcesStatusResponse extends jspb.Message {
467
+ hasMemory(): boolean;
468
+ clearMemory(): void;
469
+ getMemory(): ResourceStatus | undefined;
470
+ setMemory(value?: ResourceStatus): void;
471
+
472
+ hasCpu(): boolean;
473
+ clearCpu(): void;
474
+ getCpu(): ResourceStatus | undefined;
475
+ setCpu(value?: ResourceStatus): void;
476
+
477
+ serializeBinary(): Uint8Array;
478
+ toObject(includeInstance?: boolean): ResourcesStatusResponse.AsObject;
479
+ static toObject(includeInstance: boolean, msg: ResourcesStatusResponse): ResourcesStatusResponse.AsObject;
480
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
481
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
482
+ static serializeBinaryToWriter(message: ResourcesStatusResponse, writer: jspb.BinaryWriter): void;
483
+ static deserializeBinary(bytes: Uint8Array): ResourcesStatusResponse;
484
+ static deserializeBinaryFromReader(message: ResourcesStatusResponse, reader: jspb.BinaryReader): ResourcesStatusResponse;
485
+ }
486
+
487
+ export namespace ResourcesStatusResponse {
488
+ export type AsObject = {
489
+ memory?: ResourceStatus.AsObject,
490
+ cpu?: ResourceStatus.AsObject,
491
+ }
492
+ }
493
+
494
+ export class ResourceStatus extends jspb.Message {
495
+ getUsed(): number;
496
+ setUsed(value: number): void;
497
+
498
+ getLimit(): number;
499
+ setLimit(value: number): void;
500
+
501
+ serializeBinary(): Uint8Array;
502
+ toObject(includeInstance?: boolean): ResourceStatus.AsObject;
503
+ static toObject(includeInstance: boolean, msg: ResourceStatus): ResourceStatus.AsObject;
504
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
505
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
506
+ static serializeBinaryToWriter(message: ResourceStatus, writer: jspb.BinaryWriter): void;
507
+ static deserializeBinary(bytes: Uint8Array): ResourceStatus;
508
+ static deserializeBinaryFromReader(message: ResourceStatus, reader: jspb.BinaryReader): ResourceStatus;
509
+ }
510
+
511
+ export namespace ResourceStatus {
512
+ export type AsObject = {
513
+ used: number,
514
+ limit: number,
515
+ }
516
+ }
517
+
442
518
  export interface ContentSourceMap {
443
519
  FROM_OTHER: 0;
444
520
  FROM_BACKUP: 1;