@@ -20,12 +20,12 @@ export interface RedisClusterOptions<
20
20
S extends RedisScripts = Record < string , never >
21
21
> extends RedisExtensions < M , F , S > {
22
22
/**
23
- * Should contain details for some of the cluster nodes that the client will use to discover
23
+ * Should contain details for some of the cluster nodes that the client will use to discover
24
24
* the "cluster topology". We recommend including details for at least 3 nodes here.
25
25
*/
26
26
rootNodes : Array < RedisClusterClientOptions > ;
27
27
/**
28
- * Default values used for every client in the cluster. Use this to specify global values,
28
+ * Default values used for every client in the cluster. Use this to specify global values,
29
29
* for example: ACL credentials, timeouts, TLS configuration etc.
30
30
*/
31
31
defaults ?: Partial < RedisClusterClientOptions > ;
@@ -45,7 +45,7 @@ export interface RedisClusterOptions<
45
45
/**
46
46
* Mapping between the addresses in the cluster (see `CLUSTER SHARDS`) and the addresses the client should connect to
47
47
* Useful when the cluster is running on another network
48
- *
48
+ *
49
49
*/
50
50
nodeAddressMap ?: NodeAddressMap ;
51
51
}
@@ -98,7 +98,7 @@ export default class RedisCluster<
98
98
readonly #options: RedisClusterOptions < M , F , S > ;
99
99
100
100
readonly #slots: RedisClusterSlots < M , F , S > ;
101
-
101
+
102
102
get slots ( ) {
103
103
return this . #slots. slots ;
104
104
}
@@ -310,7 +310,7 @@ export default class RedisCluster<
310
310
listener ?: PubSubListener < boolean > ,
311
311
bufferMode ?: T
312
312
) {
313
- return this . #slots. executeUnsubscribeCommand ( client =>
313
+ return this . #slots. executeUnsubscribeCommand ( client =>
314
314
client . UNSUBSCRIBE ( channels , listener , bufferMode )
315
315
) ;
316
316
}
@@ -333,7 +333,7 @@ export default class RedisCluster<
333
333
listener ?: PubSubListener < T > ,
334
334
bufferMode ?: T
335
335
) {
336
- return this . #slots. executeUnsubscribeCommand ( client =>
336
+ return this . #slots. executeUnsubscribeCommand ( client =>
337
337
client . PUNSUBSCRIBE ( patterns , listener , bufferMode )
338
338
) ;
339
339
}
@@ -344,7 +344,7 @@ export default class RedisCluster<
344
344
channels : string | Array < string > ,
345
345
listener : PubSubListener < T > ,
346
346
bufferMode ?: T
347
- ) {
347
+ ) {
348
348
const maxCommandRedirections = this . #options. maxCommandRedirections ?? 16 ,
349
349
firstChannel = Array . isArray ( channels ) ? channels [ 0 ] : channels ;
350
350
let client = await this . #slots. getShardedPubSubClient ( firstChannel ) ;
@@ -371,7 +371,7 @@ export default class RedisCluster<
371
371
372
372
SUNSUBSCRIBE < T extends boolean = false > (
373
373
channels : string | Array < string > ,
374
- listener : PubSubListener < T > ,
374
+ listener ? : PubSubListener < T > ,
375
375
bufferMode ?: T
376
376
) {
377
377
return this . #slots. executeShardedUnsubscribeCommand (
@@ -391,7 +391,7 @@ export default class RedisCluster<
391
391
}
392
392
393
393
nodeClient ( node : ShardNode < M , F , S > ) {
394
- return this . #slots. nodeClient ( node ) ;
394
+ return this . #slots. nodeClient ( node ) ;
395
395
}
396
396
397
397
getRandomNode ( ) {
0 commit comments