@valkey/valkey-glide-linux-arm64-musl 2.5.3-rc1 → 2.6.0-rc1
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 +51 -29
- package/package.json +1 -1
- package/valkey-glide.linux-arm64-musl.node +0 -0
package/README.md
CHANGED
|
@@ -68,60 +68,82 @@ npm i @valkey/valkey-glide
|
|
|
68
68
|
#### Standalone Mode:
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
|
-
import { GlideClient,
|
|
72
|
-
|
|
71
|
+
import { GlideClient, Logger } from "@valkey/valkey-glide";
|
|
72
|
+
|
|
73
|
+
Logger.setLoggerConfig("info");
|
|
74
|
+
|
|
73
75
|
const addresses = [
|
|
74
76
|
{
|
|
75
77
|
host: "localhost",
|
|
76
78
|
port: 6379,
|
|
77
79
|
},
|
|
78
80
|
];
|
|
79
|
-
|
|
81
|
+
|
|
82
|
+
// Check `GlideClientConfiguration` for additional options.
|
|
80
83
|
const client = await GlideClient.createClient({
|
|
81
|
-
addresses
|
|
82
|
-
//
|
|
84
|
+
addresses,
|
|
85
|
+
// Enable TLS if required by the server.
|
|
83
86
|
// useTLS: true,
|
|
84
|
-
//
|
|
85
|
-
requestTimeout: 500,
|
|
87
|
+
// Set a timeout appropriate for your use case.
|
|
88
|
+
requestTimeout: 500,
|
|
86
89
|
clientName: "test_standalone_client",
|
|
87
90
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
// Pass the command and its arguments as an array.
|
|
94
|
+
const pong = await client.customCommand(["PING"]);
|
|
95
|
+
Logger.log("info", "app", `PING response: ${pong}`);
|
|
96
|
+
|
|
97
|
+
const setResponse = await client.set("foo", "bar");
|
|
98
|
+
Logger.log("info", "app", `Set response is: ${setResponse}`);
|
|
99
|
+
|
|
100
|
+
const getResponse = await client.get("foo");
|
|
101
|
+
Logger.log("info", "app", `Get response is: ${getResponse}`);
|
|
102
|
+
} finally {
|
|
103
|
+
client.close();
|
|
104
|
+
}
|
|
95
105
|
```
|
|
96
106
|
|
|
97
107
|
#### Cluster Mode:
|
|
98
108
|
|
|
99
109
|
```typescript
|
|
100
|
-
import {
|
|
101
|
-
|
|
110
|
+
import { GlideClusterClient, Logger } from "@valkey/valkey-glide";
|
|
111
|
+
|
|
112
|
+
Logger.setLoggerConfig("info");
|
|
113
|
+
|
|
114
|
+
// Add the address of any cluster node; the client discovers the remaining nodes.
|
|
102
115
|
const addresses = [
|
|
103
116
|
{
|
|
104
117
|
host: "localhost",
|
|
105
118
|
port: 6379,
|
|
106
119
|
},
|
|
107
120
|
];
|
|
108
|
-
|
|
121
|
+
|
|
122
|
+
// Check `GlideClusterClientConfiguration` for additional options.
|
|
109
123
|
const client = await GlideClusterClient.createClient({
|
|
110
|
-
addresses
|
|
111
|
-
//
|
|
124
|
+
addresses,
|
|
125
|
+
// Enable TLS if required by the cluster nodes.
|
|
112
126
|
// useTLS: true,
|
|
113
|
-
//
|
|
114
|
-
requestTimeout: 500,
|
|
127
|
+
// Set a timeout appropriate for your use case.
|
|
128
|
+
requestTimeout: 500,
|
|
115
129
|
clientName: "test_cluster_client",
|
|
116
130
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
// Pass the command and its arguments as an array.
|
|
134
|
+
const pong = await client.customCommand(["PING"], {
|
|
135
|
+
route: "randomNode",
|
|
136
|
+
});
|
|
137
|
+
Logger.log("info", "app", `PING response: ${pong}`);
|
|
138
|
+
|
|
139
|
+
const setResponse = await client.set("foo", "bar");
|
|
140
|
+
Logger.log("info", "app", `Set response is: ${setResponse}`);
|
|
141
|
+
|
|
142
|
+
const getResponse = await client.get("foo");
|
|
143
|
+
Logger.log("info", "app", `Get response is: ${getResponse}`);
|
|
144
|
+
} finally {
|
|
145
|
+
client.close();
|
|
146
|
+
}
|
|
125
147
|
```
|
|
126
148
|
|
|
127
149
|
### Supported platforms
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valkey/valkey-glide-linux-arm64-musl",
|
|
3
3
|
"description": "Native bindings for valkey-glide on linux-arm64-musl",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0-rc1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/valkey-io/valkey-glide.git"
|
|
Binary file
|