@valkey/valkey-glide 1.3.5-rc8 → 2.0.0-rc5
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/README.md +18 -7
- package/build-ts/BaseClient.d.ts +85 -18
- package/build-ts/BaseClient.js +288 -246
- package/build-ts/Batch.d.ts +6 -6
- package/build-ts/Batch.js +230 -230
- package/build-ts/Commands.d.ts +14 -2
- package/build-ts/Commands.js +24 -12
- package/build-ts/Errors.js +1 -0
- package/build-ts/GlideClient.d.ts +7 -38
- package/build-ts/GlideClient.js +56 -55
- package/build-ts/GlideClusterClient.d.ts +12 -4
- package/build-ts/GlideClusterClient.js +60 -54
- package/build-ts/Logger.d.ts +30 -15
- package/build-ts/Logger.js +36 -24
- package/build-ts/OpenTelemetry.d.ts +101 -0
- package/build-ts/OpenTelemetry.js +134 -0
- package/build-ts/ProtobufMessage.d.ts +18 -84
- package/build-ts/ProtobufMessage.js +52 -184
- package/build-ts/index.d.ts +2 -2
- package/build-ts/index.js +2 -25
- package/build-ts/native.d.ts +158 -14
- package/build-ts/native.js +134 -105
- package/build-ts/server-modules/GlideFt.d.ts +1 -4
- package/build-ts/server-modules/GlideFt.js +10 -11
- package/build-ts/server-modules/GlideFtOptions.d.ts +1 -2
- package/build-ts/server-modules/GlideJson.d.ts +3 -5
- package/build-ts/server-modules/GlideJson.js +2 -2
- package/package.json +7 -7
|
@@ -2862,6 +2862,7 @@ $root.command_request = (function() {
|
|
|
2862
2862
|
* @property {command_request.IClusterScan|null} [clusterScan] CommandRequest clusterScan
|
|
2863
2863
|
* @property {command_request.IUpdateConnectionPassword|null} [updateConnectionPassword] CommandRequest updateConnectionPassword
|
|
2864
2864
|
* @property {command_request.IRoutes|null} [route] CommandRequest route
|
|
2865
|
+
* @property {number|Long|null} [rootSpanPtr] CommandRequest rootSpanPtr
|
|
2865
2866
|
*/
|
|
2866
2867
|
|
|
2867
2868
|
/**
|
|
@@ -2943,6 +2944,14 @@ $root.command_request = (function() {
|
|
|
2943
2944
|
*/
|
|
2944
2945
|
CommandRequest.prototype.route = null;
|
|
2945
2946
|
|
|
2947
|
+
/**
|
|
2948
|
+
* CommandRequest rootSpanPtr.
|
|
2949
|
+
* @member {number|Long|null|undefined} rootSpanPtr
|
|
2950
|
+
* @memberof command_request.CommandRequest
|
|
2951
|
+
* @instance
|
|
2952
|
+
*/
|
|
2953
|
+
CommandRequest.prototype.rootSpanPtr = null;
|
|
2954
|
+
|
|
2946
2955
|
// OneOf field names bound to virtual getters and setters
|
|
2947
2956
|
var $oneOfFields;
|
|
2948
2957
|
|
|
@@ -2957,6 +2966,17 @@ $root.command_request = (function() {
|
|
|
2957
2966
|
set: $util.oneOfSetter($oneOfFields)
|
|
2958
2967
|
});
|
|
2959
2968
|
|
|
2969
|
+
/**
|
|
2970
|
+
* CommandRequest _rootSpanPtr.
|
|
2971
|
+
* @member {"rootSpanPtr"|undefined} _rootSpanPtr
|
|
2972
|
+
* @memberof command_request.CommandRequest
|
|
2973
|
+
* @instance
|
|
2974
|
+
*/
|
|
2975
|
+
Object.defineProperty(CommandRequest.prototype, "_rootSpanPtr", {
|
|
2976
|
+
get: $util.oneOfGetter($oneOfFields = ["rootSpanPtr"]),
|
|
2977
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
2978
|
+
});
|
|
2979
|
+
|
|
2960
2980
|
/**
|
|
2961
2981
|
* Creates a new CommandRequest instance using the specified properties.
|
|
2962
2982
|
* @function create
|
|
@@ -2997,6 +3017,8 @@ $root.command_request = (function() {
|
|
|
2997
3017
|
$root.command_request.UpdateConnectionPassword.encode(message.updateConnectionPassword, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
2998
3018
|
if (message.route != null && Object.hasOwnProperty.call(message, "route"))
|
|
2999
3019
|
$root.command_request.Routes.encode(message.route, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
3020
|
+
if (message.rootSpanPtr != null && Object.hasOwnProperty.call(message, "rootSpanPtr"))
|
|
3021
|
+
writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.rootSpanPtr);
|
|
3000
3022
|
return writer;
|
|
3001
3023
|
};
|
|
3002
3024
|
|
|
@@ -3065,6 +3087,10 @@ $root.command_request = (function() {
|
|
|
3065
3087
|
message.route = $root.command_request.Routes.decode(reader, reader.uint32());
|
|
3066
3088
|
break;
|
|
3067
3089
|
}
|
|
3090
|
+
case 9: {
|
|
3091
|
+
message.rootSpanPtr = reader.uint64();
|
|
3092
|
+
break;
|
|
3093
|
+
}
|
|
3068
3094
|
default:
|
|
3069
3095
|
reader.skipType(tag & 7);
|
|
3070
3096
|
break;
|
|
@@ -4067,175 +4093,6 @@ $root.connection_request = (function() {
|
|
|
4067
4093
|
return PubSubSubscriptions;
|
|
4068
4094
|
})();
|
|
4069
4095
|
|
|
4070
|
-
connection_request.OpenTelemetryConfig = (function() {
|
|
4071
|
-
|
|
4072
|
-
/**
|
|
4073
|
-
* Properties of an OpenTelemetryConfig.
|
|
4074
|
-
* @memberof connection_request
|
|
4075
|
-
* @interface IOpenTelemetryConfig
|
|
4076
|
-
* @property {string|null} [collectorEndPoint] OpenTelemetryConfig collectorEndPoint
|
|
4077
|
-
* @property {number|Long|null} [spanFlushInterval] OpenTelemetryConfig spanFlushInterval
|
|
4078
|
-
*/
|
|
4079
|
-
|
|
4080
|
-
/**
|
|
4081
|
-
* Constructs a new OpenTelemetryConfig.
|
|
4082
|
-
* @memberof connection_request
|
|
4083
|
-
* @classdesc Represents an OpenTelemetryConfig.
|
|
4084
|
-
* @implements IOpenTelemetryConfig
|
|
4085
|
-
* @constructor
|
|
4086
|
-
* @param {connection_request.IOpenTelemetryConfig=} [properties] Properties to set
|
|
4087
|
-
*/
|
|
4088
|
-
function OpenTelemetryConfig(properties) {
|
|
4089
|
-
if (properties)
|
|
4090
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
4091
|
-
if (properties[keys[i]] != null)
|
|
4092
|
-
this[keys[i]] = properties[keys[i]];
|
|
4093
|
-
}
|
|
4094
|
-
|
|
4095
|
-
/**
|
|
4096
|
-
* OpenTelemetryConfig collectorEndPoint.
|
|
4097
|
-
* @member {string} collectorEndPoint
|
|
4098
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4099
|
-
* @instance
|
|
4100
|
-
*/
|
|
4101
|
-
OpenTelemetryConfig.prototype.collectorEndPoint = "";
|
|
4102
|
-
|
|
4103
|
-
/**
|
|
4104
|
-
* OpenTelemetryConfig spanFlushInterval.
|
|
4105
|
-
* @member {number|Long|null|undefined} spanFlushInterval
|
|
4106
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4107
|
-
* @instance
|
|
4108
|
-
*/
|
|
4109
|
-
OpenTelemetryConfig.prototype.spanFlushInterval = null;
|
|
4110
|
-
|
|
4111
|
-
// OneOf field names bound to virtual getters and setters
|
|
4112
|
-
var $oneOfFields;
|
|
4113
|
-
|
|
4114
|
-
/**
|
|
4115
|
-
* OpenTelemetryConfig _spanFlushInterval.
|
|
4116
|
-
* @member {"spanFlushInterval"|undefined} _spanFlushInterval
|
|
4117
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4118
|
-
* @instance
|
|
4119
|
-
*/
|
|
4120
|
-
Object.defineProperty(OpenTelemetryConfig.prototype, "_spanFlushInterval", {
|
|
4121
|
-
get: $util.oneOfGetter($oneOfFields = ["spanFlushInterval"]),
|
|
4122
|
-
set: $util.oneOfSetter($oneOfFields)
|
|
4123
|
-
});
|
|
4124
|
-
|
|
4125
|
-
/**
|
|
4126
|
-
* Creates a new OpenTelemetryConfig instance using the specified properties.
|
|
4127
|
-
* @function create
|
|
4128
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4129
|
-
* @static
|
|
4130
|
-
* @param {connection_request.IOpenTelemetryConfig=} [properties] Properties to set
|
|
4131
|
-
* @returns {connection_request.OpenTelemetryConfig} OpenTelemetryConfig instance
|
|
4132
|
-
*/
|
|
4133
|
-
OpenTelemetryConfig.create = function create(properties) {
|
|
4134
|
-
return new OpenTelemetryConfig(properties);
|
|
4135
|
-
};
|
|
4136
|
-
|
|
4137
|
-
/**
|
|
4138
|
-
* Encodes the specified OpenTelemetryConfig message. Does not implicitly {@link connection_request.OpenTelemetryConfig.verify|verify} messages.
|
|
4139
|
-
* @function encode
|
|
4140
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4141
|
-
* @static
|
|
4142
|
-
* @param {connection_request.IOpenTelemetryConfig} message OpenTelemetryConfig message or plain object to encode
|
|
4143
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4144
|
-
* @returns {$protobuf.Writer} Writer
|
|
4145
|
-
*/
|
|
4146
|
-
OpenTelemetryConfig.encode = function encode(message, writer) {
|
|
4147
|
-
if (!writer)
|
|
4148
|
-
writer = $Writer.create();
|
|
4149
|
-
if (message.collectorEndPoint != null && Object.hasOwnProperty.call(message, "collectorEndPoint"))
|
|
4150
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.collectorEndPoint);
|
|
4151
|
-
if (message.spanFlushInterval != null && Object.hasOwnProperty.call(message, "spanFlushInterval"))
|
|
4152
|
-
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.spanFlushInterval);
|
|
4153
|
-
return writer;
|
|
4154
|
-
};
|
|
4155
|
-
|
|
4156
|
-
/**
|
|
4157
|
-
* Encodes the specified OpenTelemetryConfig message, length delimited. Does not implicitly {@link connection_request.OpenTelemetryConfig.verify|verify} messages.
|
|
4158
|
-
* @function encodeDelimited
|
|
4159
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4160
|
-
* @static
|
|
4161
|
-
* @param {connection_request.IOpenTelemetryConfig} message OpenTelemetryConfig message or plain object to encode
|
|
4162
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4163
|
-
* @returns {$protobuf.Writer} Writer
|
|
4164
|
-
*/
|
|
4165
|
-
OpenTelemetryConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
4166
|
-
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
4167
|
-
};
|
|
4168
|
-
|
|
4169
|
-
/**
|
|
4170
|
-
* Decodes an OpenTelemetryConfig message from the specified reader or buffer.
|
|
4171
|
-
* @function decode
|
|
4172
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4173
|
-
* @static
|
|
4174
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4175
|
-
* @param {number} [length] Message length if known beforehand
|
|
4176
|
-
* @returns {connection_request.OpenTelemetryConfig} OpenTelemetryConfig
|
|
4177
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4178
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4179
|
-
*/
|
|
4180
|
-
OpenTelemetryConfig.decode = function decode(reader, length, error) {
|
|
4181
|
-
if (!(reader instanceof $Reader))
|
|
4182
|
-
reader = $Reader.create(reader);
|
|
4183
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.connection_request.OpenTelemetryConfig();
|
|
4184
|
-
while (reader.pos < end) {
|
|
4185
|
-
var tag = reader.uint32();
|
|
4186
|
-
if (tag === error)
|
|
4187
|
-
break;
|
|
4188
|
-
switch (tag >>> 3) {
|
|
4189
|
-
case 1: {
|
|
4190
|
-
message.collectorEndPoint = reader.string();
|
|
4191
|
-
break;
|
|
4192
|
-
}
|
|
4193
|
-
case 2: {
|
|
4194
|
-
message.spanFlushInterval = reader.uint64();
|
|
4195
|
-
break;
|
|
4196
|
-
}
|
|
4197
|
-
default:
|
|
4198
|
-
reader.skipType(tag & 7);
|
|
4199
|
-
break;
|
|
4200
|
-
}
|
|
4201
|
-
}
|
|
4202
|
-
return message;
|
|
4203
|
-
};
|
|
4204
|
-
|
|
4205
|
-
/**
|
|
4206
|
-
* Decodes an OpenTelemetryConfig message from the specified reader or buffer, length delimited.
|
|
4207
|
-
* @function decodeDelimited
|
|
4208
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4209
|
-
* @static
|
|
4210
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
4211
|
-
* @returns {connection_request.OpenTelemetryConfig} OpenTelemetryConfig
|
|
4212
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4213
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4214
|
-
*/
|
|
4215
|
-
OpenTelemetryConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
4216
|
-
if (!(reader instanceof $Reader))
|
|
4217
|
-
reader = new $Reader(reader);
|
|
4218
|
-
return this.decode(reader, reader.uint32());
|
|
4219
|
-
};
|
|
4220
|
-
|
|
4221
|
-
/**
|
|
4222
|
-
* Gets the default type url for OpenTelemetryConfig
|
|
4223
|
-
* @function getTypeUrl
|
|
4224
|
-
* @memberof connection_request.OpenTelemetryConfig
|
|
4225
|
-
* @static
|
|
4226
|
-
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4227
|
-
* @returns {string} The default type url
|
|
4228
|
-
*/
|
|
4229
|
-
OpenTelemetryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
4230
|
-
if (typeUrlPrefix === undefined) {
|
|
4231
|
-
typeUrlPrefix = "type.googleapis.com";
|
|
4232
|
-
}
|
|
4233
|
-
return typeUrlPrefix + "/connection_request.OpenTelemetryConfig";
|
|
4234
|
-
};
|
|
4235
|
-
|
|
4236
|
-
return OpenTelemetryConfig;
|
|
4237
|
-
})();
|
|
4238
|
-
|
|
4239
4096
|
connection_request.ConnectionRequest = (function() {
|
|
4240
4097
|
|
|
4241
4098
|
/**
|
|
@@ -4258,7 +4115,6 @@ $root.connection_request = (function() {
|
|
|
4258
4115
|
* @property {number|null} [inflightRequestsLimit] ConnectionRequest inflightRequestsLimit
|
|
4259
4116
|
* @property {string|null} [clientAz] ConnectionRequest clientAz
|
|
4260
4117
|
* @property {number|null} [connectionTimeout] ConnectionRequest connectionTimeout
|
|
4261
|
-
* @property {connection_request.IOpenTelemetryConfig|null} [opentelemetryConfig] ConnectionRequest opentelemetryConfig
|
|
4262
4118
|
*/
|
|
4263
4119
|
|
|
4264
4120
|
/**
|
|
@@ -4405,14 +4261,6 @@ $root.connection_request = (function() {
|
|
|
4405
4261
|
*/
|
|
4406
4262
|
ConnectionRequest.prototype.connectionTimeout = 0;
|
|
4407
4263
|
|
|
4408
|
-
/**
|
|
4409
|
-
* ConnectionRequest opentelemetryConfig.
|
|
4410
|
-
* @member {connection_request.IOpenTelemetryConfig|null|undefined} opentelemetryConfig
|
|
4411
|
-
* @memberof connection_request.ConnectionRequest
|
|
4412
|
-
* @instance
|
|
4413
|
-
*/
|
|
4414
|
-
ConnectionRequest.prototype.opentelemetryConfig = null;
|
|
4415
|
-
|
|
4416
4264
|
// OneOf field names bound to virtual getters and setters
|
|
4417
4265
|
var $oneOfFields;
|
|
4418
4266
|
|
|
@@ -4484,8 +4332,6 @@ $root.connection_request = (function() {
|
|
|
4484
4332
|
writer.uint32(/* id 15, wireType 2 =*/122).string(message.clientAz);
|
|
4485
4333
|
if (message.connectionTimeout != null && Object.hasOwnProperty.call(message, "connectionTimeout"))
|
|
4486
4334
|
writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.connectionTimeout);
|
|
4487
|
-
if (message.opentelemetryConfig != null && Object.hasOwnProperty.call(message, "opentelemetryConfig"))
|
|
4488
|
-
$root.connection_request.OpenTelemetryConfig.encode(message.opentelemetryConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
|
|
4489
4335
|
return writer;
|
|
4490
4336
|
};
|
|
4491
4337
|
|
|
@@ -4588,10 +4434,6 @@ $root.connection_request = (function() {
|
|
|
4588
4434
|
message.connectionTimeout = reader.uint32();
|
|
4589
4435
|
break;
|
|
4590
4436
|
}
|
|
4591
|
-
case 17: {
|
|
4592
|
-
message.opentelemetryConfig = $root.connection_request.OpenTelemetryConfig.decode(reader, reader.uint32());
|
|
4593
|
-
break;
|
|
4594
|
-
}
|
|
4595
4437
|
default:
|
|
4596
4438
|
reader.skipType(tag & 7);
|
|
4597
4439
|
break;
|
|
@@ -5030,6 +4872,7 @@ $root.response = (function() {
|
|
|
5030
4872
|
* @property {response.IRequestError|null} [requestError] Response requestError
|
|
5031
4873
|
* @property {string|null} [closingError] Response closingError
|
|
5032
4874
|
* @property {boolean|null} [isPush] Response isPush
|
|
4875
|
+
* @property {number|Long|null} [rootSpanPtr] Response rootSpanPtr
|
|
5033
4876
|
*/
|
|
5034
4877
|
|
|
5035
4878
|
/**
|
|
@@ -5095,6 +4938,14 @@ $root.response = (function() {
|
|
|
5095
4938
|
*/
|
|
5096
4939
|
Response.prototype.isPush = false;
|
|
5097
4940
|
|
|
4941
|
+
/**
|
|
4942
|
+
* Response rootSpanPtr.
|
|
4943
|
+
* @member {number|Long|null|undefined} rootSpanPtr
|
|
4944
|
+
* @memberof response.Response
|
|
4945
|
+
* @instance
|
|
4946
|
+
*/
|
|
4947
|
+
Response.prototype.rootSpanPtr = null;
|
|
4948
|
+
|
|
5098
4949
|
// OneOf field names bound to virtual getters and setters
|
|
5099
4950
|
var $oneOfFields;
|
|
5100
4951
|
|
|
@@ -5109,6 +4960,17 @@ $root.response = (function() {
|
|
|
5109
4960
|
set: $util.oneOfSetter($oneOfFields)
|
|
5110
4961
|
});
|
|
5111
4962
|
|
|
4963
|
+
/**
|
|
4964
|
+
* Response _rootSpanPtr.
|
|
4965
|
+
* @member {"rootSpanPtr"|undefined} _rootSpanPtr
|
|
4966
|
+
* @memberof response.Response
|
|
4967
|
+
* @instance
|
|
4968
|
+
*/
|
|
4969
|
+
Object.defineProperty(Response.prototype, "_rootSpanPtr", {
|
|
4970
|
+
get: $util.oneOfGetter($oneOfFields = ["rootSpanPtr"]),
|
|
4971
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
4972
|
+
});
|
|
4973
|
+
|
|
5112
4974
|
/**
|
|
5113
4975
|
* Creates a new Response instance using the specified properties.
|
|
5114
4976
|
* @function create
|
|
@@ -5145,6 +5007,8 @@ $root.response = (function() {
|
|
|
5145
5007
|
writer.uint32(/* id 5, wireType 2 =*/42).string(message.closingError);
|
|
5146
5008
|
if (message.isPush != null && Object.hasOwnProperty.call(message, "isPush"))
|
|
5147
5009
|
writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isPush);
|
|
5010
|
+
if (message.rootSpanPtr != null && Object.hasOwnProperty.call(message, "rootSpanPtr"))
|
|
5011
|
+
writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.rootSpanPtr);
|
|
5148
5012
|
return writer;
|
|
5149
5013
|
};
|
|
5150
5014
|
|
|
@@ -5205,6 +5069,10 @@ $root.response = (function() {
|
|
|
5205
5069
|
message.isPush = reader.bool();
|
|
5206
5070
|
break;
|
|
5207
5071
|
}
|
|
5072
|
+
case 7: {
|
|
5073
|
+
message.rootSpanPtr = reader.uint64();
|
|
5074
|
+
break;
|
|
5075
|
+
}
|
|
5208
5076
|
default:
|
|
5209
5077
|
reader.skipType(tag & 7);
|
|
5210
5078
|
break;
|
package/build-ts/index.d.ts
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* - Native bindings auto-generated by napi-rs (moved to ./native.js)
|
|
6
6
|
* - All TypeScript client-side APIs from ./src/
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
export declare const Level: typeof Native.Level, MAX_REQUEST_ARGS_LEN: number, DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS: number, DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS: number, DEFAULT_INFLIGHT_REQUESTS_LIMIT: number, AsyncClient: typeof Native.AsyncClient, StartSocketConnection: typeof Native.StartSocketConnection, log: typeof Native.log, InitInternalLogger: typeof Native.InitInternalLogger, valueFromSplitPointer: typeof Native.valueFromSplitPointer, createLeakedStringVec: typeof Native.createLeakedStringVec, Script: typeof Native.Script, ClusterScanCursor: typeof Native.ClusterScanCursor, getStatistics: typeof Native.getStatistics;
|
|
8
|
+
export * from "../build-ts/native";
|
|
10
9
|
export * from "./BaseClient.js";
|
|
11
10
|
export * from "./Batch.js";
|
|
12
11
|
export * from "./Commands.js";
|
|
@@ -14,6 +13,7 @@ export * from "./Errors.js";
|
|
|
14
13
|
export * from "./GlideClient.js";
|
|
15
14
|
export * from "./GlideClusterClient.js";
|
|
16
15
|
export * from "./Logger.js";
|
|
16
|
+
export * from "./OpenTelemetry.js";
|
|
17
17
|
export * from "./server-modules/GlideFt.js";
|
|
18
18
|
export * from "./server-modules/GlideFtOptions.js";
|
|
19
19
|
export * from "./server-modules/GlideJson.js";
|
package/build-ts/index.js
CHANGED
|
@@ -17,35 +17,11 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
17
17
|
if (k2 === undefined) k2 = k;
|
|
18
18
|
o[k2] = m[k];
|
|
19
19
|
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
-
var ownKeys = function(o) {
|
|
27
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
-
var ar = [];
|
|
29
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
return ownKeys(o);
|
|
33
|
-
};
|
|
34
|
-
return function (mod) {
|
|
35
|
-
if (mod && mod.__esModule) return mod;
|
|
36
|
-
var result = {};
|
|
37
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
-
__setModuleDefault(result, mod);
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
20
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
43
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
44
22
|
};
|
|
45
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
|
|
47
|
-
const Native = __importStar(require("./native"));
|
|
48
|
-
exports.Level = Native.Level, exports.MAX_REQUEST_ARGS_LEN = Native.MAX_REQUEST_ARGS_LEN, exports.DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS = Native.DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS, exports.DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS = Native.DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS, exports.DEFAULT_INFLIGHT_REQUESTS_LIMIT = Native.DEFAULT_INFLIGHT_REQUESTS_LIMIT, exports.AsyncClient = Native.AsyncClient, exports.StartSocketConnection = Native.StartSocketConnection, exports.log = Native.log, exports.InitInternalLogger = Native.InitInternalLogger, exports.valueFromSplitPointer = Native.valueFromSplitPointer, exports.createLeakedStringVec = Native.createLeakedStringVec, exports.Script = Native.Script, exports.ClusterScanCursor = Native.ClusterScanCursor, exports.getStatistics = Native.getStatistics;
|
|
24
|
+
__exportStar(require("../build-ts/native"), exports);
|
|
49
25
|
// Export TypeScript APIs
|
|
50
26
|
__exportStar(require("./BaseClient.js"), exports);
|
|
51
27
|
__exportStar(require("./Batch.js"), exports);
|
|
@@ -54,6 +30,7 @@ __exportStar(require("./Errors.js"), exports);
|
|
|
54
30
|
__exportStar(require("./GlideClient.js"), exports);
|
|
55
31
|
__exportStar(require("./GlideClusterClient.js"), exports);
|
|
56
32
|
__exportStar(require("./Logger.js"), exports);
|
|
33
|
+
__exportStar(require("./OpenTelemetry.js"), exports);
|
|
57
34
|
__exportStar(require("./server-modules/GlideFt.js"), exports);
|
|
58
35
|
__exportStar(require("./server-modules/GlideFtOptions.js"), exports);
|
|
59
36
|
__exportStar(require("./server-modules/GlideJson.js"), exports);
|
package/build-ts/native.d.ts
CHANGED
|
@@ -1,14 +1,158 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/* auto-generated by NAPI-RS */
|
|
5
|
+
|
|
6
|
+
export const enum Level {
|
|
7
|
+
Debug = 3,
|
|
8
|
+
Error = 0,
|
|
9
|
+
Info = 2,
|
|
10
|
+
Trace = 4,
|
|
11
|
+
Warn = 1,
|
|
12
|
+
Off = 5,
|
|
13
|
+
}
|
|
14
|
+
export const MAX_REQUEST_ARGS_LEN: number;
|
|
15
|
+
export const DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS: number;
|
|
16
|
+
export const DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS: number;
|
|
17
|
+
export const DEFAULT_INFLIGHT_REQUESTS_LIMIT: number;
|
|
18
|
+
/**
|
|
19
|
+
* Configuration for OpenTelemetry integration in the Node.js client.
|
|
20
|
+
*
|
|
21
|
+
* This struct allows you to configure how telemetry data (traces and metrics) is exported to an OpenTelemetry collector.
|
|
22
|
+
* - `traces`: Optional configuration for exporting trace data. If `None`, trace data will not be exported.
|
|
23
|
+
* - `metrics`: Optional configuration for exporting metrics data. If `None`, metrics data will not be exported.
|
|
24
|
+
* - `flush_interval_ms`: Optional interval in milliseconds between consecutive exports of telemetry data. If `None`, a default value will be used.
|
|
25
|
+
*
|
|
26
|
+
* At least one of traces or metrics must be provided.
|
|
27
|
+
*/
|
|
28
|
+
export interface OpenTelemetryConfig {
|
|
29
|
+
/** Optional configuration for exporting trace data. If `None`, trace data will not be exported. */
|
|
30
|
+
traces?: OpenTelemetryTracesConfig;
|
|
31
|
+
/** Optional configuration for exporting metrics data. If `None`, metrics data will not be exported. */
|
|
32
|
+
metrics?: OpenTelemetryMetricsConfig;
|
|
33
|
+
/** Optional interval in milliseconds between consecutive exports of telemetry data. If `None`, the default `DEFAULT_FLUSH_SIGNAL_INTERVAL_MS` will be used. */
|
|
34
|
+
flushIntervalMs?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Configuration for exporting OpenTelemetry traces.
|
|
38
|
+
*
|
|
39
|
+
* - `endpoint`: The endpoint to which trace data will be exported. Expected format:
|
|
40
|
+
* - For gRPC: `grpc://host:port`
|
|
41
|
+
* - For HTTP: `http://host:port` or `https://host:port`
|
|
42
|
+
* - For file exporter: `file:///absolute/path/to/folder/file.json`
|
|
43
|
+
* - `sample_percentage`: The percentage of requests to sample and create a span for, used to measure command duration. If `None`, a default value DEFAULT_TRACE_SAMPLE_PERCENTAGE will be used.
|
|
44
|
+
* Note: There is a tradeoff between sampling percentage and performance. Higher sampling percentages will provide more detailed telemetry data but will impact performance.
|
|
45
|
+
* It is recommended to keep this number low (1-5%) in production environments unless you have specific needs for higher sampling rates.
|
|
46
|
+
*/
|
|
47
|
+
export interface OpenTelemetryTracesConfig {
|
|
48
|
+
/** The endpoint to which trace data will be exported. */
|
|
49
|
+
endpoint: string;
|
|
50
|
+
/**
|
|
51
|
+
* The percentage of requests to sample and create a span for, used to measure command duration. If `None`, a default value DEFAULT_TRACE_SAMPLE_PERCENTAGE will be used.
|
|
52
|
+
* Note: There is a tradeoff between sampling percentage and performance. Higher sampling percentages will provide more detailed telemetry data but will impact performance.
|
|
53
|
+
* It is recommended to keep this number low (1-5%) in production environments unless you have specific needs for higher sampling rates.
|
|
54
|
+
*/
|
|
55
|
+
samplePercentage?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Configuration for exporting OpenTelemetry metrics.
|
|
59
|
+
*
|
|
60
|
+
* - `endpoint`: The endpoint to which metrics data will be exported. Expected format:
|
|
61
|
+
* - For gRPC: `grpc://host:port`
|
|
62
|
+
* - For HTTP: `http://host:port` or `https://host:port`
|
|
63
|
+
* - For file exporter: `file:///absolute/path/to/folder/file.json`
|
|
64
|
+
*/
|
|
65
|
+
export interface OpenTelemetryMetricsConfig {
|
|
66
|
+
/** The endpoint to which metrics data will be exported. */
|
|
67
|
+
endpoint: string;
|
|
68
|
+
}
|
|
69
|
+
export declare function StartSocketConnection(): Promise<string>;
|
|
70
|
+
export declare function InitOpenTelemetry(
|
|
71
|
+
openTelemetryConfig: OpenTelemetryConfig,
|
|
72
|
+
): void;
|
|
73
|
+
export declare function log(
|
|
74
|
+
logLevel: Level,
|
|
75
|
+
logIdentifier: string,
|
|
76
|
+
message: string,
|
|
77
|
+
): void;
|
|
78
|
+
export declare function InitInternalLogger(
|
|
79
|
+
level?: Level | undefined | null,
|
|
80
|
+
fileName?: string | undefined | null,
|
|
81
|
+
): Level;
|
|
82
|
+
export declare function valueFromSplitPointer(
|
|
83
|
+
highBits: number,
|
|
84
|
+
lowBits: number,
|
|
85
|
+
stringDecoder: boolean,
|
|
86
|
+
):
|
|
87
|
+
| null
|
|
88
|
+
| string
|
|
89
|
+
| Uint8Array
|
|
90
|
+
| number
|
|
91
|
+
| {}
|
|
92
|
+
| Boolean
|
|
93
|
+
| BigInt
|
|
94
|
+
| Set<any>
|
|
95
|
+
| any[]
|
|
96
|
+
| Buffer;
|
|
97
|
+
/**
|
|
98
|
+
* @internal @test
|
|
99
|
+
* This function is for tests that require a value allocated on the heap.
|
|
100
|
+
* Should NOT be used in production.
|
|
101
|
+
*/
|
|
102
|
+
export declare function createLeakedStringVec(
|
|
103
|
+
message: Array<Uint8Array>,
|
|
104
|
+
): [number, number];
|
|
105
|
+
/** Creates an open telemetry span with the given name and returns a pointer to the span */
|
|
106
|
+
export declare function createLeakedOtelSpan(name: string): [number, number];
|
|
107
|
+
export declare function dropOtelSpan(spanPtr: bigint): void;
|
|
108
|
+
export declare function getStatistics(): object;
|
|
109
|
+
export declare class AsyncClient {
|
|
110
|
+
static CreateConnection(connectionAddress: string): AsyncClient;
|
|
111
|
+
get(key: string): Promise<string | Buffer | null>;
|
|
112
|
+
set(key: string, value: string): Promise<string | Buffer | "OK" | null>;
|
|
113
|
+
}
|
|
114
|
+
/** A wrapper for a script object. As long as this object is alive, the script's code is saved in memory, and can be resent to the server. */
|
|
115
|
+
export declare class Script {
|
|
116
|
+
/** Construct with the script's code. */
|
|
117
|
+
constructor(code: string | Uint8Array);
|
|
118
|
+
/** Returns the hash of the script. */
|
|
119
|
+
getHash(): string;
|
|
120
|
+
/**
|
|
121
|
+
* Decrements the script's reference count in the local container.
|
|
122
|
+
* Removes the script when the count reaches zero.
|
|
123
|
+
*
|
|
124
|
+
* This method is primarily intended for testing or manual cleanup.
|
|
125
|
+
* It does not need to be called explicitly, as the script will be automatically
|
|
126
|
+
* released when dropped.
|
|
127
|
+
*/
|
|
128
|
+
release(): void;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* This struct is used to keep track of the cursor of a cluster scan.
|
|
132
|
+
* We want to avoid passing the cursor between layers of the application,
|
|
133
|
+
* So we keep the state in the container and only pass the id of the cursor.
|
|
134
|
+
* The cursor is stored in the container and can be retrieved using the id.
|
|
135
|
+
* The cursor is removed from the container when the object is deleted (dropped).
|
|
136
|
+
* To create a cursor:
|
|
137
|
+
* ```typescript
|
|
138
|
+
* // For a new cursor
|
|
139
|
+
* let cursor = new ClusterScanCursor();
|
|
140
|
+
* // Using an existing id
|
|
141
|
+
* let cursor = new ClusterScanCursor("cursor_id");
|
|
142
|
+
* ```
|
|
143
|
+
* To get the cursor id:
|
|
144
|
+
* ```typescript
|
|
145
|
+
* let cursorId = cursor.getCursor();
|
|
146
|
+
* ```
|
|
147
|
+
* To check if the scan is finished:
|
|
148
|
+
* ```typescript
|
|
149
|
+
* let isFinished = cursor.isFinished(); // true if the scan is finished
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
export declare class ClusterScanCursor {
|
|
153
|
+
constructor(newCursor?: string | undefined | null);
|
|
154
|
+
/** Returns the cursor id. */
|
|
155
|
+
getCursor(): string;
|
|
156
|
+
/** Returns true if the scan is finished. */
|
|
157
|
+
isFinished(): boolean;
|
|
158
|
+
}
|