|
2 | 2 | <dl>
|
3 | 3 | <dt><a href="#Redis">Redis</a> ⇐ <code>[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)</code></dt>
|
4 | 4 | <dd></dd>
|
5 |
| -<dt><a href="#Cluster">Cluster</a> ⇐ <code>[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)</code></dt> |
6 |
| -<dd></dd> |
7 | 5 | <dt><a href="#Commander">Commander</a></dt>
|
8 | 6 | <dd></dd>
|
9 | 7 | </dl>
|
|
12 | 10 | <dt><a href="#defaultOptions">defaultOptions</a></dt>
|
13 | 11 | <dd><p>Default options</p>
|
14 | 12 | </dd>
|
15 |
| -<dt><a href="#defaultOptions">defaultOptions</a></dt> |
16 |
| -<dd><p>Default options</p> |
17 |
| -</dd> |
18 | 13 | </dl>
|
19 | 14 | <a name="Redis"></a>
|
20 | 15 | ## Redis ⇐ <code>[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)</code>
|
@@ -190,81 +185,6 @@ Define a custom command using lua script
|
190 | 185 | Create a Redis instance
|
191 | 186 |
|
192 | 187 | **Kind**: static method of <code>[Redis](#Redis)</code>
|
193 |
| -<a name="Cluster"></a> |
194 |
| -## Cluster ⇐ <code>[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)</code> |
195 |
| -**Kind**: global class |
196 |
| -**Extends:** <code>[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)</code>, <code>[Commander](#Commander)</code> |
197 |
| - |
198 |
| -* [Cluster](#Cluster) ⇐ <code>[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)</code> |
199 |
| - * [new Cluster(startupNodes, options)](#new_Cluster_new) |
200 |
| - * [.disconnect()](#Cluster+disconnect) |
201 |
| - * [.getBuiltinCommands()](#Commander+getBuiltinCommands) ⇒ <code>Array.<string></code> |
202 |
| - * [.createBuiltinCommand(commandName)](#Commander+createBuiltinCommand) ⇒ <code>object</code> |
203 |
| - * [.defineCommand(name, definition)](#Commander+defineCommand) |
204 |
| - * *[.sendCommand()](#Commander+sendCommand)* |
205 |
| - |
206 |
| -<a name="new_Cluster_new"></a> |
207 |
| -### new Cluster(startupNodes, options) |
208 |
| -Creates a Redis Cluster instance |
209 |
| - |
210 |
| - |
211 |
| -| Param | Type | Default | Description | |
212 |
| -| --- | --- | --- | --- | |
213 |
| -| startupNodes | <code>Array.<Object></code> | | An array of nodes in the cluster, [{ port: number, host: string }] | |
214 |
| -| options | <code>Object</code> | | | |
215 |
| -| [options.enableOfflineQueue] | <code>boolean</code> | <code>true</code> | See Redis class | |
216 |
| -| [options.lazyConnect] | <code>boolean</code> | <code>false</code> | See Redis class | |
217 |
| -| [options.readOnly] | <code>boolean</code> | <code>false</code> | Connect in READONLY mode | |
218 |
| -| [options.maxRedirections] | <code>number</code> | <code>16</code> | When a MOVED or ASK error is received, client will redirect the command to another node. This option limits the max redirections allowed to send a command. | |
219 |
| -| [options.clusterRetryStrategy] | <code>function</code> | | See "Quick Start" section | |
220 |
| -| [options.retryDelayOnFailover] | <code>number</code> | <code>2000</code> | When an error is received when sending a command(e.g. "Connection is closed." when the target Redis node is down), | |
221 |
| -| [options.retryDelayOnClusterDown] | <code>number</code> | <code>1000</code> | When a CLUSTERDOWN error is received, client will retry if `retryDelayOnClusterDown` is valid delay time. | |
222 |
| - |
223 |
| -<a name="Cluster+disconnect"></a> |
224 |
| -### cluster.disconnect() |
225 |
| -Disconnect from every node in the cluster. |
226 |
| - |
227 |
| -**Kind**: instance method of <code>[Cluster](#Cluster)</code> |
228 |
| -**Access:** public |
229 |
| -<a name="Commander+getBuiltinCommands"></a> |
230 |
| -### cluster.getBuiltinCommands() ⇒ <code>Array.<string></code> |
231 |
| -Return supported builtin commands |
232 |
| - |
233 |
| -**Kind**: instance method of <code>[Cluster](#Cluster)</code> |
234 |
| -**Returns**: <code>Array.<string></code> - command list |
235 |
| -**Access:** public |
236 |
| -<a name="Commander+createBuiltinCommand"></a> |
237 |
| -### cluster.createBuiltinCommand(commandName) ⇒ <code>object</code> |
238 |
| -Create a builtin command |
239 |
| - |
240 |
| -**Kind**: instance method of <code>[Cluster](#Cluster)</code> |
241 |
| -**Returns**: <code>object</code> - functions |
242 |
| -**Access:** public |
243 |
| - |
244 |
| -| Param | Type | Description | |
245 |
| -| --- | --- | --- | |
246 |
| -| commandName | <code>string</code> | command name | |
247 |
| - |
248 |
| -<a name="Commander+defineCommand"></a> |
249 |
| -### cluster.defineCommand(name, definition) |
250 |
| -Define a custom command using lua script |
251 |
| - |
252 |
| -**Kind**: instance method of <code>[Cluster](#Cluster)</code> |
253 |
| - |
254 |
| -| Param | Type | Default | Description | |
255 |
| -| --- | --- | --- | --- | |
256 |
| -| name | <code>string</code> | | the command name | |
257 |
| -| definition | <code>object</code> | | | |
258 |
| -| definition.lua | <code>string</code> | | the lua code | |
259 |
| -| [definition.numberOfKeys] | <code>number</code> | <code></code> | the number of keys. If omit, you have to pass the number of keys as the first argument every time you invoke the command | |
260 |
| - |
261 |
| -<a name="Commander+sendCommand"></a> |
262 |
| -### *cluster.sendCommand()* |
263 |
| -Send a command |
264 |
| - |
265 |
| -**Kind**: instance abstract method of <code>[Cluster](#Cluster)</code> |
266 |
| -**Overrides:** <code>[sendCommand](#Commander+sendCommand)</code> |
267 |
| -**Access:** public |
268 | 188 | <a name="Commander"></a>
|
269 | 189 | ## Commander
|
270 | 190 | **Kind**: global class
|
@@ -331,9 +251,3 @@ Default options
|
331 | 251 |
|
332 | 252 | **Kind**: global variable
|
333 | 253 | **Access:** protected
|
334 |
| -<a name="defaultOptions"></a> |
335 |
| -## defaultOptions |
336 |
| -Default options |
337 |
| - |
338 |
| -**Kind**: global variable |
339 |
| -**Access:** protected |
0 commit comments