@valkey/valkey-glide 1.1.0-rc10
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 +39 -0
- package/build-ts/index.d.ts +11 -0
- package/build-ts/index.js +184 -0
- package/build-ts/src/BaseClient.d.ts +5126 -0
- package/build-ts/src/Commands.d.ts +1800 -0
- package/build-ts/src/Errors.d.ts +21 -0
- package/build-ts/src/GlideClient.d.ts +737 -0
- package/build-ts/src/GlideClusterClient.d.ts +1057 -0
- package/build-ts/src/Logger.d.ts +31 -0
- package/build-ts/src/ProtobufMessage.d.ts +2 -0
- package/build-ts/src/Transaction.d.ts +2997 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Valkey GLIDE
|
|
2
|
+
|
|
3
|
+
Valkey General Language Independent Driver for the Enterprise (GLIDE), is an open-source Valkey client library. Valkey GLIDE is one of the official client libraries for Valkey, and it supports all Valkey commands. Valkey GLIDE supports Valkey 7.2 and above, and Redis open-source 6.2, 7.0 and 7.2. Application programmers use Valkey GLIDE to safely and reliably connect their applications to Valkey- and Redis OSS- compatible services. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. It is sponsored and supported by AWS, and is pre-configured with best practices learned from over a decade of operating Redis OSS-compatible services used by hundreds of thousands of customers. To help ensure consistency in application development and operations, Valkey GLIDE is implemented using a core driver framework, written in Rust, with language specific extensions. This design ensures consistency in features across languages and reduces overall complexity.
|
|
4
|
+
|
|
5
|
+
## Supported Engine Versions
|
|
6
|
+
|
|
7
|
+
Refer to the [Supported Engine Versions table](https://github.com/valkey-io/valkey-glide/blob/main/README.md#supported-engine-versions) for details.
|
|
8
|
+
|
|
9
|
+
## Current Status
|
|
10
|
+
|
|
11
|
+
We've made Valkey GLIDE an open-source project, and are releasing it in Preview to the community to gather feedback, and actively collaborate on the project roadmap. We welcome questions and contributions from all Redis stakeholders.
|
|
12
|
+
This preview release is recommended for testing purposes only.
|
|
13
|
+
|
|
14
|
+
# Getting Started - Node Wrapper
|
|
15
|
+
|
|
16
|
+
## System Requirements
|
|
17
|
+
|
|
18
|
+
In this release, Valkey GLIDE is available for Python and Java. Support for Node.js is actively under development, with plans to include more programming languages in the future. We're tracking future features on the [roadmap](https://github.com/orgs/aws/projects/187/).
|
|
19
|
+
|
|
20
|
+
## NodeJS supported version
|
|
21
|
+
|
|
22
|
+
Node.js 16.20 or higher.
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
Visit our [wiki](https://github.com/valkey-io/valkey-glide/wiki/NodeJS-wrapper) for examples and further details on TLS, Read strategy, Timeouts and various other configurations.
|
|
27
|
+
|
|
28
|
+
### Building & Testing
|
|
29
|
+
|
|
30
|
+
Development instructions for local building & testing the package are in the [DEVELOPER.md](https://github.com/valkey-io/valkey-glide/blob/main/node/DEVELOPER.md#build-from-source) file.
|
|
31
|
+
|
|
32
|
+
### Supported platforms
|
|
33
|
+
|
|
34
|
+
Currentlly the package is supported on:
|
|
35
|
+
|
|
36
|
+
| Operation systems | C lib | Architecture |
|
|
37
|
+
| ----------------- | -------------------- | ----------------- |
|
|
38
|
+
| `Linux` | `glibc`, `musl libc` | `x86_64`, `arm64` |
|
|
39
|
+
| `macOS` | `Darwin` | `x86_64`, `arm64` |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
|
+
*/
|
|
4
|
+
export { ClusterScanCursor, Script } from "glide-rs";
|
|
5
|
+
export * from "./src/BaseClient";
|
|
6
|
+
export * from "./src/Commands";
|
|
7
|
+
export * from "./src/Errors";
|
|
8
|
+
export * from "./src/GlideClient";
|
|
9
|
+
export * from "./src/GlideClusterClient";
|
|
10
|
+
export * from "./src/Logger";
|
|
11
|
+
export * from "./src/Transaction";
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const detect_libc_1 = require("detect-libc");
|
|
8
|
+
const process_1 = require("process");
|
|
9
|
+
let globalObject = global;
|
|
10
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
11
|
+
function loadNativeBinding() {
|
|
12
|
+
let nativeBinding = null;
|
|
13
|
+
switch (process_1.platform) {
|
|
14
|
+
case "linux":
|
|
15
|
+
switch (process_1.arch) {
|
|
16
|
+
case "x64":
|
|
17
|
+
switch ((0, detect_libc_1.familySync)()) {
|
|
18
|
+
case detect_libc_1.GLIBC:
|
|
19
|
+
nativeBinding = require("@valkey/valkey-glide-linux-x64");
|
|
20
|
+
break;
|
|
21
|
+
case detect_libc_1.MUSL:
|
|
22
|
+
nativeBinding = require("@valkey/valkey-glide-linux-musl-x64");
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
nativeBinding = require("@valkey/valkey-glide-linux-x64");
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
break;
|
|
29
|
+
case "arm64":
|
|
30
|
+
switch ((0, detect_libc_1.familySync)()) {
|
|
31
|
+
case detect_libc_1.GLIBC:
|
|
32
|
+
nativeBinding = require("@valkey/valkey-glide-linux-arm64");
|
|
33
|
+
break;
|
|
34
|
+
case detect_libc_1.MUSL:
|
|
35
|
+
nativeBinding = require("@valkey/valkey-glide-linux-musl-arm64");
|
|
36
|
+
break;
|
|
37
|
+
default:
|
|
38
|
+
nativeBinding = require("@valkey/valkey-glide-linux-arm64");
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
throw new Error(`Unsupported OS: ${process_1.platform}, architecture: ${process_1.arch}`);
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
case "darwin":
|
|
47
|
+
switch (process_1.arch) {
|
|
48
|
+
case "x64":
|
|
49
|
+
nativeBinding = require("@valkey/valkey-glide-darwin-x64");
|
|
50
|
+
break;
|
|
51
|
+
case "arm64":
|
|
52
|
+
nativeBinding = require("@valkey/valkey-glide-darwin-arm64");
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
throw new Error(`Unsupported OS: ${process_1.platform}, architecture: ${process_1.arch}`);
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
default:
|
|
59
|
+
throw new Error(`Unsupported OS: ${process_1.platform}, architecture: ${process_1.arch}`);
|
|
60
|
+
}
|
|
61
|
+
if (!nativeBinding) {
|
|
62
|
+
throw new Error(`Failed to load native binding`);
|
|
63
|
+
}
|
|
64
|
+
return nativeBinding;
|
|
65
|
+
}
|
|
66
|
+
function initialize() {
|
|
67
|
+
const nativeBinding = loadNativeBinding();
|
|
68
|
+
const { AggregationType, BaseScanOptions, ZScanOptions, HScanOptions, BitEncoding, BitFieldGet, BitFieldIncrBy, BitFieldOffset, BitFieldOverflow, BitFieldSet, BitFieldSubCommands, BitOffset, BitOffsetMultiplier, BitOffsetOptions, BitOverflowControl, BitmapIndexType, BitwiseOperation, ConditionalChange, Decoder, DecoderOption, GeoAddOptions, CoordOrigin, MemberOrigin, SearchOrigin, GeoBoxShape, GeoCircleShape, GeoSearchShape, GeoSearchResultOptions, GeoSearchStoreResultOptions, SortOrder, GeoUnit, GeospatialData, GlideClient, GlideClusterClient, GlideClientConfiguration, GlideRecord, GlideString, SortedSetDataType, StreamEntryDataType, HashDataType, FunctionListOptions, FunctionListResponse, FunctionStatsSingleResponse, FunctionStatsFullResponse, FunctionRestorePolicy, SlotIdTypes, SlotKeyTypes, TimeUnit, RouteByAddress, RouteOption, Routes, RestoreOptions, SingleNodeRoute, PeriodicChecksManualInterval, PeriodicChecks, Logger, Limit, LolwutOptions, LPosOptions, ListDirection, ExpireOptions, FlushMode, InfoOptions, InsertPosition, SetOptions, ZAddOptions, InfBoundary, KeyWeight, Boundary, UpdateOptions, ProtocolVersion, RangeByIndex, RangeByScore, RangeByLex, ReadFrom, ServerCredentials, SortClusterOptions, SortOptions, SortedSetRange, StreamGroupOptions, StreamTrimOptions, StreamAddOptions, StreamReadGroupOptions, StreamReadOptions, StreamClaimOptions, StreamPendingOptions, ClosingError, ConfigurationError, ExecAbortError, ValkeyError, GlideReturnType, StreamEntries, ReturnTypeXinfoStream, RequestError, TimeoutError, ConnectionError, ClusterTransaction, Transaction, PubSubMsg, ScoreFilter, SignedEncoding, UnsignedEncoding, UpdateByScore, createLeakedArray, createLeakedAttribute, createLeakedBigint, createLeakedDouble, createLeakedMap, createLeakedString, parseInfoResponse, } = nativeBinding;
|
|
69
|
+
module.exports = {
|
|
70
|
+
AggregationType,
|
|
71
|
+
BaseScanOptions,
|
|
72
|
+
HScanOptions,
|
|
73
|
+
ZScanOptions,
|
|
74
|
+
BitEncoding,
|
|
75
|
+
BitFieldGet,
|
|
76
|
+
BitFieldIncrBy,
|
|
77
|
+
BitFieldOffset,
|
|
78
|
+
BitFieldOverflow,
|
|
79
|
+
BitFieldSet,
|
|
80
|
+
BitFieldSubCommands,
|
|
81
|
+
BitOffset,
|
|
82
|
+
BitOffsetMultiplier,
|
|
83
|
+
BitOffsetOptions,
|
|
84
|
+
BitOverflowControl,
|
|
85
|
+
BitmapIndexType,
|
|
86
|
+
BitwiseOperation,
|
|
87
|
+
ConditionalChange,
|
|
88
|
+
Decoder,
|
|
89
|
+
DecoderOption,
|
|
90
|
+
GeoAddOptions,
|
|
91
|
+
GlideRecord,
|
|
92
|
+
GlideString,
|
|
93
|
+
SortedSetDataType,
|
|
94
|
+
StreamEntryDataType,
|
|
95
|
+
HashDataType,
|
|
96
|
+
CoordOrigin,
|
|
97
|
+
MemberOrigin,
|
|
98
|
+
SearchOrigin,
|
|
99
|
+
GeoBoxShape,
|
|
100
|
+
GeoCircleShape,
|
|
101
|
+
GeoSearchShape,
|
|
102
|
+
GeoSearchResultOptions,
|
|
103
|
+
GeoSearchStoreResultOptions,
|
|
104
|
+
SortOrder,
|
|
105
|
+
GeoUnit,
|
|
106
|
+
GeospatialData,
|
|
107
|
+
GlideClient,
|
|
108
|
+
GlideClusterClient,
|
|
109
|
+
GlideClientConfiguration,
|
|
110
|
+
FunctionListOptions,
|
|
111
|
+
FunctionListResponse,
|
|
112
|
+
FunctionStatsSingleResponse,
|
|
113
|
+
FunctionStatsFullResponse,
|
|
114
|
+
FunctionRestorePolicy,
|
|
115
|
+
SlotIdTypes,
|
|
116
|
+
SlotKeyTypes,
|
|
117
|
+
StreamEntries,
|
|
118
|
+
TimeUnit,
|
|
119
|
+
ReturnTypeXinfoStream,
|
|
120
|
+
RouteByAddress,
|
|
121
|
+
RouteOption,
|
|
122
|
+
Routes,
|
|
123
|
+
RestoreOptions,
|
|
124
|
+
SingleNodeRoute,
|
|
125
|
+
PeriodicChecksManualInterval,
|
|
126
|
+
PeriodicChecks,
|
|
127
|
+
Logger,
|
|
128
|
+
LolwutOptions,
|
|
129
|
+
Limit,
|
|
130
|
+
LPosOptions,
|
|
131
|
+
ListDirection,
|
|
132
|
+
ExpireOptions,
|
|
133
|
+
FlushMode,
|
|
134
|
+
InfoOptions,
|
|
135
|
+
InsertPosition,
|
|
136
|
+
SetOptions,
|
|
137
|
+
ZAddOptions,
|
|
138
|
+
InfBoundary,
|
|
139
|
+
KeyWeight,
|
|
140
|
+
Boundary,
|
|
141
|
+
UpdateOptions,
|
|
142
|
+
ProtocolVersion,
|
|
143
|
+
RangeByIndex,
|
|
144
|
+
RangeByScore,
|
|
145
|
+
RangeByLex,
|
|
146
|
+
ReadFrom,
|
|
147
|
+
ServerCredentials,
|
|
148
|
+
SortClusterOptions,
|
|
149
|
+
SortOptions,
|
|
150
|
+
SortedSetRange,
|
|
151
|
+
StreamGroupOptions,
|
|
152
|
+
StreamTrimOptions,
|
|
153
|
+
StreamAddOptions,
|
|
154
|
+
StreamClaimOptions,
|
|
155
|
+
StreamReadGroupOptions,
|
|
156
|
+
StreamReadOptions,
|
|
157
|
+
StreamPendingOptions,
|
|
158
|
+
ClosingError,
|
|
159
|
+
ConfigurationError,
|
|
160
|
+
ExecAbortError,
|
|
161
|
+
ValkeyError,
|
|
162
|
+
GlideReturnType,
|
|
163
|
+
RequestError,
|
|
164
|
+
TimeoutError,
|
|
165
|
+
ConnectionError,
|
|
166
|
+
ClusterTransaction,
|
|
167
|
+
Transaction,
|
|
168
|
+
PubSubMsg,
|
|
169
|
+
ScoreFilter,
|
|
170
|
+
SignedEncoding,
|
|
171
|
+
UnsignedEncoding,
|
|
172
|
+
UpdateByScore,
|
|
173
|
+
createLeakedArray,
|
|
174
|
+
createLeakedAttribute,
|
|
175
|
+
createLeakedBigint,
|
|
176
|
+
createLeakedDouble,
|
|
177
|
+
createLeakedMap,
|
|
178
|
+
createLeakedString,
|
|
179
|
+
parseInfoResponse,
|
|
180
|
+
};
|
|
181
|
+
globalObject = Object.assign(global, nativeBinding);
|
|
182
|
+
}
|
|
183
|
+
initialize();
|
|
184
|
+
exports.default = globalObject;
|