valkey-glide 2.0.0rc7__cp312-cp312-macosx_11_0_arm64.whl → 2.1.0__cp312-cp312-macosx_11_0_arm64.whl

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.

Potentially problematic release.


This version of valkey-glide might be problematic. Click here for more details.

Files changed (45) hide show
  1. glide/__init__.py +103 -107
  2. glide/async_commands/cluster_commands.py +83 -101
  3. glide/async_commands/core.py +554 -424
  4. glide/async_commands/{server_modules/ft.py → ft.py} +8 -7
  5. glide/async_commands/{server_modules/glide_json.py → glide_json.py} +15 -92
  6. glide/async_commands/standalone_commands.py +40 -17
  7. glide/glide.cpython-312-darwin.so +0 -0
  8. glide/glide.pyi +26 -1
  9. glide/glide_client.py +70 -45
  10. glide/logger.py +33 -21
  11. glide/opentelemetry.py +185 -0
  12. glide_shared/__init__.py +326 -0
  13. {glide/async_commands → glide_shared/commands}/batch.py +411 -18
  14. glide_shared/commands/batch_options.py +261 -0
  15. glide_shared/commands/core_options.py +407 -0
  16. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_aggregate_options.py +3 -3
  17. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_create_options.py +4 -2
  18. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_profile_options.py +4 -4
  19. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_search_options.py +4 -2
  20. {glide/async_commands → glide_shared/commands}/server_modules/json_batch.py +4 -4
  21. glide_shared/commands/server_modules/json_options.py +93 -0
  22. {glide/async_commands → glide_shared/commands}/sorted_set.py +2 -2
  23. {glide/async_commands → glide_shared/commands}/stream.py +1 -1
  24. {glide → glide_shared}/config.py +174 -58
  25. {glide → glide_shared}/constants.py +3 -3
  26. {glide → glide_shared}/exceptions.py +27 -1
  27. glide_shared/protobuf/command_request_pb2.py +54 -0
  28. glide_shared/protobuf/connection_request_pb2.py +52 -0
  29. {glide → glide_shared}/protobuf/response_pb2.py +6 -6
  30. {glide → glide_shared}/routes.py +29 -15
  31. valkey_glide-2.1.0.dist-info/METADATA +210 -0
  32. valkey_glide-2.1.0.dist-info/RECORD +39 -0
  33. glide/protobuf/command_request_pb2.py +0 -54
  34. glide/protobuf/command_request_pb2.pyi +0 -1187
  35. glide/protobuf/connection_request_pb2.py +0 -54
  36. glide/protobuf/connection_request_pb2.pyi +0 -320
  37. glide/protobuf/response_pb2.pyi +0 -100
  38. valkey_glide-2.0.0rc7.dist-info/METADATA +0 -144
  39. valkey_glide-2.0.0rc7.dist-info/RECORD +0 -37
  40. /glide/py.typed → /glide_shared/commands/__init__.py +0 -0
  41. {glide/async_commands → glide_shared/commands}/bitmap.py +0 -0
  42. {glide/async_commands → glide_shared/commands}/command_args.py +0 -0
  43. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_constants.py +0 -0
  44. {glide → glide_shared}/protobuf_codec.py +0 -0
  45. {valkey_glide-2.0.0rc7.dist-info → valkey_glide-2.1.0.dist-info}/WHEEL +0 -0
@@ -6,12 +6,18 @@ from dataclasses import dataclass
6
6
  from enum import Enum, IntEnum
7
7
  from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
8
8
 
9
- from glide.async_commands.core import CoreCommands
10
- from glide.exceptions import ConfigurationError
11
- from glide.protobuf.connection_request_pb2 import ConnectionRequest
12
- from glide.protobuf.connection_request_pb2 import ProtocolVersion as SentProtocolVersion
13
- from glide.protobuf.connection_request_pb2 import ReadFrom as ProtobufReadFrom
14
- from glide.protobuf.connection_request_pb2 import TlsMode
9
+ from glide_shared.commands.core_options import PubSubMsg
10
+ from glide_shared.exceptions import ConfigurationError
11
+ from glide_shared.protobuf.connection_request_pb2 import (
12
+ ConnectionRequest,
13
+ )
14
+ from glide_shared.protobuf.connection_request_pb2 import (
15
+ ProtocolVersion as SentProtocolVersion,
16
+ )
17
+ from glide_shared.protobuf.connection_request_pb2 import ReadFrom as ProtobufReadFrom
18
+ from glide_shared.protobuf.connection_request_pb2 import (
19
+ TlsMode,
20
+ )
15
21
 
16
22
 
17
23
  class NodeAddress:
@@ -73,7 +79,7 @@ class BackoffStrategy:
73
79
  """
74
80
  Represents the strategy used to determine how and when to reconnect, in case of connection failures.
75
81
  The time between attempts grows exponentially, to the formula rand(0 .. factor * (exponentBase ^ N)), where N
76
- is the number of failed attempts.
82
+ is the number of failed attempts, and rand(...) applies a jitter of up to jitter_percent% to introduce randomness and reduce retry storms.
77
83
  Once the maximum value is reached, that will remain the time between retry attempts until a reconnect attempt is
78
84
  successful.
79
85
  The client will attempt to reconnect indefinitely.
@@ -83,6 +89,7 @@ class BackoffStrategy:
83
89
  where the time between retries increases. Once the retries have reached the maximum value, the time between
84
90
  retries will remain constant until a reconnect attempt is succesful.
85
91
  factor (int): The multiplier that will be applied to the waiting time between each retry.
92
+ This value is specified in milliseconds.
86
93
  exponent_base (int): The exponent base configured for the strategy.
87
94
  jitter_percent (Optional[int]): The Jitter percent on the calculated duration. If not set, a default value will be used.
88
95
  """
@@ -147,25 +154,66 @@ class PeriodicChecksStatus(Enum):
147
154
  """
148
155
 
149
156
 
157
+ class TlsAdvancedConfiguration:
158
+ """
159
+ Represents advanced TLS configuration settings.
160
+
161
+ Attributes:
162
+ use_insecure_tls (Optional[bool]): Whether to bypass TLS certificate verification.
163
+
164
+ - When set to True, the client skips certificate validation.
165
+ This is useful when connecting to servers or clusters using self-signed certificates,
166
+ or when DNS entries (e.g., CNAMEs) don't match certificate hostnames.
167
+
168
+ - This setting is typically used in development or testing environments. **It is
169
+ strongly discouraged in production**, as it introduces security risks such as man-in-the-middle attacks.
170
+
171
+ - Only valid if TLS is already enabled in the base client configuration.
172
+ Enabling it without TLS will result in a `ConfigurationError`.
173
+
174
+ - Default: False (verification is enforced).
175
+ """
176
+
177
+ def __init__(self, use_insecure_tls: Optional[bool] = None):
178
+ self.use_insecure_tls = use_insecure_tls
179
+
180
+
150
181
  class AdvancedBaseClientConfiguration:
151
182
  """
152
183
  Represents the advanced configuration settings for a base Glide client.
153
184
 
154
185
  Attributes:
155
186
  connection_timeout (Optional[int]): The duration in milliseconds to wait for a TCP/TLS connection to complete.
156
- This applies both during initial client creation and any reconnections that may occur during request processing.
187
+ This applies both during initial client creation and any reconnection that may occur during request processing.
157
188
  **Note**: A high connection timeout may lead to prolonged blocking of the entire command pipeline.
158
- If not explicitly set, a default value of 250 milliseconds will be used.
189
+ If not explicitly set, a default value of 2000 milliseconds will be used.
190
+ tls_config (Optional[TlsAdvancedConfiguration]): The advanced TLS configuration settings.
191
+ This allows for more granular control of TLS behavior, such as enabling an insecure mode
192
+ that bypasses certificate validation.
159
193
  """
160
194
 
161
- def __init__(self, connection_timeout: Optional[int] = None):
195
+ def __init__(
196
+ self,
197
+ connection_timeout: Optional[int] = None,
198
+ tls_config: Optional[TlsAdvancedConfiguration] = None,
199
+ ):
162
200
  self.connection_timeout = connection_timeout
201
+ self.tls_config = tls_config
163
202
 
164
203
  def _create_a_protobuf_conn_request(
165
204
  self, request: ConnectionRequest
166
205
  ) -> ConnectionRequest:
167
206
  if self.connection_timeout:
168
207
  request.connection_timeout = self.connection_timeout
208
+
209
+ if self.tls_config and self.tls_config.use_insecure_tls:
210
+ if request.tls_mode == TlsMode.SecureTls:
211
+ request.tls_mode = TlsMode.InsecureTls
212
+ elif request.tls_mode == TlsMode.NoTls:
213
+ raise ConfigurationError(
214
+ "use_insecure_tls cannot be enabled when use_tls is disabled."
215
+ )
216
+
169
217
  return request
170
218
 
171
219
 
@@ -182,24 +230,27 @@ class BaseClientConfiguration:
182
230
  For example::
183
231
 
184
232
  [
185
- {address:sample-address-0001.use1.cache.amazonaws.com, port:6379},
186
- {address: sample-address-0002.use2.cache.amazonaws.com, port:6379}
187
- ].
233
+ NodeAddress("sample-address-0001.use1.cache.amazonaws.com", 6379),
234
+ NodeAddress("sample-address-0002.use1.cache.amazonaws.com", 6379)
235
+ ]
188
236
 
189
237
  use_tls (bool): True if communication with the cluster should use Transport Level Security.
190
- Should match the TLS configuration of the server/cluster, otherwise the connection attempt will fail
238
+ Should match the TLS configuration of the server/cluster, otherwise the connection attempt will fail.
239
+ For advanced tls configuration, please use `AdvancedBaseClientConfiguration`.
191
240
  credentials (ServerCredentials): Credentials for authentication process.
192
241
  If none are set, the client will not authenticate itself with the server.
193
242
  read_from (ReadFrom): If not set, `PRIMARY` will be used.
194
243
  request_timeout (Optional[int]): The duration in milliseconds that the client should wait for a request to
195
244
  complete.
196
245
  This duration encompasses sending the request, awaiting for a response from the server, and any required
197
- reconnections or retries.
246
+ reconnection or retries.
198
247
  If the specified timeout is exceeded for a pending request, it will result in a timeout error. If not
199
248
  explicitly set, a default value of 250 milliseconds will be used.
200
249
  reconnect_strategy (Optional[BackoffStrategy]): Strategy used to determine how and when to reconnect, in case of
201
250
  connection failures.
202
251
  If not set, a default backoff strategy will be used.
252
+ database_id (Optional[int]): Index of the logical database to connect to.
253
+ Must be a non-negative integer.If not set, the client will connect to database 0.
203
254
  client_name (Optional[str]): Client name to be used for the client. Will be used with CLIENT SETNAME command
204
255
  during connection establishment.
205
256
  protocol (ProtocolVersion): Serialization protocol to be used. If not set, `RESP3` will be used.
@@ -214,6 +265,25 @@ class BaseClientConfiguration:
214
265
  If ReadFrom strategy is AZAffinityReplicasAndPrimary, this setting ensures that readonly commands are directed
215
266
  to nodes (first replicas then primary) within the specified AZ if they exist.
216
267
  advanced_config (Optional[AdvancedBaseClientConfiguration]): Advanced configuration settings for the client.
268
+
269
+ lazy_connect (Optional[bool]): Enables lazy connection mode, where physical connections to the server(s)
270
+ are deferred until the first command is sent. This can reduce startup latency and allow for client
271
+ creation in disconnected environments.
272
+
273
+ When set to `True`, the client will not attempt to connect to the specified nodes during
274
+ initialization. Instead, connections will be established only when a command is actually executed.
275
+
276
+ Note that the first command executed with lazy connections may experience additional latency
277
+ as it needs to establish the connection first. During this initial connection, the standard
278
+ request timeout does not apply yet - instead, the connection establishment is governed by
279
+ `AdvancedBaseClientConfiguration.connection_timeout`. The request timeout (`request_timeout`)
280
+ only begins counting after the connection has been successfully established. This behavior
281
+ can effectively increase the total time needed for the first command to complete.
282
+
283
+ This setting applies to both standalone and cluster modes. Note that if an operation is
284
+ attempted and connection fails (e.g., unreachable nodes), errors will surface at that point.
285
+
286
+ If not set, connections are established immediately during client creation (equivalent to `False`).
217
287
  """
218
288
 
219
289
  def __init__(
@@ -224,11 +294,13 @@ class BaseClientConfiguration:
224
294
  read_from: ReadFrom = ReadFrom.PRIMARY,
225
295
  request_timeout: Optional[int] = None,
226
296
  reconnect_strategy: Optional[BackoffStrategy] = None,
297
+ database_id: Optional[int] = None,
227
298
  client_name: Optional[str] = None,
228
299
  protocol: ProtocolVersion = ProtocolVersion.RESP3,
229
300
  inflight_requests_limit: Optional[int] = None,
230
301
  client_az: Optional[str] = None,
231
302
  advanced_config: Optional[AdvancedBaseClientConfiguration] = None,
303
+ lazy_connect: Optional[bool] = None,
232
304
  ):
233
305
  self.addresses = addresses
234
306
  self.use_tls = use_tls
@@ -236,11 +308,13 @@ class BaseClientConfiguration:
236
308
  self.read_from = read_from
237
309
  self.request_timeout = request_timeout
238
310
  self.reconnect_strategy = reconnect_strategy
311
+ self.database_id = database_id
239
312
  self.client_name = client_name
240
313
  self.protocol = protocol
241
314
  self.inflight_requests_limit = inflight_requests_limit
242
315
  self.client_az = client_az
243
316
  self.advanced_config = advanced_config
317
+ self.lazy_connect = lazy_connect
244
318
 
245
319
  if read_from == ReadFrom.AZ_AFFINITY and not client_az:
246
320
  raise ValueError(
@@ -252,6 +326,39 @@ class BaseClientConfiguration:
252
326
  "client_az must be set when read_from is set to AZ_AFFINITY_REPLICAS_AND_PRIMARY"
253
327
  )
254
328
 
329
+ def _set_addresses_in_request(self, request: ConnectionRequest) -> None:
330
+ """Set addresses in the protobuf request."""
331
+ for address in self.addresses:
332
+ address_info = request.addresses.add()
333
+ address_info.host = address.host
334
+ address_info.port = address.port
335
+
336
+ def _set_reconnect_strategy_in_request(self, request: ConnectionRequest) -> None:
337
+ """Set reconnect strategy in the protobuf request."""
338
+ if not self.reconnect_strategy:
339
+ return
340
+
341
+ request.connection_retry_strategy.number_of_retries = (
342
+ self.reconnect_strategy.num_of_retries
343
+ )
344
+ request.connection_retry_strategy.factor = self.reconnect_strategy.factor
345
+ request.connection_retry_strategy.exponent_base = (
346
+ self.reconnect_strategy.exponent_base
347
+ )
348
+ if self.reconnect_strategy.jitter_percent is not None:
349
+ request.connection_retry_strategy.jitter_percent = (
350
+ self.reconnect_strategy.jitter_percent
351
+ )
352
+
353
+ def _set_credentials_in_request(self, request: ConnectionRequest) -> None:
354
+ """Set credentials in the protobuf request."""
355
+ if not self.credentials:
356
+ return
357
+
358
+ if self.credentials.username:
359
+ request.authentication_info.username = self.credentials.username
360
+ request.authentication_info.password = self.credentials.password
361
+
255
362
  def _create_a_protobuf_conn_request(
256
363
  self, cluster_mode: bool = False
257
364
  ) -> ConnectionRequest:
@@ -265,41 +372,33 @@ class BaseClientConfiguration:
265
372
  ConnectionRequest: Protobuf ConnectionRequest.
266
373
  """
267
374
  request = ConnectionRequest()
268
- for address in self.addresses:
269
- address_info = request.addresses.add()
270
- address_info.host = address.host
271
- address_info.port = address.port
375
+
376
+ # Set basic configuration
377
+ self._set_addresses_in_request(request)
272
378
  request.tls_mode = TlsMode.SecureTls if self.use_tls else TlsMode.NoTls
273
379
  request.read_from = self.read_from.value
380
+ request.cluster_mode_enabled = cluster_mode
381
+ request.protocol = self.protocol.value
382
+
383
+ # Set optional configuration
274
384
  if self.request_timeout:
275
385
  request.request_timeout = self.request_timeout
276
- if self.reconnect_strategy:
277
- request.connection_retry_strategy.number_of_retries = (
278
- self.reconnect_strategy.num_of_retries
279
- )
280
- request.connection_retry_strategy.factor = self.reconnect_strategy.factor
281
- request.connection_retry_strategy.exponent_base = (
282
- self.reconnect_strategy.exponent_base
283
- )
284
- if self.reconnect_strategy.jitter_percent is not None:
285
- request.connection_retry_strategy.jitter_percent = (
286
- self.reconnect_strategy.jitter_percent
287
- )
288
386
 
289
- request.cluster_mode_enabled = True if cluster_mode else False
290
- if self.credentials:
291
- if self.credentials.username:
292
- request.authentication_info.username = self.credentials.username
293
- request.authentication_info.password = self.credentials.password
387
+ self._set_reconnect_strategy_in_request(request)
388
+ self._set_credentials_in_request(request)
389
+
294
390
  if self.client_name:
295
391
  request.client_name = self.client_name
296
- request.protocol = self.protocol.value
297
392
  if self.inflight_requests_limit:
298
393
  request.inflight_requests_limit = self.inflight_requests_limit
299
394
  if self.client_az:
300
395
  request.client_az = self.client_az
396
+ if self.database_id is not None:
397
+ request.database_id = self.database_id
301
398
  if self.advanced_config:
302
399
  self.advanced_config._create_a_protobuf_conn_request(request)
400
+ if self.lazy_connect is not None:
401
+ request.lazy_connect = self.lazy_connect
303
402
 
304
403
  return request
305
404
 
@@ -308,7 +407,7 @@ class BaseClientConfiguration:
308
407
 
309
408
  def _get_pubsub_callback_and_context(
310
409
  self,
311
- ) -> Tuple[Optional[Callable[[CoreCommands.PubSubMsg, Any], None]], Any]:
410
+ ) -> Tuple[Optional[Callable[[PubSubMsg, Any], None]], Any]:
312
411
  return None, None
313
412
 
314
413
 
@@ -317,9 +416,13 @@ class AdvancedGlideClientConfiguration(AdvancedBaseClientConfiguration):
317
416
  Represents the advanced configuration settings for a Standalone Glide client.
318
417
  """
319
418
 
320
- def __init__(self, connection_timeout: Optional[int] = None):
419
+ def __init__(
420
+ self,
421
+ connection_timeout: Optional[int] = None,
422
+ tls_config: Optional[TlsAdvancedConfiguration] = None,
423
+ ):
321
424
 
322
- super().__init__(connection_timeout)
425
+ super().__init__(connection_timeout, tls_config)
323
426
 
324
427
 
325
428
  class GlideClientConfiguration(BaseClientConfiguration):
@@ -328,27 +431,28 @@ class GlideClientConfiguration(BaseClientConfiguration):
328
431
 
329
432
  Attributes:
330
433
  addresses (List[NodeAddress]): DNS Addresses and ports of known nodes in the cluster.
331
- Only nodes whose addresses were provided will be used by the client.
434
+ Only nodes whose addresses were provided will be used by the client.
332
435
  For example::
333
436
 
334
437
  [
335
- {address:sample-address-0001.use1.cache.amazonaws.com, port:6379},
336
- {address: sample-address-0002.use2.cache.amazonaws.com, port:6379}
438
+ NodeAddress("sample-address-0001.use1.cache.amazonaws.com", 6379),
439
+ NodeAddress("sample-address-0002.use1.cache.amazonaws.com", 6379)
337
440
  ]
338
441
 
339
442
  use_tls (bool): True if communication with the cluster should use Transport Level Security.
443
+ Please use `AdvancedGlideClusterClientConfiguration`.
340
444
  credentials (ServerCredentials): Credentials for authentication process.
341
445
  If none are set, the client will not authenticate itself with the server.
342
446
  read_from (ReadFrom): If not set, `PRIMARY` will be used.
343
447
  request_timeout (Optional[int]): The duration in milliseconds that the client should wait for a request to complete.
344
448
  This duration encompasses sending the request, awaiting for a response from the server, and any required
345
- reconnections or retries.
449
+ reconnection or retries.
346
450
  If the specified timeout is exceeded for a pending request, it will result in a timeout error.
347
451
  If not explicitly set, a default value of 250 milliseconds will be used.
348
452
  reconnect_strategy (Optional[BackoffStrategy]): Strategy used to determine how and when to reconnect, in case of
349
453
  connection failures.
350
454
  If not set, a default backoff strategy will be used.
351
- database_id (Optional[int]): index of the logical database to connect to.
455
+ database_id (Optional[int]): Index of the logical database to connect to.
352
456
  client_name (Optional[str]): Client name to be used for the client. Will be used with CLIENT SETNAME command during
353
457
  connection establishment.
354
458
  protocol (ProtocolVersion): The version of the RESP protocol to communicate with the server.
@@ -387,7 +491,7 @@ class GlideClientConfiguration(BaseClientConfiguration):
387
491
  Attributes:
388
492
  channels_and_patterns (Dict[GlideClientConfiguration.PubSubChannelModes, Set[str]]):
389
493
  Channels and patterns by modes.
390
- callback (Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]):
494
+ callback (Optional[Callable[[PubSubMsg, Any], None]]):
391
495
  Optional callback to accept the incomming messages.
392
496
  context (Any):
393
497
  Arbitrary context to pass to the callback.
@@ -396,7 +500,7 @@ class GlideClientConfiguration(BaseClientConfiguration):
396
500
  channels_and_patterns: Dict[
397
501
  GlideClientConfiguration.PubSubChannelModes, Set[str]
398
502
  ]
399
- callback: Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]
503
+ callback: Optional[Callable[[PubSubMsg, Any], None]]
400
504
  context: Any
401
505
 
402
506
  def __init__(
@@ -414,6 +518,7 @@ class GlideClientConfiguration(BaseClientConfiguration):
414
518
  inflight_requests_limit: Optional[int] = None,
415
519
  client_az: Optional[str] = None,
416
520
  advanced_config: Optional[AdvancedGlideClientConfiguration] = None,
521
+ lazy_connect: Optional[bool] = None,
417
522
  ):
418
523
  super().__init__(
419
524
  addresses=addresses,
@@ -422,13 +527,14 @@ class GlideClientConfiguration(BaseClientConfiguration):
422
527
  read_from=read_from,
423
528
  request_timeout=request_timeout,
424
529
  reconnect_strategy=reconnect_strategy,
530
+ database_id=database_id,
425
531
  client_name=client_name,
426
532
  protocol=protocol,
427
533
  inflight_requests_limit=inflight_requests_limit,
428
534
  client_az=client_az,
429
535
  advanced_config=advanced_config,
536
+ lazy_connect=lazy_connect,
430
537
  )
431
- self.database_id = database_id
432
538
  self.pubsub_subscriptions = pubsub_subscriptions
433
539
 
434
540
  def _create_a_protobuf_conn_request(
@@ -436,8 +542,6 @@ class GlideClientConfiguration(BaseClientConfiguration):
436
542
  ) -> ConnectionRequest:
437
543
  assert cluster_mode is False
438
544
  request = super()._create_a_protobuf_conn_request(cluster_mode)
439
- if self.database_id:
440
- request.database_id = self.database_id
441
545
 
442
546
  if self.pubsub_subscriptions:
443
547
  if self.protocol == ProtocolVersion.RESP2:
@@ -468,7 +572,7 @@ class GlideClientConfiguration(BaseClientConfiguration):
468
572
 
469
573
  def _get_pubsub_callback_and_context(
470
574
  self,
471
- ) -> Tuple[Optional[Callable[[CoreCommands.PubSubMsg, Any], None]], Any]:
575
+ ) -> Tuple[Optional[Callable[[PubSubMsg, Any], None]], Any]:
472
576
  if self.pubsub_subscriptions:
473
577
  return self.pubsub_subscriptions.callback, self.pubsub_subscriptions.context
474
578
  return None, None
@@ -479,8 +583,12 @@ class AdvancedGlideClusterClientConfiguration(AdvancedBaseClientConfiguration):
479
583
  Represents the advanced configuration settings for a Glide Cluster client.
480
584
  """
481
585
 
482
- def __init__(self, connection_timeout: Optional[int] = None):
483
- super().__init__(connection_timeout)
586
+ def __init__(
587
+ self,
588
+ connection_timeout: Optional[int] = None,
589
+ tls_config: Optional[TlsAdvancedConfiguration] = None,
590
+ ):
591
+ super().__init__(connection_timeout, tls_config)
484
592
 
485
593
 
486
594
  class GlideClusterClientConfiguration(BaseClientConfiguration):
@@ -493,21 +601,23 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
493
601
  For example::
494
602
 
495
603
  [
496
- {address:configuration-endpoint.use1.cache.amazonaws.com, port:6379}
604
+ NodeAddress("sample-address-0001.use1.cache.amazonaws.com", 6379),
497
605
  ]
498
606
 
499
607
  use_tls (bool): True if communication with the cluster should use Transport Level Security.
608
+ For advanced tls configuration, please use `AdvancedGlideClusterClientConfiguration`.
500
609
  credentials (ServerCredentials): Credentials for authentication process.
501
610
  If none are set, the client will not authenticate itself with the server.
502
611
  read_from (ReadFrom): If not set, `PRIMARY` will be used.
503
612
  request_timeout (Optional[int]): The duration in milliseconds that the client should wait for a request to complete.
504
613
  This duration encompasses sending the request, awaiting for a response from the server, and any required
505
- reconnections or retries.
614
+ reconnection or retries.
506
615
  If the specified timeout is exceeded for a pending request, it will result in a timeout error. If not explicitly
507
616
  set, a default value of 250 milliseconds will be used.
508
617
  reconnect_strategy (Optional[BackoffStrategy]): Strategy used to determine how and when to reconnect, in case of
509
618
  connection failures.
510
619
  If not set, a default backoff strategy will be used.
620
+ database_id (Optional[int]): Index of the logical database to connect to.
511
621
  client_name (Optional[str]): Client name to be used for the client. Will be used with CLIENT SETNAME command during
512
622
  connection establishment.
513
623
  protocol (ProtocolVersion): The version of the RESP protocol to communicate with the server.
@@ -557,7 +667,7 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
557
667
  Attributes:
558
668
  channels_and_patterns (Dict[GlideClusterClientConfiguration.PubSubChannelModes, Set[str]]):
559
669
  Channels and patterns by modes.
560
- callback (Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]):
670
+ callback (Optional[Callable[[PubSubMsg, Any], None]]):
561
671
  Optional callback to accept the incoming messages.
562
672
  context (Any):
563
673
  Arbitrary context to pass to the callback.
@@ -566,7 +676,7 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
566
676
  channels_and_patterns: Dict[
567
677
  GlideClusterClientConfiguration.PubSubChannelModes, Set[str]
568
678
  ]
569
- callback: Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]
679
+ callback: Optional[Callable[[PubSubMsg, Any], None]]
570
680
  context: Any
571
681
 
572
682
  def __init__(
@@ -577,6 +687,7 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
577
687
  read_from: ReadFrom = ReadFrom.PRIMARY,
578
688
  request_timeout: Optional[int] = None,
579
689
  reconnect_strategy: Optional[BackoffStrategy] = None,
690
+ database_id: Optional[int] = None,
580
691
  client_name: Optional[str] = None,
581
692
  protocol: ProtocolVersion = ProtocolVersion.RESP3,
582
693
  periodic_checks: Union[
@@ -586,6 +697,7 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
586
697
  inflight_requests_limit: Optional[int] = None,
587
698
  client_az: Optional[str] = None,
588
699
  advanced_config: Optional[AdvancedGlideClusterClientConfiguration] = None,
700
+ lazy_connect: Optional[bool] = None,
589
701
  ):
590
702
  super().__init__(
591
703
  addresses=addresses,
@@ -594,11 +706,13 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
594
706
  read_from=read_from,
595
707
  request_timeout=request_timeout,
596
708
  reconnect_strategy=reconnect_strategy,
709
+ database_id=database_id,
597
710
  client_name=client_name,
598
711
  protocol=protocol,
599
712
  inflight_requests_limit=inflight_requests_limit,
600
713
  client_az=client_az,
601
714
  advanced_config=advanced_config,
715
+ lazy_connect=lazy_connect,
602
716
  )
603
717
  self.periodic_checks = periodic_checks
604
718
  self.pubsub_subscriptions = pubsub_subscriptions
@@ -637,6 +751,8 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
637
751
  for channel_pattern in channels_patterns:
638
752
  entry.channels_or_patterns.append(str.encode(channel_pattern))
639
753
 
754
+ if self.lazy_connect is not None:
755
+ request.lazy_connect = self.lazy_connect
640
756
  return request
641
757
 
642
758
  def _is_pubsub_configured(self) -> bool:
@@ -644,7 +760,7 @@ class GlideClusterClientConfiguration(BaseClientConfiguration):
644
760
 
645
761
  def _get_pubsub_callback_and_context(
646
762
  self,
647
- ) -> Tuple[Optional[Callable[[CoreCommands.PubSubMsg, Any], None]], Any]:
763
+ ) -> Tuple[Optional[Callable[[PubSubMsg, Any], None]], Any]:
648
764
  if self.pubsub_subscriptions:
649
765
  return self.pubsub_subscriptions.callback, self.pubsub_subscriptions.context
650
766
  return None, None
@@ -2,9 +2,9 @@
2
2
 
3
3
  from typing import Any, Dict, List, Literal, Mapping, Optional, Set, TypeVar, Union
4
4
 
5
- from glide.protobuf.command_request_pb2 import CommandRequest
6
- from glide.protobuf.connection_request_pb2 import ConnectionRequest
7
- from glide.routes import ByAddressRoute, RandomNode, SlotIdRoute, SlotKeyRoute
5
+ from glide_shared.protobuf.command_request_pb2 import CommandRequest
6
+ from glide_shared.protobuf.connection_request_pb2 import ConnectionRequest
7
+ from glide_shared.routes import ByAddressRoute, RandomNode, SlotIdRoute, SlotKeyRoute
8
8
 
9
9
  OK: str = "OK"
10
10
  DEFAULT_READ_BYTES_SIZE: int = pow(2, 16)
@@ -1,6 +1,8 @@
1
1
  # Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
2
2
 
3
- from typing import Optional
3
+ from typing import Optional, Type
4
+
5
+ from glide_shared.protobuf.response_pb2 import RequestErrorType
4
6
 
5
7
 
6
8
  class GlideError(Exception):
@@ -60,3 +62,27 @@ class ConfigurationError(RequestError):
60
62
  """
61
63
  Errors that are thrown when a request cannot be completed in current configuration settings.
62
64
  """
65
+
66
+ pass
67
+
68
+
69
+ class LoggerError(GlideError):
70
+ """
71
+ Errors that are thrown when the logger has an error initializing.
72
+ """
73
+
74
+ pass
75
+
76
+
77
+ def get_request_error_class(
78
+ error_type: Optional[RequestErrorType.ValueType],
79
+ ) -> Type[RequestError]:
80
+ if error_type == RequestErrorType.Disconnect:
81
+ return ConnectionError
82
+ if error_type == RequestErrorType.ExecAbort:
83
+ return ExecAbortError
84
+ if error_type == RequestErrorType.Timeout:
85
+ return TimeoutError
86
+ if error_type == RequestErrorType.Unspecified:
87
+ return RequestError
88
+ return RequestError
@@ -0,0 +1,54 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: protobuf/command_request.proto
4
+ # Protobuf Python Version: 4.25.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eprotobuf/command_request.proto\x12\x0f\x63ommand_request\"M\n\x0bSlotIdRoute\x12-\n\tslot_type\x18\x01 \x01(\x0e\x32\x1a.command_request.SlotTypes\x12\x0f\n\x07slot_id\x18\x02 \x01(\x05\"O\n\x0cSlotKeyRoute\x12-\n\tslot_type\x18\x01 \x01(\x0e\x32\x1a.command_request.SlotTypes\x12\x10\n\x08slot_key\x18\x02 \x01(\t\",\n\x0e\x42yAddressRoute\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\"\xf6\x01\n\x06Routes\x12\x36\n\rsimple_routes\x18\x01 \x01(\x0e\x32\x1d.command_request.SimpleRoutesH\x00\x12\x37\n\x0eslot_key_route\x18\x02 \x01(\x0b\x32\x1d.command_request.SlotKeyRouteH\x00\x12\x35\n\rslot_id_route\x18\x03 \x01(\x0b\x32\x1c.command_request.SlotIdRouteH\x00\x12;\n\x10\x62y_address_route\x18\x04 \x01(\x0b\x32\x1f.command_request.ByAddressRouteH\x00\x42\x07\n\x05value\"\xb6\x01\n\x07\x43ommand\x12\x32\n\x0crequest_type\x18\x01 \x01(\x0e\x32\x1c.command_request.RequestType\x12\x38\n\nargs_array\x18\x02 \x01(\x0b\x32\".command_request.Command.ArgsArrayH\x00\x12\x1a\n\x10\x61rgs_vec_pointer\x18\x03 \x01(\x04H\x00\x1a\x19\n\tArgsArray\x12\x0c\n\x04\x61rgs\x18\x01 \x03(\x0c\x42\x06\n\x04\x61rgs\"\x80\x01\n\x18ScriptInvocationPointers\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x19\n\x0ckeys_pointer\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x19\n\x0c\x61rgs_pointer\x18\x03 \x01(\x04H\x01\x88\x01\x01\x42\x0f\n\r_keys_pointerB\x0f\n\r_args_pointer\"<\n\x10ScriptInvocation\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\x0c\"\x90\x02\n\x05\x42\x61tch\x12\x11\n\tis_atomic\x18\x01 \x01(\x08\x12*\n\x08\x63ommands\x18\x02 \x03(\x0b\x32\x18.command_request.Command\x12\x1b\n\x0eraise_on_error\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x14\n\x07timeout\x18\x04 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12retry_server_error\x18\x05 \x01(\x08H\x02\x88\x01\x01\x12#\n\x16retry_connection_error\x18\x06 \x01(\x08H\x03\x88\x01\x01\x42\x11\n\x0f_raise_on_errorB\n\n\x08_timeoutB\x15\n\x13_retry_server_errorB\x19\n\x17_retry_connection_error\"\xb4\x01\n\x0b\x43lusterScan\x12\x0e\n\x06\x63ursor\x18\x01 \x01(\t\x12\x1a\n\rmatch_pattern\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x18\n\x0bobject_type\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x17\x61llow_non_covered_slots\x18\x05 \x01(\x08\x42\x10\n\x0e_match_patternB\x08\n\x06_countB\x0e\n\x0c_object_type\"V\n\x18UpdateConnectionPassword\x12\x15\n\x08password\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x0eimmediate_auth\x18\x02 \x01(\x08\x42\x0b\n\t_password\"\xfc\x03\n\x0e\x43ommandRequest\x12\x14\n\x0c\x63\x61llback_idx\x18\x01 \x01(\r\x12\x32\n\x0esingle_command\x18\x02 \x01(\x0b\x32\x18.command_request.CommandH\x00\x12\'\n\x05\x62\x61tch\x18\x03 \x01(\x0b\x32\x16.command_request.BatchH\x00\x12>\n\x11script_invocation\x18\x04 \x01(\x0b\x32!.command_request.ScriptInvocationH\x00\x12O\n\x1ascript_invocation_pointers\x18\x05 \x01(\x0b\x32).command_request.ScriptInvocationPointersH\x00\x12\x34\n\x0c\x63luster_scan\x18\x06 \x01(\x0b\x32\x1c.command_request.ClusterScanH\x00\x12O\n\x1aupdate_connection_password\x18\x07 \x01(\x0b\x32).command_request.UpdateConnectionPasswordH\x00\x12&\n\x05route\x18\x08 \x01(\x0b\x32\x17.command_request.Routes\x12\x1a\n\rroot_span_ptr\x18\t \x01(\x04H\x01\x88\x01\x01\x42\t\n\x07\x63ommandB\x10\n\x0e_root_span_ptr*:\n\x0cSimpleRoutes\x12\x0c\n\x08\x41llNodes\x10\x00\x12\x10\n\x0c\x41llPrimaries\x10\x01\x12\n\n\x06Random\x10\x02*%\n\tSlotTypes\x12\x0b\n\x07Primary\x10\x00\x12\x0b\n\x07Replica\x10\x01*\xea\x30\n\x0bRequestType\x12\x12\n\x0eInvalidRequest\x10\x00\x12\x11\n\rCustomCommand\x10\x01\x12\x0c\n\x08\x42itCount\x10\x65\x12\x0c\n\x08\x42itField\x10\x66\x12\x14\n\x10\x42itFieldReadOnly\x10g\x12\t\n\x05\x42itOp\x10h\x12\n\n\x06\x42itPos\x10i\x12\n\n\x06GetBit\x10j\x12\n\n\x06SetBit\x10k\x12\x0b\n\x06\x41sking\x10\xc9\x01\x12\x14\n\x0f\x43lusterAddSlots\x10\xca\x01\x12\x19\n\x14\x43lusterAddSlotsRange\x10\xcb\x01\x12\x15\n\x10\x43lusterBumpEpoch\x10\xcc\x01\x12\x1f\n\x1a\x43lusterCountFailureReports\x10\xcd\x01\x12\x1b\n\x16\x43lusterCountKeysInSlot\x10\xce\x01\x12\x14\n\x0f\x43lusterDelSlots\x10\xcf\x01\x12\x19\n\x14\x43lusterDelSlotsRange\x10\xd0\x01\x12\x14\n\x0f\x43lusterFailover\x10\xd1\x01\x12\x16\n\x11\x43lusterFlushSlots\x10\xd2\x01\x12\x12\n\rClusterForget\x10\xd3\x01\x12\x19\n\x14\x43lusterGetKeysInSlot\x10\xd4\x01\x12\x10\n\x0b\x43lusterInfo\x10\xd5\x01\x12\x13\n\x0e\x43lusterKeySlot\x10\xd6\x01\x12\x11\n\x0c\x43lusterLinks\x10\xd7\x01\x12\x10\n\x0b\x43lusterMeet\x10\xd8\x01\x12\x10\n\x0b\x43lusterMyId\x10\xd9\x01\x12\x15\n\x10\x43lusterMyShardId\x10\xda\x01\x12\x11\n\x0c\x43lusterNodes\x10\xdb\x01\x12\x14\n\x0f\x43lusterReplicas\x10\xdc\x01\x12\x15\n\x10\x43lusterReplicate\x10\xdd\x01\x12\x11\n\x0c\x43lusterReset\x10\xde\x01\x12\x16\n\x11\x43lusterSaveConfig\x10\xdf\x01\x12\x1a\n\x15\x43lusterSetConfigEpoch\x10\xe0\x01\x12\x13\n\x0e\x43lusterSetslot\x10\xe1\x01\x12\x12\n\rClusterShards\x10\xe2\x01\x12\x12\n\rClusterSlaves\x10\xe3\x01\x12\x11\n\x0c\x43lusterSlots\x10\xe4\x01\x12\r\n\x08ReadOnly\x10\xe5\x01\x12\x0e\n\tReadWrite\x10\xe6\x01\x12\t\n\x04\x41uth\x10\xad\x02\x12\x12\n\rClientCaching\x10\xae\x02\x12\x12\n\rClientGetName\x10\xaf\x02\x12\x13\n\x0e\x43lientGetRedir\x10\xb0\x02\x12\r\n\x08\x43lientId\x10\xb1\x02\x12\x0f\n\nClientInfo\x10\xb2\x02\x12\x15\n\x10\x43lientKillSimple\x10\xb3\x02\x12\x0f\n\nClientKill\x10\xb4\x02\x12\x0f\n\nClientList\x10\xb5\x02\x12\x12\n\rClientNoEvict\x10\xb6\x02\x12\x12\n\rClientNoTouch\x10\xb7\x02\x12\x10\n\x0b\x43lientPause\x10\xb8\x02\x12\x10\n\x0b\x43lientReply\x10\xb9\x02\x12\x12\n\rClientSetInfo\x10\xba\x02\x12\x12\n\rClientSetName\x10\xbb\x02\x12\x13\n\x0e\x43lientTracking\x10\xbc\x02\x12\x17\n\x12\x43lientTrackingInfo\x10\xbd\x02\x12\x12\n\rClientUnblock\x10\xbe\x02\x12\x12\n\rClientUnpause\x10\xbf\x02\x12\t\n\x04\x45\x63ho\x10\xc0\x02\x12\n\n\x05Hello\x10\xc1\x02\x12\t\n\x04Ping\x10\xc2\x02\x12\t\n\x04Quit\x10\xc3\x02\x12\n\n\x05Reset\x10\xc4\x02\x12\x0b\n\x06Select\x10\xc5\x02\x12\t\n\x04\x43opy\x10\x91\x03\x12\x08\n\x03\x44\x65l\x10\x92\x03\x12\t\n\x04\x44ump\x10\x93\x03\x12\x0b\n\x06\x45xists\x10\x94\x03\x12\x0b\n\x06\x45xpire\x10\x95\x03\x12\r\n\x08\x45xpireAt\x10\x96\x03\x12\x0f\n\nExpireTime\x10\x97\x03\x12\t\n\x04Keys\x10\x98\x03\x12\x0c\n\x07Migrate\x10\x99\x03\x12\t\n\x04Move\x10\x9a\x03\x12\x13\n\x0eObjectEncoding\x10\x9b\x03\x12\x0f\n\nObjectFreq\x10\x9c\x03\x12\x13\n\x0eObjectIdleTime\x10\x9d\x03\x12\x13\n\x0eObjectRefCount\x10\x9e\x03\x12\x0c\n\x07Persist\x10\x9f\x03\x12\x0c\n\x07PExpire\x10\xa0\x03\x12\x0e\n\tPExpireAt\x10\xa1\x03\x12\x10\n\x0bPExpireTime\x10\xa2\x03\x12\t\n\x04PTTL\x10\xa3\x03\x12\x0e\n\tRandomKey\x10\xa4\x03\x12\x0b\n\x06Rename\x10\xa5\x03\x12\r\n\x08RenameNX\x10\xa6\x03\x12\x0c\n\x07Restore\x10\xa7\x03\x12\t\n\x04Scan\x10\xa8\x03\x12\t\n\x04Sort\x10\xa9\x03\x12\x11\n\x0cSortReadOnly\x10\xaa\x03\x12\n\n\x05Touch\x10\xab\x03\x12\x08\n\x03TTL\x10\xac\x03\x12\t\n\x04Type\x10\xad\x03\x12\x0b\n\x06Unlink\x10\xae\x03\x12\t\n\x04Wait\x10\xaf\x03\x12\x0c\n\x07WaitAof\x10\xb0\x03\x12\x0b\n\x06GeoAdd\x10\xf5\x03\x12\x0c\n\x07GeoDist\x10\xf6\x03\x12\x0c\n\x07GeoHash\x10\xf7\x03\x12\x0b\n\x06GeoPos\x10\xf8\x03\x12\x0e\n\tGeoRadius\x10\xf9\x03\x12\x16\n\x11GeoRadiusReadOnly\x10\xfa\x03\x12\x16\n\x11GeoRadiusByMember\x10\xfb\x03\x12\x1e\n\x19GeoRadiusByMemberReadOnly\x10\xfc\x03\x12\x0e\n\tGeoSearch\x10\xfd\x03\x12\x13\n\x0eGeoSearchStore\x10\xfe\x03\x12\t\n\x04HDel\x10\xd9\x04\x12\x0c\n\x07HExists\x10\xda\x04\x12\t\n\x04HGet\x10\xdb\x04\x12\x0c\n\x07HGetAll\x10\xdc\x04\x12\x0c\n\x07HIncrBy\x10\xdd\x04\x12\x11\n\x0cHIncrByFloat\x10\xde\x04\x12\n\n\x05HKeys\x10\xdf\x04\x12\t\n\x04HLen\x10\xe0\x04\x12\n\n\x05HMGet\x10\xe1\x04\x12\n\n\x05HMSet\x10\xe2\x04\x12\x0f\n\nHRandField\x10\xe3\x04\x12\n\n\x05HScan\x10\xe4\x04\x12\t\n\x04HSet\x10\xe5\x04\x12\x0b\n\x06HSetNX\x10\xe6\x04\x12\x0c\n\x07HStrlen\x10\xe7\x04\x12\n\n\x05HVals\x10\xe8\x04\x12\x0b\n\x06HSetEx\x10\xe9\x04\x12\x0b\n\x06HGetEx\x10\xea\x04\x12\x0c\n\x07HExpire\x10\xeb\x04\x12\x0e\n\tHExpireAt\x10\xec\x04\x12\r\n\x08HPExpire\x10\xed\x04\x12\x0f\n\nHPExpireAt\x10\xee\x04\x12\r\n\x08HPersist\x10\xef\x04\x12\t\n\x04HTtl\x10\xf0\x04\x12\n\n\x05HPTtl\x10\xf1\x04\x12\x10\n\x0bHExpireTime\x10\xf2\x04\x12\x11\n\x0cHPExpireTime\x10\xf3\x04\x12\n\n\x05PfAdd\x10\xbd\x05\x12\x0c\n\x07PfCount\x10\xbe\x05\x12\x0c\n\x07PfMerge\x10\xbf\x05\x12\x0b\n\x06\x42LMove\x10\xa1\x06\x12\x0b\n\x06\x42LMPop\x10\xa2\x06\x12\n\n\x05\x42LPop\x10\xa3\x06\x12\n\n\x05\x42RPop\x10\xa4\x06\x12\x0f\n\nBRPopLPush\x10\xa5\x06\x12\x0b\n\x06LIndex\x10\xa6\x06\x12\x0c\n\x07LInsert\x10\xa7\x06\x12\t\n\x04LLen\x10\xa8\x06\x12\n\n\x05LMove\x10\xa9\x06\x12\n\n\x05LMPop\x10\xaa\x06\x12\t\n\x04LPop\x10\xab\x06\x12\t\n\x04LPos\x10\xac\x06\x12\n\n\x05LPush\x10\xad\x06\x12\x0b\n\x06LPushX\x10\xae\x06\x12\x0b\n\x06LRange\x10\xaf\x06\x12\t\n\x04LRem\x10\xb0\x06\x12\t\n\x04LSet\x10\xb1\x06\x12\n\n\x05LTrim\x10\xb2\x06\x12\t\n\x04RPop\x10\xb3\x06\x12\x0e\n\tRPopLPush\x10\xb4\x06\x12\n\n\x05RPush\x10\xb5\x06\x12\x0b\n\x06RPushX\x10\xb6\x06\x12\x0f\n\nPSubscribe\x10\x85\x07\x12\x0c\n\x07Publish\x10\x86\x07\x12\x13\n\x0ePubSubChannels\x10\x87\x07\x12\x11\n\x0cPubSubNumPat\x10\x88\x07\x12\x11\n\x0cPubSubNumSub\x10\x89\x07\x12\x18\n\x13PubSubShardChannels\x10\x8a\x07\x12\x16\n\x11PubSubShardNumSub\x10\x8b\x07\x12\x11\n\x0cPUnsubscribe\x10\x8c\x07\x12\r\n\x08SPublish\x10\x8d\x07\x12\x0f\n\nSSubscribe\x10\x8e\x07\x12\x0e\n\tSubscribe\x10\x8f\x07\x12\x11\n\x0cSUnsubscribe\x10\x90\x07\x12\x10\n\x0bUnsubscribe\x10\x91\x07\x12\t\n\x04\x45val\x10\xe9\x07\x12\x11\n\x0c\x45valReadOnly\x10\xea\x07\x12\x0c\n\x07\x45valSha\x10\xeb\x07\x12\x14\n\x0f\x45valShaReadOnly\x10\xec\x07\x12\n\n\x05\x46\x43\x61ll\x10\xed\x07\x12\x12\n\rFCallReadOnly\x10\xee\x07\x12\x13\n\x0e\x46unctionDelete\x10\xef\x07\x12\x11\n\x0c\x46unctionDump\x10\xf0\x07\x12\x12\n\rFunctionFlush\x10\xf1\x07\x12\x11\n\x0c\x46unctionKill\x10\xf2\x07\x12\x11\n\x0c\x46unctionList\x10\xf3\x07\x12\x11\n\x0c\x46unctionLoad\x10\xf4\x07\x12\x14\n\x0f\x46unctionRestore\x10\xf5\x07\x12\x12\n\rFunctionStats\x10\xf6\x07\x12\x10\n\x0bScriptDebug\x10\xf7\x07\x12\x11\n\x0cScriptExists\x10\xf8\x07\x12\x10\n\x0bScriptFlush\x10\xf9\x07\x12\x0f\n\nScriptKill\x10\xfa\x07\x12\x0f\n\nScriptLoad\x10\xfb\x07\x12\x0f\n\nScriptShow\x10\xfc\x07\x12\x0b\n\x06\x41\x63lCat\x10\xcd\x08\x12\x0f\n\nAclDelUser\x10\xce\x08\x12\x0e\n\tAclDryRun\x10\xcf\x08\x12\x0f\n\nAclGenPass\x10\xd0\x08\x12\x0f\n\nAclGetUser\x10\xd1\x08\x12\x0c\n\x07\x41\x63lList\x10\xd2\x08\x12\x0c\n\x07\x41\x63lLoad\x10\xd3\x08\x12\x0b\n\x06\x41\x63lLog\x10\xd4\x08\x12\x0c\n\x07\x41\x63lSave\x10\xd5\x08\x12\x0f\n\nAclSetSser\x10\xd6\x08\x12\r\n\x08\x41\x63lUsers\x10\xd7\x08\x12\x0e\n\tAclWhoami\x10\xd8\x08\x12\x11\n\x0c\x42gRewriteAof\x10\xd9\x08\x12\x0b\n\x06\x42gSave\x10\xda\x08\x12\r\n\x08\x43ommand_\x10\xdb\x08\x12\x11\n\x0c\x43ommandCount\x10\xdc\x08\x12\x10\n\x0b\x43ommandDocs\x10\xdd\x08\x12\x13\n\x0e\x43ommandGetKeys\x10\xde\x08\x12\x1b\n\x16\x43ommandGetKeysAndFlags\x10\xdf\x08\x12\x10\n\x0b\x43ommandInfo\x10\xe0\x08\x12\x10\n\x0b\x43ommandList\x10\xe1\x08\x12\x0e\n\tConfigGet\x10\xe2\x08\x12\x14\n\x0f\x43onfigResetStat\x10\xe3\x08\x12\x12\n\rConfigRewrite\x10\xe4\x08\x12\x0e\n\tConfigSet\x10\xe5\x08\x12\x0b\n\x06\x44\x42Size\x10\xe6\x08\x12\r\n\x08\x46\x61ilOver\x10\xe7\x08\x12\r\n\x08\x46lushAll\x10\xe8\x08\x12\x0c\n\x07\x46lushDB\x10\xe9\x08\x12\t\n\x04Info\x10\xea\x08\x12\r\n\x08LastSave\x10\xeb\x08\x12\x12\n\rLatencyDoctor\x10\xec\x08\x12\x11\n\x0cLatencyGraph\x10\xed\x08\x12\x15\n\x10LatencyHistogram\x10\xee\x08\x12\x13\n\x0eLatencyHistory\x10\xef\x08\x12\x12\n\rLatencyLatest\x10\xf0\x08\x12\x11\n\x0cLatencyReset\x10\xf1\x08\x12\x0b\n\x06Lolwut\x10\xf2\x08\x12\x11\n\x0cMemoryDoctor\x10\xf3\x08\x12\x16\n\x11MemoryMallocStats\x10\xf4\x08\x12\x10\n\x0bMemoryPurge\x10\xf5\x08\x12\x10\n\x0bMemoryStats\x10\xf6\x08\x12\x10\n\x0bMemoryUsage\x10\xf7\x08\x12\x0f\n\nModuleList\x10\xf8\x08\x12\x0f\n\nModuleLoad\x10\xf9\x08\x12\x11\n\x0cModuleLoadEx\x10\xfa\x08\x12\x11\n\x0cModuleUnload\x10\xfb\x08\x12\x0c\n\x07Monitor\x10\xfc\x08\x12\n\n\x05PSync\x10\xfd\x08\x12\r\n\x08ReplConf\x10\xfe\x08\x12\x0e\n\tReplicaOf\x10\xff\x08\x12\x12\n\rRestoreAsking\x10\x80\t\x12\t\n\x04Role\x10\x81\t\x12\t\n\x04Save\x10\x82\t\x12\r\n\x08ShutDown\x10\x83\t\x12\x0c\n\x07SlaveOf\x10\x84\t\x12\x0f\n\nSlowLogGet\x10\x85\t\x12\x0f\n\nSlowLogLen\x10\x86\t\x12\x11\n\x0cSlowLogReset\x10\x87\t\x12\x0b\n\x06SwapDb\x10\x88\t\x12\t\n\x04Sync\x10\x89\t\x12\t\n\x04Time\x10\x8a\t\x12\t\n\x04SAdd\x10\xb1\t\x12\n\n\x05SCard\x10\xb2\t\x12\n\n\x05SDiff\x10\xb3\t\x12\x0f\n\nSDiffStore\x10\xb4\t\x12\x0b\n\x06SInter\x10\xb5\t\x12\x0f\n\nSInterCard\x10\xb6\t\x12\x10\n\x0bSInterStore\x10\xb7\t\x12\x0e\n\tSIsMember\x10\xb8\t\x12\r\n\x08SMembers\x10\xb9\t\x12\x0f\n\nSMIsMember\x10\xba\t\x12\n\n\x05SMove\x10\xbb\t\x12\t\n\x04SPop\x10\xbc\t\x12\x10\n\x0bSRandMember\x10\xbd\t\x12\t\n\x04SRem\x10\xbe\t\x12\n\n\x05SScan\x10\xbf\t\x12\x0b\n\x06SUnion\x10\xc0\t\x12\x10\n\x0bSUnionStore\x10\xc1\t\x12\x0b\n\x06\x42ZMPop\x10\x95\n\x12\r\n\x08\x42ZPopMax\x10\x96\n\x12\r\n\x08\x42ZPopMin\x10\x97\n\x12\t\n\x04ZAdd\x10\x98\n\x12\n\n\x05ZCard\x10\x99\n\x12\x0b\n\x06ZCount\x10\x9a\n\x12\n\n\x05ZDiff\x10\x9b\n\x12\x0f\n\nZDiffStore\x10\x9c\n\x12\x0c\n\x07ZIncrBy\x10\x9d\n\x12\x0b\n\x06ZInter\x10\x9e\n\x12\x0f\n\nZInterCard\x10\x9f\n\x12\x10\n\x0bZInterStore\x10\xa0\n\x12\x0e\n\tZLexCount\x10\xa1\n\x12\n\n\x05ZMPop\x10\xa2\n\x12\x0c\n\x07ZMScore\x10\xa3\n\x12\x0c\n\x07ZPopMax\x10\xa4\n\x12\x0c\n\x07ZPopMin\x10\xa5\n\x12\x10\n\x0bZRandMember\x10\xa6\n\x12\x0b\n\x06ZRange\x10\xa7\n\x12\x10\n\x0bZRangeByLex\x10\xa8\n\x12\x12\n\rZRangeByScore\x10\xa9\n\x12\x10\n\x0bZRangeStore\x10\xaa\n\x12\n\n\x05ZRank\x10\xab\n\x12\t\n\x04ZRem\x10\xac\n\x12\x13\n\x0eZRemRangeByLex\x10\xad\n\x12\x14\n\x0fZRemRangeByRank\x10\xae\n\x12\x15\n\x10ZRemRangeByScore\x10\xaf\n\x12\x0e\n\tZRevRange\x10\xb0\n\x12\x13\n\x0eZRevRangeByLex\x10\xb1\n\x12\x15\n\x10ZRevRangeByScore\x10\xb2\n\x12\r\n\x08ZRevRank\x10\xb3\n\x12\n\n\x05ZScan\x10\xb4\n\x12\x0b\n\x06ZScore\x10\xb5\n\x12\x0b\n\x06ZUnion\x10\xb6\n\x12\x10\n\x0bZUnionStore\x10\xb7\n\x12\t\n\x04XAck\x10\xf9\n\x12\t\n\x04XAdd\x10\xfa\n\x12\x0f\n\nXAutoClaim\x10\xfb\n\x12\x0b\n\x06XClaim\x10\xfc\n\x12\t\n\x04XDel\x10\xfd\n\x12\x11\n\x0cXGroupCreate\x10\xfe\n\x12\x19\n\x14XGroupCreateConsumer\x10\xff\n\x12\x16\n\x11XGroupDelConsumer\x10\x80\x0b\x12\x12\n\rXGroupDestroy\x10\x81\x0b\x12\x10\n\x0bXGroupSetId\x10\x82\x0b\x12\x13\n\x0eXInfoConsumers\x10\x83\x0b\x12\x10\n\x0bXInfoGroups\x10\x84\x0b\x12\x10\n\x0bXInfoStream\x10\x85\x0b\x12\t\n\x04XLen\x10\x86\x0b\x12\r\n\x08XPending\x10\x87\x0b\x12\x0b\n\x06XRange\x10\x88\x0b\x12\n\n\x05XRead\x10\x89\x0b\x12\x0f\n\nXReadGroup\x10\x8a\x0b\x12\x0e\n\tXRevRange\x10\x8b\x0b\x12\x0b\n\x06XSetId\x10\x8c\x0b\x12\n\n\x05XTrim\x10\x8d\x0b\x12\x0b\n\x06\x41ppend\x10\xdd\x0b\x12\t\n\x04\x44\x65\x63r\x10\xde\x0b\x12\x0b\n\x06\x44\x65\x63rBy\x10\xdf\x0b\x12\x08\n\x03Get\x10\xe0\x0b\x12\x0b\n\x06GetDel\x10\xe1\x0b\x12\n\n\x05GetEx\x10\xe2\x0b\x12\r\n\x08GetRange\x10\xe3\x0b\x12\x0b\n\x06GetSet\x10\xe4\x0b\x12\t\n\x04Incr\x10\xe5\x0b\x12\x0b\n\x06IncrBy\x10\xe6\x0b\x12\x10\n\x0bIncrByFloat\x10\xe7\x0b\x12\x08\n\x03LCS\x10\xe8\x0b\x12\t\n\x04MGet\x10\xe9\x0b\x12\t\n\x04MSet\x10\xea\x0b\x12\x0b\n\x06MSetNX\x10\xeb\x0b\x12\x0b\n\x06PSetEx\x10\xec\x0b\x12\x08\n\x03Set\x10\xed\x0b\x12\n\n\x05SetEx\x10\xee\x0b\x12\n\n\x05SetNX\x10\xef\x0b\x12\r\n\x08SetRange\x10\xf0\x0b\x12\x0b\n\x06Strlen\x10\xf1\x0b\x12\x0b\n\x06Substr\x10\xf2\x0b\x12\x0c\n\x07\x44iscard\x10\xc1\x0c\x12\t\n\x04\x45xec\x10\xc2\x0c\x12\n\n\x05Multi\x10\xc3\x0c\x12\x0c\n\x07UnWatch\x10\xc4\x0c\x12\n\n\x05Watch\x10\xc5\x0c\x12\x12\n\rJsonArrAppend\x10\xd1\x0f\x12\x11\n\x0cJsonArrIndex\x10\xd2\x0f\x12\x12\n\rJsonArrInsert\x10\xd3\x0f\x12\x0f\n\nJsonArrLen\x10\xd4\x0f\x12\x0f\n\nJsonArrPop\x10\xd5\x0f\x12\x10\n\x0bJsonArrTrim\x10\xd6\x0f\x12\x0e\n\tJsonClear\x10\xd7\x0f\x12\x0e\n\tJsonDebug\x10\xd8\x0f\x12\x0c\n\x07JsonDel\x10\xd9\x0f\x12\x0f\n\nJsonForget\x10\xda\x0f\x12\x0c\n\x07JsonGet\x10\xdb\x0f\x12\r\n\x08JsonMGet\x10\xdc\x0f\x12\x12\n\rJsonNumIncrBy\x10\xdd\x0f\x12\x12\n\rJsonNumMultBy\x10\xde\x0f\x12\x10\n\x0bJsonObjKeys\x10\xdf\x0f\x12\x0f\n\nJsonObjLen\x10\xe0\x0f\x12\r\n\x08JsonResp\x10\xe1\x0f\x12\x0c\n\x07JsonSet\x10\xe2\x0f\x12\x12\n\rJsonStrAppend\x10\xe3\x0f\x12\x0f\n\nJsonStrLen\x10\xe4\x0f\x12\x0f\n\nJsonToggle\x10\xe5\x0f\x12\r\n\x08JsonType\x10\xe6\x0f\x12\x0b\n\x06\x46tList\x10\xb5\x10\x12\x10\n\x0b\x46tAggregate\x10\xb6\x10\x12\x0f\n\nFtAliasAdd\x10\xb7\x10\x12\x0f\n\nFtAliasDel\x10\xb8\x10\x12\x10\n\x0b\x46tAliasList\x10\xb9\x10\x12\x12\n\rFtAliasUpdate\x10\xba\x10\x12\r\n\x08\x46tCreate\x10\xbb\x10\x12\x10\n\x0b\x46tDropIndex\x10\xbc\x10\x12\x0e\n\tFtExplain\x10\xbd\x10\x12\x11\n\x0c\x46tExplainCli\x10\xbe\x10\x12\x0b\n\x06\x46tInfo\x10\xbf\x10\x12\x0e\n\tFtProfile\x10\xc0\x10\x12\r\n\x08\x46tSearch\x10\xc1\x10\x62\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'protobuf.command_request_pb2', _globals)
22
+ if _descriptor._USE_C_DESCRIPTORS == False:
23
+ DESCRIPTOR._options = None
24
+ _globals['_SIMPLEROUTES']._serialized_start=1941
25
+ _globals['_SIMPLEROUTES']._serialized_end=1999
26
+ _globals['_SLOTTYPES']._serialized_start=2001
27
+ _globals['_SLOTTYPES']._serialized_end=2038
28
+ _globals['_REQUESTTYPE']._serialized_start=2041
29
+ _globals['_REQUESTTYPE']._serialized_end=8291
30
+ _globals['_SLOTIDROUTE']._serialized_start=51
31
+ _globals['_SLOTIDROUTE']._serialized_end=128
32
+ _globals['_SLOTKEYROUTE']._serialized_start=130
33
+ _globals['_SLOTKEYROUTE']._serialized_end=209
34
+ _globals['_BYADDRESSROUTE']._serialized_start=211
35
+ _globals['_BYADDRESSROUTE']._serialized_end=255
36
+ _globals['_ROUTES']._serialized_start=258
37
+ _globals['_ROUTES']._serialized_end=504
38
+ _globals['_COMMAND']._serialized_start=507
39
+ _globals['_COMMAND']._serialized_end=689
40
+ _globals['_COMMAND_ARGSARRAY']._serialized_start=656
41
+ _globals['_COMMAND_ARGSARRAY']._serialized_end=681
42
+ _globals['_SCRIPTINVOCATIONPOINTERS']._serialized_start=692
43
+ _globals['_SCRIPTINVOCATIONPOINTERS']._serialized_end=820
44
+ _globals['_SCRIPTINVOCATION']._serialized_start=822
45
+ _globals['_SCRIPTINVOCATION']._serialized_end=882
46
+ _globals['_BATCH']._serialized_start=885
47
+ _globals['_BATCH']._serialized_end=1157
48
+ _globals['_CLUSTERSCAN']._serialized_start=1160
49
+ _globals['_CLUSTERSCAN']._serialized_end=1340
50
+ _globals['_UPDATECONNECTIONPASSWORD']._serialized_start=1342
51
+ _globals['_UPDATECONNECTIONPASSWORD']._serialized_end=1428
52
+ _globals['_COMMANDREQUEST']._serialized_start=1431
53
+ _globals['_COMMANDREQUEST']._serialized_end=1939
54
+ # @@protoc_insertion_point(module_scope)