@gitpod/ide-metrics-api-grpcweb 0.0.1-mp-ws-manb-proto-gen.3 → 0.0.1-mp-copy-2023.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/idemetrics_pb.d.ts +53 -0
- package/lib/idemetrics_pb.js +426 -0
- package/lib/idemetrics_pb_service.d.ts +19 -0
- package/lib/idemetrics_pb_service.js +40 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/pkg-yarn.lock +1 -1
- package/provenance-bundle.jsonl +2 -2
package/lib/idemetrics_pb.d.ts
CHANGED
@@ -89,6 +89,59 @@ export namespace ObserveHistogramResponse {
|
|
89
89
|
}
|
90
90
|
}
|
91
91
|
|
92
|
+
export class AddHistogramRequest extends jspb.Message {
|
93
|
+
getName(): string;
|
94
|
+
setName(value: string): void;
|
95
|
+
|
96
|
+
getLabelsMap(): jspb.Map<string, string>;
|
97
|
+
clearLabelsMap(): void;
|
98
|
+
getCount(): number;
|
99
|
+
setCount(value: number): void;
|
100
|
+
|
101
|
+
getSum(): number;
|
102
|
+
setSum(value: number): void;
|
103
|
+
|
104
|
+
clearBucketsList(): void;
|
105
|
+
getBucketsList(): Array<number>;
|
106
|
+
setBucketsList(value: Array<number>): void;
|
107
|
+
addBuckets(value: number, index?: number): number;
|
108
|
+
|
109
|
+
serializeBinary(): Uint8Array;
|
110
|
+
toObject(includeInstance?: boolean): AddHistogramRequest.AsObject;
|
111
|
+
static toObject(includeInstance: boolean, msg: AddHistogramRequest): AddHistogramRequest.AsObject;
|
112
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
113
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
114
|
+
static serializeBinaryToWriter(message: AddHistogramRequest, writer: jspb.BinaryWriter): void;
|
115
|
+
static deserializeBinary(bytes: Uint8Array): AddHistogramRequest;
|
116
|
+
static deserializeBinaryFromReader(message: AddHistogramRequest, reader: jspb.BinaryReader): AddHistogramRequest;
|
117
|
+
}
|
118
|
+
|
119
|
+
export namespace AddHistogramRequest {
|
120
|
+
export type AsObject = {
|
121
|
+
name: string,
|
122
|
+
labelsMap: Array<[string, string]>,
|
123
|
+
count: number,
|
124
|
+
sum: number,
|
125
|
+
bucketsList: Array<number>,
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
export class AddHistogramResponse extends jspb.Message {
|
130
|
+
serializeBinary(): Uint8Array;
|
131
|
+
toObject(includeInstance?: boolean): AddHistogramResponse.AsObject;
|
132
|
+
static toObject(includeInstance: boolean, msg: AddHistogramResponse): AddHistogramResponse.AsObject;
|
133
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
134
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
135
|
+
static serializeBinaryToWriter(message: AddHistogramResponse, writer: jspb.BinaryWriter): void;
|
136
|
+
static deserializeBinary(bytes: Uint8Array): AddHistogramResponse;
|
137
|
+
static deserializeBinaryFromReader(message: AddHistogramResponse, reader: jspb.BinaryReader): AddHistogramResponse;
|
138
|
+
}
|
139
|
+
|
140
|
+
export namespace AddHistogramResponse {
|
141
|
+
export type AsObject = {
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
92
145
|
export class ReportErrorRequest extends jspb.Message {
|
93
146
|
getErrorStack(): string;
|
94
147
|
setErrorStack(value: string): void;
|
package/lib/idemetrics_pb.js
CHANGED
@@ -17,6 +17,8 @@ var global = (function() { return this || window || global || self || Function('
|
|
17
17
|
|
18
18
|
goog.exportSymbol('proto.ide_metrics_api.AddCounterRequest', null, global);
|
19
19
|
goog.exportSymbol('proto.ide_metrics_api.AddCounterResponse', null, global);
|
20
|
+
goog.exportSymbol('proto.ide_metrics_api.AddHistogramRequest', null, global);
|
21
|
+
goog.exportSymbol('proto.ide_metrics_api.AddHistogramResponse', null, global);
|
20
22
|
goog.exportSymbol('proto.ide_metrics_api.ObserveHistogramRequest', null, global);
|
21
23
|
goog.exportSymbol('proto.ide_metrics_api.ObserveHistogramResponse', null, global);
|
22
24
|
goog.exportSymbol('proto.ide_metrics_api.ReportErrorRequest', null, global);
|
@@ -105,6 +107,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
105
107
|
*/
|
106
108
|
proto.ide_metrics_api.ObserveHistogramResponse.displayName = 'proto.ide_metrics_api.ObserveHistogramResponse';
|
107
109
|
}
|
110
|
+
/**
|
111
|
+
* Generated by JsPbCodeGenerator.
|
112
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
113
|
+
* server response, or constructed directly in Javascript. The array is used
|
114
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
115
|
+
* If no data is provided, the constructed object will be empty, but still
|
116
|
+
* valid.
|
117
|
+
* @extends {jspb.Message}
|
118
|
+
* @constructor
|
119
|
+
*/
|
120
|
+
proto.ide_metrics_api.AddHistogramRequest = function(opt_data) {
|
121
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.ide_metrics_api.AddHistogramRequest.repeatedFields_, null);
|
122
|
+
};
|
123
|
+
goog.inherits(proto.ide_metrics_api.AddHistogramRequest, jspb.Message);
|
124
|
+
if (goog.DEBUG && !COMPILED) {
|
125
|
+
/**
|
126
|
+
* @public
|
127
|
+
* @override
|
128
|
+
*/
|
129
|
+
proto.ide_metrics_api.AddHistogramRequest.displayName = 'proto.ide_metrics_api.AddHistogramRequest';
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* Generated by JsPbCodeGenerator.
|
133
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
134
|
+
* server response, or constructed directly in Javascript. The array is used
|
135
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
136
|
+
* If no data is provided, the constructed object will be empty, but still
|
137
|
+
* valid.
|
138
|
+
* @extends {jspb.Message}
|
139
|
+
* @constructor
|
140
|
+
*/
|
141
|
+
proto.ide_metrics_api.AddHistogramResponse = function(opt_data) {
|
142
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
143
|
+
};
|
144
|
+
goog.inherits(proto.ide_metrics_api.AddHistogramResponse, jspb.Message);
|
145
|
+
if (goog.DEBUG && !COMPILED) {
|
146
|
+
/**
|
147
|
+
* @public
|
148
|
+
* @override
|
149
|
+
*/
|
150
|
+
proto.ide_metrics_api.AddHistogramResponse.displayName = 'proto.ide_metrics_api.AddHistogramResponse';
|
151
|
+
}
|
108
152
|
/**
|
109
153
|
* Generated by JsPbCodeGenerator.
|
110
154
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
@@ -736,6 +780,388 @@ proto.ide_metrics_api.ObserveHistogramResponse.serializeBinaryToWriter = functio
|
|
736
780
|
|
737
781
|
|
738
782
|
|
783
|
+
/**
|
784
|
+
* List of repeated fields within this message type.
|
785
|
+
* @private {!Array<number>}
|
786
|
+
* @const
|
787
|
+
*/
|
788
|
+
proto.ide_metrics_api.AddHistogramRequest.repeatedFields_ = [5];
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
793
|
+
/**
|
794
|
+
* Creates an object representation of this proto.
|
795
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
796
|
+
* Optional fields that are not set will be set to undefined.
|
797
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
798
|
+
* For the list of reserved names please see:
|
799
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
800
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
801
|
+
* JSPB instance for transitional soy proto support:
|
802
|
+
* http://goto/soy-param-migration
|
803
|
+
* @return {!Object}
|
804
|
+
*/
|
805
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.toObject = function(opt_includeInstance) {
|
806
|
+
return proto.ide_metrics_api.AddHistogramRequest.toObject(opt_includeInstance, this);
|
807
|
+
};
|
808
|
+
|
809
|
+
|
810
|
+
/**
|
811
|
+
* Static version of the {@see toObject} method.
|
812
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
813
|
+
* the JSPB instance for transitional soy proto support:
|
814
|
+
* http://goto/soy-param-migration
|
815
|
+
* @param {!proto.ide_metrics_api.AddHistogramRequest} msg The msg instance to transform.
|
816
|
+
* @return {!Object}
|
817
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
818
|
+
*/
|
819
|
+
proto.ide_metrics_api.AddHistogramRequest.toObject = function(includeInstance, msg) {
|
820
|
+
var f, obj = {
|
821
|
+
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
822
|
+
labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [],
|
823
|
+
count: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
824
|
+
sum: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
|
825
|
+
bucketsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
|
826
|
+
};
|
827
|
+
|
828
|
+
if (includeInstance) {
|
829
|
+
obj.$jspbMessageInstance = msg;
|
830
|
+
}
|
831
|
+
return obj;
|
832
|
+
};
|
833
|
+
}
|
834
|
+
|
835
|
+
|
836
|
+
/**
|
837
|
+
* Deserializes binary data (in protobuf wire format).
|
838
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
839
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest}
|
840
|
+
*/
|
841
|
+
proto.ide_metrics_api.AddHistogramRequest.deserializeBinary = function(bytes) {
|
842
|
+
var reader = new jspb.BinaryReader(bytes);
|
843
|
+
var msg = new proto.ide_metrics_api.AddHistogramRequest;
|
844
|
+
return proto.ide_metrics_api.AddHistogramRequest.deserializeBinaryFromReader(msg, reader);
|
845
|
+
};
|
846
|
+
|
847
|
+
|
848
|
+
/**
|
849
|
+
* Deserializes binary data (in protobuf wire format) from the
|
850
|
+
* given reader into the given message object.
|
851
|
+
* @param {!proto.ide_metrics_api.AddHistogramRequest} msg The message object to deserialize into.
|
852
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
853
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest}
|
854
|
+
*/
|
855
|
+
proto.ide_metrics_api.AddHistogramRequest.deserializeBinaryFromReader = function(msg, reader) {
|
856
|
+
while (reader.nextField()) {
|
857
|
+
if (reader.isEndGroup()) {
|
858
|
+
break;
|
859
|
+
}
|
860
|
+
var field = reader.getFieldNumber();
|
861
|
+
switch (field) {
|
862
|
+
case 1:
|
863
|
+
var value = /** @type {string} */ (reader.readString());
|
864
|
+
msg.setName(value);
|
865
|
+
break;
|
866
|
+
case 2:
|
867
|
+
var value = msg.getLabelsMap();
|
868
|
+
reader.readMessage(value, function(message, reader) {
|
869
|
+
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
870
|
+
});
|
871
|
+
break;
|
872
|
+
case 3:
|
873
|
+
var value = /** @type {number} */ (reader.readUint64());
|
874
|
+
msg.setCount(value);
|
875
|
+
break;
|
876
|
+
case 4:
|
877
|
+
var value = /** @type {number} */ (reader.readDouble());
|
878
|
+
msg.setSum(value);
|
879
|
+
break;
|
880
|
+
case 5:
|
881
|
+
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]);
|
882
|
+
for (var i = 0; i < values.length; i++) {
|
883
|
+
msg.addBuckets(values[i]);
|
884
|
+
}
|
885
|
+
break;
|
886
|
+
default:
|
887
|
+
reader.skipField();
|
888
|
+
break;
|
889
|
+
}
|
890
|
+
}
|
891
|
+
return msg;
|
892
|
+
};
|
893
|
+
|
894
|
+
|
895
|
+
/**
|
896
|
+
* Serializes the message to binary data (in protobuf wire format).
|
897
|
+
* @return {!Uint8Array}
|
898
|
+
*/
|
899
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.serializeBinary = function() {
|
900
|
+
var writer = new jspb.BinaryWriter();
|
901
|
+
proto.ide_metrics_api.AddHistogramRequest.serializeBinaryToWriter(this, writer);
|
902
|
+
return writer.getResultBuffer();
|
903
|
+
};
|
904
|
+
|
905
|
+
|
906
|
+
/**
|
907
|
+
* Serializes the given message to binary data (in protobuf wire
|
908
|
+
* format), writing to the given BinaryWriter.
|
909
|
+
* @param {!proto.ide_metrics_api.AddHistogramRequest} message
|
910
|
+
* @param {!jspb.BinaryWriter} writer
|
911
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
912
|
+
*/
|
913
|
+
proto.ide_metrics_api.AddHistogramRequest.serializeBinaryToWriter = function(message, writer) {
|
914
|
+
var f = undefined;
|
915
|
+
f = message.getName();
|
916
|
+
if (f.length > 0) {
|
917
|
+
writer.writeString(
|
918
|
+
1,
|
919
|
+
f
|
920
|
+
);
|
921
|
+
}
|
922
|
+
f = message.getLabelsMap(true);
|
923
|
+
if (f && f.getLength() > 0) {
|
924
|
+
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
925
|
+
}
|
926
|
+
f = message.getCount();
|
927
|
+
if (f !== 0) {
|
928
|
+
writer.writeUint64(
|
929
|
+
3,
|
930
|
+
f
|
931
|
+
);
|
932
|
+
}
|
933
|
+
f = message.getSum();
|
934
|
+
if (f !== 0.0) {
|
935
|
+
writer.writeDouble(
|
936
|
+
4,
|
937
|
+
f
|
938
|
+
);
|
939
|
+
}
|
940
|
+
f = message.getBucketsList();
|
941
|
+
if (f.length > 0) {
|
942
|
+
writer.writePackedUint64(
|
943
|
+
5,
|
944
|
+
f
|
945
|
+
);
|
946
|
+
}
|
947
|
+
};
|
948
|
+
|
949
|
+
|
950
|
+
/**
|
951
|
+
* optional string name = 1;
|
952
|
+
* @return {string}
|
953
|
+
*/
|
954
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.getName = function() {
|
955
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
956
|
+
};
|
957
|
+
|
958
|
+
|
959
|
+
/**
|
960
|
+
* @param {string} value
|
961
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest} returns this
|
962
|
+
*/
|
963
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.setName = function(value) {
|
964
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
965
|
+
};
|
966
|
+
|
967
|
+
|
968
|
+
/**
|
969
|
+
* map<string, string> labels = 2;
|
970
|
+
* @param {boolean=} opt_noLazyCreate Do not create the map if
|
971
|
+
* empty, instead returning `undefined`
|
972
|
+
* @return {!jspb.Map<string,string>}
|
973
|
+
*/
|
974
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.getLabelsMap = function(opt_noLazyCreate) {
|
975
|
+
return /** @type {!jspb.Map<string,string>} */ (
|
976
|
+
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
|
977
|
+
null));
|
978
|
+
};
|
979
|
+
|
980
|
+
|
981
|
+
/**
|
982
|
+
* Clears values from the map. The map will be non-null.
|
983
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest} returns this
|
984
|
+
*/
|
985
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.clearLabelsMap = function() {
|
986
|
+
this.getLabelsMap().clear();
|
987
|
+
return this;};
|
988
|
+
|
989
|
+
|
990
|
+
/**
|
991
|
+
* optional uint64 count = 3;
|
992
|
+
* @return {number}
|
993
|
+
*/
|
994
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.getCount = function() {
|
995
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
996
|
+
};
|
997
|
+
|
998
|
+
|
999
|
+
/**
|
1000
|
+
* @param {number} value
|
1001
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest} returns this
|
1002
|
+
*/
|
1003
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.setCount = function(value) {
|
1004
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
1005
|
+
};
|
1006
|
+
|
1007
|
+
|
1008
|
+
/**
|
1009
|
+
* optional double sum = 4;
|
1010
|
+
* @return {number}
|
1011
|
+
*/
|
1012
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.getSum = function() {
|
1013
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
|
1014
|
+
};
|
1015
|
+
|
1016
|
+
|
1017
|
+
/**
|
1018
|
+
* @param {number} value
|
1019
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest} returns this
|
1020
|
+
*/
|
1021
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.setSum = function(value) {
|
1022
|
+
return jspb.Message.setProto3FloatField(this, 4, value);
|
1023
|
+
};
|
1024
|
+
|
1025
|
+
|
1026
|
+
/**
|
1027
|
+
* repeated uint64 buckets = 5;
|
1028
|
+
* @return {!Array<number>}
|
1029
|
+
*/
|
1030
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.getBucketsList = function() {
|
1031
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 5));
|
1032
|
+
};
|
1033
|
+
|
1034
|
+
|
1035
|
+
/**
|
1036
|
+
* @param {!Array<number>} value
|
1037
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest} returns this
|
1038
|
+
*/
|
1039
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.setBucketsList = function(value) {
|
1040
|
+
return jspb.Message.setField(this, 5, value || []);
|
1041
|
+
};
|
1042
|
+
|
1043
|
+
|
1044
|
+
/**
|
1045
|
+
* @param {number} value
|
1046
|
+
* @param {number=} opt_index
|
1047
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest} returns this
|
1048
|
+
*/
|
1049
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.addBuckets = function(value, opt_index) {
|
1050
|
+
return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
|
1051
|
+
};
|
1052
|
+
|
1053
|
+
|
1054
|
+
/**
|
1055
|
+
* Clears the list making it empty but non-null.
|
1056
|
+
* @return {!proto.ide_metrics_api.AddHistogramRequest} returns this
|
1057
|
+
*/
|
1058
|
+
proto.ide_metrics_api.AddHistogramRequest.prototype.clearBucketsList = function() {
|
1059
|
+
return this.setBucketsList([]);
|
1060
|
+
};
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
|
1065
|
+
|
1066
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1067
|
+
/**
|
1068
|
+
* Creates an object representation of this proto.
|
1069
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1070
|
+
* Optional fields that are not set will be set to undefined.
|
1071
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1072
|
+
* For the list of reserved names please see:
|
1073
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1074
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1075
|
+
* JSPB instance for transitional soy proto support:
|
1076
|
+
* http://goto/soy-param-migration
|
1077
|
+
* @return {!Object}
|
1078
|
+
*/
|
1079
|
+
proto.ide_metrics_api.AddHistogramResponse.prototype.toObject = function(opt_includeInstance) {
|
1080
|
+
return proto.ide_metrics_api.AddHistogramResponse.toObject(opt_includeInstance, this);
|
1081
|
+
};
|
1082
|
+
|
1083
|
+
|
1084
|
+
/**
|
1085
|
+
* Static version of the {@see toObject} method.
|
1086
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1087
|
+
* the JSPB instance for transitional soy proto support:
|
1088
|
+
* http://goto/soy-param-migration
|
1089
|
+
* @param {!proto.ide_metrics_api.AddHistogramResponse} msg The msg instance to transform.
|
1090
|
+
* @return {!Object}
|
1091
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1092
|
+
*/
|
1093
|
+
proto.ide_metrics_api.AddHistogramResponse.toObject = function(includeInstance, msg) {
|
1094
|
+
var f, obj = {
|
1095
|
+
|
1096
|
+
};
|
1097
|
+
|
1098
|
+
if (includeInstance) {
|
1099
|
+
obj.$jspbMessageInstance = msg;
|
1100
|
+
}
|
1101
|
+
return obj;
|
1102
|
+
};
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
|
1106
|
+
/**
|
1107
|
+
* Deserializes binary data (in protobuf wire format).
|
1108
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1109
|
+
* @return {!proto.ide_metrics_api.AddHistogramResponse}
|
1110
|
+
*/
|
1111
|
+
proto.ide_metrics_api.AddHistogramResponse.deserializeBinary = function(bytes) {
|
1112
|
+
var reader = new jspb.BinaryReader(bytes);
|
1113
|
+
var msg = new proto.ide_metrics_api.AddHistogramResponse;
|
1114
|
+
return proto.ide_metrics_api.AddHistogramResponse.deserializeBinaryFromReader(msg, reader);
|
1115
|
+
};
|
1116
|
+
|
1117
|
+
|
1118
|
+
/**
|
1119
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1120
|
+
* given reader into the given message object.
|
1121
|
+
* @param {!proto.ide_metrics_api.AddHistogramResponse} msg The message object to deserialize into.
|
1122
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1123
|
+
* @return {!proto.ide_metrics_api.AddHistogramResponse}
|
1124
|
+
*/
|
1125
|
+
proto.ide_metrics_api.AddHistogramResponse.deserializeBinaryFromReader = function(msg, reader) {
|
1126
|
+
while (reader.nextField()) {
|
1127
|
+
if (reader.isEndGroup()) {
|
1128
|
+
break;
|
1129
|
+
}
|
1130
|
+
var field = reader.getFieldNumber();
|
1131
|
+
switch (field) {
|
1132
|
+
default:
|
1133
|
+
reader.skipField();
|
1134
|
+
break;
|
1135
|
+
}
|
1136
|
+
}
|
1137
|
+
return msg;
|
1138
|
+
};
|
1139
|
+
|
1140
|
+
|
1141
|
+
/**
|
1142
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1143
|
+
* @return {!Uint8Array}
|
1144
|
+
*/
|
1145
|
+
proto.ide_metrics_api.AddHistogramResponse.prototype.serializeBinary = function() {
|
1146
|
+
var writer = new jspb.BinaryWriter();
|
1147
|
+
proto.ide_metrics_api.AddHistogramResponse.serializeBinaryToWriter(this, writer);
|
1148
|
+
return writer.getResultBuffer();
|
1149
|
+
};
|
1150
|
+
|
1151
|
+
|
1152
|
+
/**
|
1153
|
+
* Serializes the given message to binary data (in protobuf wire
|
1154
|
+
* format), writing to the given BinaryWriter.
|
1155
|
+
* @param {!proto.ide_metrics_api.AddHistogramResponse} message
|
1156
|
+
* @param {!jspb.BinaryWriter} writer
|
1157
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1158
|
+
*/
|
1159
|
+
proto.ide_metrics_api.AddHistogramResponse.serializeBinaryToWriter = function(message, writer) {
|
1160
|
+
var f = undefined;
|
1161
|
+
};
|
1162
|
+
|
1163
|
+
|
1164
|
+
|
739
1165
|
|
740
1166
|
|
741
1167
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
@@ -22,6 +22,15 @@ type MetricsServiceObserveHistogram = {
|
|
22
22
|
readonly responseType: typeof idemetrics_pb.ObserveHistogramResponse;
|
23
23
|
};
|
24
24
|
|
25
|
+
type MetricsServiceAddHistogram = {
|
26
|
+
readonly methodName: string;
|
27
|
+
readonly service: typeof MetricsService;
|
28
|
+
readonly requestStream: false;
|
29
|
+
readonly responseStream: false;
|
30
|
+
readonly requestType: typeof idemetrics_pb.AddHistogramRequest;
|
31
|
+
readonly responseType: typeof idemetrics_pb.AddHistogramResponse;
|
32
|
+
};
|
33
|
+
|
25
34
|
type MetricsServicereportError = {
|
26
35
|
readonly methodName: string;
|
27
36
|
readonly service: typeof MetricsService;
|
@@ -35,6 +44,7 @@ export class MetricsService {
|
|
35
44
|
static readonly serviceName: string;
|
36
45
|
static readonly AddCounter: MetricsServiceAddCounter;
|
37
46
|
static readonly ObserveHistogram: MetricsServiceObserveHistogram;
|
47
|
+
static readonly AddHistogram: MetricsServiceAddHistogram;
|
38
48
|
static readonly reportError: MetricsServicereportError;
|
39
49
|
}
|
40
50
|
|
@@ -88,6 +98,15 @@ export class MetricsServiceClient {
|
|
88
98
|
requestMessage: idemetrics_pb.ObserveHistogramRequest,
|
89
99
|
callback: (error: ServiceError|null, responseMessage: idemetrics_pb.ObserveHistogramResponse|null) => void
|
90
100
|
): UnaryResponse;
|
101
|
+
addHistogram(
|
102
|
+
requestMessage: idemetrics_pb.AddHistogramRequest,
|
103
|
+
metadata: grpc.Metadata,
|
104
|
+
callback: (error: ServiceError|null, responseMessage: idemetrics_pb.AddHistogramResponse|null) => void
|
105
|
+
): UnaryResponse;
|
106
|
+
addHistogram(
|
107
|
+
requestMessage: idemetrics_pb.AddHistogramRequest,
|
108
|
+
callback: (error: ServiceError|null, responseMessage: idemetrics_pb.AddHistogramResponse|null) => void
|
109
|
+
): UnaryResponse;
|
91
110
|
reportError(
|
92
111
|
requestMessage: idemetrics_pb.ReportErrorRequest,
|
93
112
|
metadata: grpc.Metadata,
|
@@ -28,6 +28,15 @@ MetricsService.ObserveHistogram = {
|
|
28
28
|
responseType: idemetrics_pb.ObserveHistogramResponse
|
29
29
|
};
|
30
30
|
|
31
|
+
MetricsService.AddHistogram = {
|
32
|
+
methodName: "AddHistogram",
|
33
|
+
service: MetricsService,
|
34
|
+
requestStream: false,
|
35
|
+
responseStream: false,
|
36
|
+
requestType: idemetrics_pb.AddHistogramRequest,
|
37
|
+
responseType: idemetrics_pb.AddHistogramResponse
|
38
|
+
};
|
39
|
+
|
31
40
|
MetricsService.reportError = {
|
32
41
|
methodName: "reportError",
|
33
42
|
service: MetricsService,
|
@@ -106,6 +115,37 @@ MetricsServiceClient.prototype.observeHistogram = function observeHistogram(requ
|
|
106
115
|
};
|
107
116
|
};
|
108
117
|
|
118
|
+
MetricsServiceClient.prototype.addHistogram = function addHistogram(requestMessage, metadata, callback) {
|
119
|
+
if (arguments.length === 2) {
|
120
|
+
callback = arguments[1];
|
121
|
+
}
|
122
|
+
var client = grpc.unary(MetricsService.AddHistogram, {
|
123
|
+
request: requestMessage,
|
124
|
+
host: this.serviceHost,
|
125
|
+
metadata: metadata,
|
126
|
+
transport: this.options.transport,
|
127
|
+
debug: this.options.debug,
|
128
|
+
onEnd: function (response) {
|
129
|
+
if (callback) {
|
130
|
+
if (response.status !== grpc.Code.OK) {
|
131
|
+
var err = new Error(response.statusMessage);
|
132
|
+
err.code = response.status;
|
133
|
+
err.metadata = response.trailers;
|
134
|
+
callback(err, null);
|
135
|
+
} else {
|
136
|
+
callback(null, response.message);
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
});
|
141
|
+
return {
|
142
|
+
cancel: function () {
|
143
|
+
callback = null;
|
144
|
+
client.close();
|
145
|
+
}
|
146
|
+
};
|
147
|
+
};
|
148
|
+
|
109
149
|
MetricsServiceClient.prototype.reportError = function reportError(requestMessage, metadata, callback) {
|
110
150
|
if (arguments.length === 2) {
|
111
151
|
callback = arguments[1];
|
package/lib/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) 2023 Gitpod GmbH. All rights reserved.
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
4
|
-
* See License
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
5
5
|
*/
|
6
6
|
export * from "../lib/idemetrics_pb";
|
7
7
|
export * from "../lib/idemetrics_pb_service";
|