valkey-glide 1.2.0rc14__cp311-cp311-macosx_11_0_arm64.whl → 2.2.3__cp311-cp311-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.
Files changed (47) hide show
  1. glide/__init__.py +169 -104
  2. glide/async_commands/cluster_commands.py +367 -172
  3. glide/async_commands/core.py +1808 -1026
  4. glide/async_commands/{server_modules/ft.py → ft.py} +91 -21
  5. glide/async_commands/{server_modules/glide_json.py → glide_json.py} +161 -146
  6. glide/async_commands/standalone_commands.py +204 -136
  7. glide/glide.cpython-311-darwin.so +0 -0
  8. glide/glide.pyi +26 -1
  9. glide/glide_client.py +355 -136
  10. glide/logger.py +34 -22
  11. glide/opentelemetry.py +185 -0
  12. glide_shared/__init__.py +330 -0
  13. glide_shared/commands/__init__.py +0 -0
  14. glide/async_commands/transaction.py → glide_shared/commands/batch.py +1845 -1059
  15. glide_shared/commands/batch_options.py +261 -0
  16. {glide/async_commands → glide_shared/commands}/bitmap.py +96 -86
  17. {glide/async_commands → glide_shared/commands}/command_args.py +7 -6
  18. glide_shared/commands/core_options.py +407 -0
  19. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_aggregate_options.py +18 -11
  20. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_create_options.py +27 -13
  21. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_profile_options.py +16 -11
  22. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_search_options.py +17 -9
  23. glide_shared/commands/server_modules/json_batch.py +820 -0
  24. glide_shared/commands/server_modules/json_options.py +93 -0
  25. {glide/async_commands → glide_shared/commands}/sorted_set.py +42 -32
  26. {glide/async_commands → glide_shared/commands}/stream.py +95 -88
  27. glide_shared/config.py +975 -0
  28. {glide → glide_shared}/constants.py +11 -7
  29. {glide → glide_shared}/exceptions.py +27 -1
  30. glide_shared/protobuf/command_request_pb2.py +56 -0
  31. glide_shared/protobuf/connection_request_pb2.py +56 -0
  32. {glide → glide_shared}/protobuf/response_pb2.py +6 -6
  33. {glide → glide_shared}/protobuf_codec.py +7 -6
  34. glide_shared/routes.py +161 -0
  35. valkey_glide-2.2.3.dist-info/METADATA +211 -0
  36. valkey_glide-2.2.3.dist-info/RECORD +40 -0
  37. {valkey_glide-1.2.0rc14.dist-info → valkey_glide-2.2.3.dist-info}/WHEEL +1 -1
  38. glide/config.py +0 -521
  39. glide/protobuf/command_request_pb2.py +0 -54
  40. glide/protobuf/command_request_pb2.pyi +0 -1161
  41. glide/protobuf/connection_request_pb2.py +0 -52
  42. glide/protobuf/connection_request_pb2.pyi +0 -287
  43. glide/protobuf/response_pb2.pyi +0 -101
  44. glide/routes.py +0 -114
  45. valkey_glide-1.2.0rc14.dist-info/METADATA +0 -122
  46. valkey_glide-1.2.0rc14.dist-info/RECORD +0 -36
  47. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_constants.py +0 -0
@@ -0,0 +1,40 @@
1
+ valkey_glide-2.2.3.dist-info/METADATA,sha256=QCsYgeekUqJ7o4lz8LiHFQQeY3eDY5s4AUaWLoVe8_Q,6998
2
+ valkey_glide-2.2.3.dist-info/WHEEL,sha256=8hoTVLxyLdG351Jq1HozDQCHHiKu32mfNA2_wpcO9P4,106
3
+ glide/async_commands/glide_json.py,sha256=H5dnB4vJkGPpNXJZhhVyPQoTSbkN_chq5Xw6tkP0wMQ,60410
4
+ glide/async_commands/ft.py,sha256=1v96sBCgiXtPbj85ZurY3ruLCmok3cPoaIXSiJBEv9Y,16849
5
+ glide/async_commands/__init__.py,sha256=_tbTAFATlzp4L2qe-H77PpAQK-16VsV-y7uKNUKLC_o,136
6
+ glide/async_commands/core.py,sha256=x6lu7xt_pLR5drYDzNHTj0ORYX_oL73v2ZN4yxrTxGk,330289
7
+ glide/async_commands/standalone_commands.py,sha256=0YgOnH-8VVM8Cz_iJ2YxTeh8BdLpaxCjROkDhe_2Om8,38228
8
+ glide/async_commands/cluster_commands.py,sha256=NbRijIA22tDaBZg3VlBPUBGmgZ5elq5KnW-FEha9tfI,61045
9
+ glide/__init__.py,sha256=u_9M1dUNtZcI8AwbgnA_8Aox81Xbv_oLvn2ApSOmHCY,8843
10
+ glide/glide.pyi,sha256=6JIpAeADQ-1fU1Mp99pyh7aJORDxAAdtQebV5aByIVI,2093
11
+ glide/opentelemetry.py,sha256=vg9fTYXj7_rni7hVBkZBJ1ZN4-RSGde5fOH4DsnVx_4,7476
12
+ glide/glide_client.py,sha256=dyfHPiDTjvvCcOEcR2HyHK95-9WfYflXXAcLfyetfMk,32981
13
+ glide/logger.py,sha256=5-bAhfH_6hYEXdcgBR9R_wdeffSLHqEN-aQeIyMHnYY,4103
14
+ glide/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ glide_shared/__init__.py,sha256=CWiz6vdOysZ-J8skev8VIXG2SPdNaJ8lk-5emGAzzE4,7217
16
+ glide_shared/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ glide_shared/commands/batch.py,sha256=CYf12G6vQhUv2CcziwQJ5ZTE2c2DDvKEBlx2sgmi-K0,247356
18
+ glide_shared/commands/batch_options.py,sha256=i2lDCLhMzUvpArb2bxX16xu7X-im0hLPaLXALkxWeQ8,11130
19
+ glide_shared/commands/bitmap.py,sha256=ZHGLcKBP7RADtANqIR7PWdIW_gfDBFgpkIsQ-T4QFBQ,10125
20
+ glide_shared/commands/command_args.py,sha256=55vpSxeQr8wFU7olkFTEecl66wPk1g6vWxVYj16UvXs,2529
21
+ glide_shared/commands/core_options.py,sha256=Y_1dFbW50hIHl16xkF4gnJnX_o2_f8neyXNjmc8KCKA,12607
22
+ glide_shared/commands/server_modules/ft_options/ft_aggregate_options.py,sha256=8b3sfsASS3Dr4eSNeRtn28gx8PjrRPOhoXZyoOmVF18,9928
23
+ glide_shared/commands/server_modules/ft_options/ft_constants.py,sha256=r9uLAExg2qThjwOBC8LxqXBITF0fwa5xfnD7EXnyPrw,1704
24
+ glide_shared/commands/server_modules/ft_options/ft_create_options.py,sha256=ll8AQPRe0_v10BdQXfCdN03bml3TEYbTWdaV3L5J_QU,13738
25
+ glide_shared/commands/server_modules/ft_options/ft_profile_options.py,sha256=yIapUTI_f7EI75BcVff9GpAZTT_GD1HS7QVhqjnyV6k,4283
26
+ glide_shared/commands/server_modules/ft_options/ft_search_options.py,sha256=imrnNhBaVsYjlknQpqitXDePoF8sXYdqQS4Ek_DXf7w,4872
27
+ glide_shared/commands/server_modules/json_batch.py,sha256=uqkLXPCOkzp53GfffnII1xA9ga0DefLYPnQ8ta899HE,36651
28
+ glide_shared/commands/server_modules/json_options.py,sha256=0dFk3EEtcERpmkNoO8930MqfEHLVaQRBRcg3CpL7nmE,3042
29
+ glide_shared/commands/sorted_set.py,sha256=hnXud0Ewn1uBdM6T2xzfCneZWfTeP-2U0XfEDGNCqlI,11466
30
+ glide_shared/commands/stream.py,sha256=MlllDP3teVX8BOB4ANb0JFC4RkUp8SQLCGlGMSPU_s4,15589
31
+ glide_shared/config.py,sha256=IScbmbbyemqw0TlkpqLgp2mFY48H2PtF2nE4K4mVGuc,43223
32
+ glide_shared/constants.py,sha256=pS7Xbjvq_qG3mlolVf51cCAGzXRhGdhvGIs2QK3R_b4,4375
33
+ glide_shared/exceptions.py,sha256=Z_szeAE-m1gsoBr5bPQymF6W6wiaunoHvBrt1dHbiYw,1852
34
+ glide_shared/protobuf/command_request_pb2.py,sha256=FIumn0p54n24pNykzWOoSGHQqvaY8-XopLWO0VqqKSI,19539
35
+ glide_shared/protobuf/connection_request_pb2.py,sha256=wlY76aIWKdyETOjD0Xh_B3RsfXqFwzkT0-lymAkTOes,6228
36
+ glide_shared/protobuf/response_pb2.py,sha256=oT2GHUwjrxvBVdINRKCvb3_BFN0Fq2wqwHbTj7KAX2E,2110
37
+ glide_shared/protobuf_codec.py,sha256=xwt4-D4WbvNIY_vjOd-00c73HOyNjWq7nN-Z718PBVA,3667
38
+ glide_shared/routes.py,sha256=HFccxCzXQXSi6Y1HFsRUm9ZcbJgCrar6y6uOWpGJWe0,4746
39
+ glide/glide.cpython-311-darwin.so,sha256=jeTWlebj5Dxp4lOtAW__DgfiHgMtnrLDiBALS6zjMig,13625328
40
+ valkey_glide-2.2.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (0.14.14)
2
+ Generator: maturin (0.14.17)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp311-cp311-macosx_11_0_arm64
glide/config.py DELETED
@@ -1,521 +0,0 @@
1
- # Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
2
-
3
- from __future__ import annotations
4
-
5
- from dataclasses import dataclass
6
- from enum import Enum, IntEnum
7
- from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
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
15
-
16
-
17
- class NodeAddress:
18
- def __init__(self, host: str = "localhost", port: int = 6379):
19
- """
20
- Represents the address and port of a node in the cluster.
21
-
22
- Args:
23
- host (str, optional): The server host. Defaults to "localhost".
24
- port (int, optional): The server port. Defaults to 6379.
25
- """
26
- self.host = host
27
- self.port = port
28
-
29
-
30
- class ReadFrom(Enum):
31
- """
32
- Represents the client's read from strategy.
33
- """
34
-
35
- PRIMARY = ProtobufReadFrom.Primary
36
- """
37
- Always get from primary, in order to get the freshest data.
38
- """
39
- PREFER_REPLICA = ProtobufReadFrom.PreferReplica
40
- """
41
- Spread the requests between all replicas in a round robin manner.
42
- If no replica is available, route the requests to the primary.
43
- """
44
- AZ_AFFINITY = ProtobufReadFrom.AZAffinity
45
- """
46
- Spread the read requests between replicas in the same client's AZ (Aviliablity zone) in a round robin manner,
47
- falling back to other replicas or the primary if needed
48
- """
49
-
50
-
51
- class ProtocolVersion(Enum):
52
- """
53
- Represents the communication protocol with the server.
54
- """
55
-
56
- RESP2 = SentProtocolVersion.RESP2
57
- """
58
- Communicate using RESP2.
59
- """
60
- RESP3 = SentProtocolVersion.RESP3
61
- """
62
- Communicate using RESP3.
63
- """
64
-
65
-
66
- class BackoffStrategy:
67
- def __init__(self, num_of_retries: int, factor: int, exponent_base: int):
68
- """
69
- Represents the strategy used to determine how and when to reconnect, in case of connection failures.
70
- The time between attempts grows exponentially, to the formula rand(0 .. factor * (exponentBase ^ N)), where N
71
- is the number of failed attempts.
72
- Once the maximum value is reached, that will remain the time between retry attempts until a reconnect attempt is succesful.
73
- The client will attempt to reconnect indefinitely.
74
-
75
- Args:
76
- num_of_retries (int): Number of retry attempts that the client should perform when disconnected from the server,
77
- where the time between retries increases. Once the retries have reached the maximum value, the time between
78
- retries will remain constant until a reconnect attempt is succesful.
79
- factor (int): The multiplier that will be applied to the waiting time between each retry.
80
- exponent_base (int): The exponent base configured for the strategy.
81
- """
82
- self.num_of_retries = num_of_retries
83
- self.factor = factor
84
- self.exponent_base = exponent_base
85
-
86
-
87
- class ServerCredentials:
88
- def __init__(
89
- self,
90
- password: str,
91
- username: Optional[str] = None,
92
- ):
93
- """
94
- Represents the credentials for connecting to a server.
95
-
96
- Args:
97
- password (str): The password that will be used for authenticating connections to the servers.
98
- username (Optional[str]): The username that will be used for authenticating connections to the servers.
99
- If not supplied, "default" will be used.
100
- """
101
- self.password = password
102
- self.username = username
103
-
104
-
105
- class PeriodicChecksManualInterval:
106
- def __init__(self, duration_in_sec: int) -> None:
107
- """
108
- Represents a manually configured interval for periodic checks.
109
-
110
- Args:
111
- duration_in_sec (int): The duration in seconds for the interval between periodic checks.
112
- """
113
- self.duration_in_sec = duration_in_sec
114
-
115
-
116
- class PeriodicChecksStatus(Enum):
117
- """
118
- Represents the cluster's periodic checks status.
119
- To configure specific interval, see PeriodicChecksManualInterval.
120
- """
121
-
122
- ENABLED_DEFAULT_CONFIGS = 0
123
- """
124
- Enables the periodic checks with the default configurations.
125
- """
126
- DISABLED = 1
127
- """
128
- Disables the periodic checks.
129
- """
130
-
131
-
132
- class BaseClientConfiguration:
133
- def __init__(
134
- self,
135
- addresses: List[NodeAddress],
136
- use_tls: bool = False,
137
- credentials: Optional[ServerCredentials] = None,
138
- read_from: ReadFrom = ReadFrom.PRIMARY,
139
- request_timeout: Optional[int] = None,
140
- client_name: Optional[str] = None,
141
- protocol: ProtocolVersion = ProtocolVersion.RESP3,
142
- inflight_requests_limit: Optional[int] = None,
143
- client_az: Optional[str] = None,
144
- ):
145
- """
146
- Represents the configuration settings for a Glide client.
147
-
148
- Args:
149
- addresses (List[NodeAddress]): DNS Addresses and ports of known nodes in the cluster.
150
- If the server is in cluster mode the list can be partial, as the client will attempt to map out
151
- the cluster and find all nodes.
152
- If the server is in standalone mode, only nodes whose addresses were provided will be used by the
153
- client.
154
- For example:
155
- [
156
- {address:sample-address-0001.use1.cache.amazonaws.com, port:6379},
157
- {address: sample-address-0002.use2.cache.amazonaws.com, port:6379}
158
- ].
159
- use_tls (bool): True if communication with the cluster should use Transport Level Security.
160
- Should match the TLS configuration of the server/cluster, otherwise the connection attempt will fail
161
- credentials (ServerCredentials): Credentials for authentication process.
162
- If none are set, the client will not authenticate itself with the server.
163
- read_from (ReadFrom): If not set, `PRIMARY` will be used.
164
- request_timeout (Optional[int]): The duration in milliseconds that the client should wait for a request to complete.
165
- This duration encompasses sending the request, awaiting for a response from the server, and any required reconnections or retries.
166
- If the specified timeout is exceeded for a pending request, it will result in a timeout error. If not set, a default value will be used.
167
- client_name (Optional[str]): Client name to be used for the client. Will be used with CLIENT SETNAME command during connection establishment.
168
- inflight_requests_limit (Optional[int]): The maximum number of concurrent requests allowed to be in-flight (sent but not yet completed).
169
- This limit is used to control the memory usage and prevent the client from overwhelming the server or getting stuck in case of a queue backlog.
170
- If not set, a default value will be used.
171
-
172
- """
173
- self.addresses = addresses
174
- self.use_tls = use_tls
175
- self.credentials = credentials
176
- self.read_from = read_from
177
- self.request_timeout = request_timeout
178
- self.client_name = client_name
179
- self.protocol = protocol
180
- self.inflight_requests_limit = inflight_requests_limit
181
- self.client_az = client_az
182
-
183
- if read_from == ReadFrom.AZ_AFFINITY and not client_az:
184
- raise ValueError(
185
- "client_az mus t be set when read_from is set to AZ_AFFINITY"
186
- )
187
-
188
- def _create_a_protobuf_conn_request(
189
- self, cluster_mode: bool = False
190
- ) -> ConnectionRequest:
191
- """
192
- Generates a Protobuf ConnectionRequest using the values from this ClientConfiguration.
193
-
194
- Args:
195
- cluster_mode (bool, optional): The cluster mode of the client. Defaults to False.
196
-
197
- Returns:
198
- ConnectionRequest: Protobuf ConnectionRequest.
199
- """
200
- request = ConnectionRequest()
201
- for address in self.addresses:
202
- address_info = request.addresses.add()
203
- address_info.host = address.host
204
- address_info.port = address.port
205
- request.tls_mode = TlsMode.SecureTls if self.use_tls else TlsMode.NoTls
206
- request.read_from = self.read_from.value
207
- if self.request_timeout:
208
- request.request_timeout = self.request_timeout
209
- request.cluster_mode_enabled = True if cluster_mode else False
210
- if self.credentials:
211
- if self.credentials.username:
212
- request.authentication_info.username = self.credentials.username
213
- request.authentication_info.password = self.credentials.password
214
- if self.client_name:
215
- request.client_name = self.client_name
216
- request.protocol = self.protocol.value
217
- if self.inflight_requests_limit:
218
- request.inflight_requests_limit = self.inflight_requests_limit
219
- if self.client_az:
220
- request.client_az = self.client_az
221
-
222
- return request
223
-
224
- def _is_pubsub_configured(self) -> bool:
225
- return False
226
-
227
- def _get_pubsub_callback_and_context(
228
- self,
229
- ) -> Tuple[Optional[Callable[[CoreCommands.PubSubMsg, Any], None]], Any]:
230
- return None, None
231
-
232
-
233
- class GlideClientConfiguration(BaseClientConfiguration):
234
- """
235
- Represents the configuration settings for a Standalone Glide client.
236
-
237
- Args:
238
- addresses (List[NodeAddress]): DNS Addresses and ports of known nodes in the cluster.
239
- Only nodes whose addresses were provided will be used by the client.
240
- For example:
241
- [
242
- {address:sample-address-0001.use1.cache.amazonaws.com, port:6379},
243
- {address: sample-address-0002.use2.cache.amazonaws.com, port:6379}
244
- ].
245
- use_tls (bool): True if communication with the cluster should use Transport Level Security.
246
- credentials (ServerCredentials): Credentials for authentication process.
247
- If none are set, the client will not authenticate itself with the server.
248
- read_from (ReadFrom): If not set, `PRIMARY` will be used.
249
- request_timeout (Optional[int]): The duration in milliseconds that the client should wait for a request to complete.
250
- This duration encompasses sending the request, awaiting for a response from the server, and any required reconnections or retries.
251
- If the specified timeout is exceeded for a pending request, it will result in a timeout error.
252
- If not set, a default value will be used.
253
- reconnect_strategy (Optional[BackoffStrategy]): Strategy used to determine how and when to reconnect, in case of
254
- connection failures.
255
- If not set, a default backoff strategy will be used.
256
- database_id (Optional[int]): index of the logical database to connect to.
257
- client_name (Optional[str]): Client name to be used for the client. Will be used with CLIENT SETNAME command during connection establishment.
258
- protocol (ProtocolVersion): The version of the RESP protocol to communicate with the server.
259
- pubsub_subscriptions (Optional[GlideClientConfiguration.PubSubSubscriptions]): Pubsub subscriptions to be used for the client.
260
- Will be applied via SUBSCRIBE/PSUBSCRIBE commands during connection establishment.
261
- inflight_requests_limit (Optional[int]): The maximum number of concurrent requests allowed to be in-flight (sent but not yet completed).
262
- This limit is used to control the memory usage and prevent the client from overwhelming the server or getting stuck in case of a queue backlog.
263
- If not set, a default value will be used.
264
-
265
- """
266
-
267
- class PubSubChannelModes(IntEnum):
268
- """
269
- Describes pubsub subsciption modes.
270
- See https://valkey.io/docs/topics/pubsub/ for more details
271
- """
272
-
273
- Exact = 0
274
- """ Use exact channel names """
275
- Pattern = 1
276
- """ Use channel name patterns """
277
-
278
- @dataclass
279
- class PubSubSubscriptions:
280
- """Describes pubsub configuration for standalone mode client.
281
-
282
- Attributes:
283
- channels_and_patterns (Dict[GlideClientConfiguration.PubSubChannelModes, Set[str]]):
284
- Channels and patterns by modes.
285
- callback (Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]):
286
- Optional callback to accept the incomming messages.
287
- context (Any):
288
- Arbitrary context to pass to the callback.
289
- """
290
-
291
- channels_and_patterns: Dict[
292
- GlideClientConfiguration.PubSubChannelModes, Set[str]
293
- ]
294
- callback: Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]
295
- context: Any
296
-
297
- def __init__(
298
- self,
299
- addresses: List[NodeAddress],
300
- use_tls: bool = False,
301
- credentials: Optional[ServerCredentials] = None,
302
- read_from: ReadFrom = ReadFrom.PRIMARY,
303
- request_timeout: Optional[int] = None,
304
- reconnect_strategy: Optional[BackoffStrategy] = None,
305
- database_id: Optional[int] = None,
306
- client_name: Optional[str] = None,
307
- protocol: ProtocolVersion = ProtocolVersion.RESP3,
308
- pubsub_subscriptions: Optional[PubSubSubscriptions] = None,
309
- inflight_requests_limit: Optional[int] = None,
310
- client_az: Optional[str] = None,
311
- ):
312
- super().__init__(
313
- addresses=addresses,
314
- use_tls=use_tls,
315
- credentials=credentials,
316
- read_from=read_from,
317
- request_timeout=request_timeout,
318
- client_name=client_name,
319
- protocol=protocol,
320
- inflight_requests_limit=inflight_requests_limit,
321
- client_az=client_az,
322
- )
323
- self.reconnect_strategy = reconnect_strategy
324
- self.database_id = database_id
325
- self.pubsub_subscriptions = pubsub_subscriptions
326
-
327
- def _create_a_protobuf_conn_request(
328
- self, cluster_mode: bool = False
329
- ) -> ConnectionRequest:
330
- assert cluster_mode is False
331
- request = super()._create_a_protobuf_conn_request(cluster_mode)
332
- if self.reconnect_strategy:
333
- request.connection_retry_strategy.number_of_retries = (
334
- self.reconnect_strategy.num_of_retries
335
- )
336
- request.connection_retry_strategy.factor = self.reconnect_strategy.factor
337
- request.connection_retry_strategy.exponent_base = (
338
- self.reconnect_strategy.exponent_base
339
- )
340
- if self.database_id:
341
- request.database_id = self.database_id
342
-
343
- if self.pubsub_subscriptions:
344
- if self.protocol == ProtocolVersion.RESP2:
345
- raise ConfigurationError(
346
- "PubSub subscriptions require RESP3 protocol, but RESP2 was configured."
347
- )
348
- if (
349
- self.pubsub_subscriptions.context is not None
350
- and not self.pubsub_subscriptions.callback
351
- ):
352
- raise ConfigurationError(
353
- "PubSub subscriptions with a context require a callback function to be configured."
354
- )
355
- for (
356
- channel_type,
357
- channels_patterns,
358
- ) in self.pubsub_subscriptions.channels_and_patterns.items():
359
- entry = request.pubsub_subscriptions.channels_or_patterns_by_type[
360
- int(channel_type)
361
- ]
362
- for channel_pattern in channels_patterns:
363
- entry.channels_or_patterns.append(str.encode(channel_pattern))
364
-
365
- return request
366
-
367
- def _is_pubsub_configured(self) -> bool:
368
- return self.pubsub_subscriptions is not None
369
-
370
- def _get_pubsub_callback_and_context(
371
- self,
372
- ) -> Tuple[Optional[Callable[[CoreCommands.PubSubMsg, Any], None]], Any]:
373
- if self.pubsub_subscriptions:
374
- return self.pubsub_subscriptions.callback, self.pubsub_subscriptions.context
375
- return None, None
376
-
377
-
378
- class GlideClusterClientConfiguration(BaseClientConfiguration):
379
- """
380
- Represents the configuration settings for a Cluster Glide client.
381
-
382
- Args:
383
- addresses (List[NodeAddress]): DNS Addresses and ports of known nodes in the cluster.
384
- The list can be partial, as the client will attempt to map out the cluster and find all nodes.
385
- For example:
386
- [
387
- {address:configuration-endpoint.use1.cache.amazonaws.com, port:6379}
388
- ].
389
- use_tls (bool): True if communication with the cluster should use Transport Level Security.
390
- credentials (ServerCredentials): Credentials for authentication process.
391
- If none are set, the client will not authenticate itself with the server.
392
- read_from (ReadFrom): If not set, `PRIMARY` will be used.
393
- request_timeout (Optional[int]): The duration in milliseconds that the client should wait for a request to complete.
394
- This duration encompasses sending the request, awaiting for a response from the server, and any required reconnections or retries.
395
- If the specified timeout is exceeded for a pending request, it will result in a timeout error. If not set, a default value will be used.
396
- client_name (Optional[str]): Client name to be used for the client. Will be used with CLIENT SETNAME command during connection establishment.
397
- protocol (ProtocolVersion): The version of the RESP protocol to communicate with the server.
398
- periodic_checks (Union[PeriodicChecksStatus, PeriodicChecksManualInterval]): Configure the periodic topology checks.
399
- These checks evaluate changes in the cluster's topology, triggering a slot refresh when detected.
400
- Periodic checks ensure a quick and efficient process by querying a limited number of nodes.
401
- Defaults to PeriodicChecksStatus.ENABLED_DEFAULT_CONFIGS.
402
- pubsub_subscriptions (Optional[GlideClusterClientConfiguration.PubSubSubscriptions]): Pubsub subscriptions to be used for the client.
403
- Will be applied via SUBSCRIBE/PSUBSCRIBE/SSUBSCRIBE commands during connection establishment.
404
- inflight_requests_limit (Optional[int]): The maximum number of concurrent requests allowed to be in-flight (sent but not yet completed).
405
- This limit is used to control the memory usage and prevent the client from overwhelming the server or getting stuck in case of a queue backlog.
406
- If not set, a default value will be used.
407
-
408
-
409
-
410
- Notes:
411
- Currently, the reconnection strategy in cluster mode is not configurable, and exponential backoff
412
- with fixed values is used.
413
- """
414
-
415
- class PubSubChannelModes(IntEnum):
416
- """
417
- Describes pubsub subsciption modes.
418
- See https://valkey.io/docs/topics/pubsub/ for more details
419
- """
420
-
421
- Exact = 0
422
- """ Use exact channel names """
423
- Pattern = 1
424
- """ Use channel name patterns """
425
- Sharded = 2
426
- """ Use sharded pubsub. Available since Valkey version 7.0. """
427
-
428
- @dataclass
429
- class PubSubSubscriptions:
430
- """Describes pubsub configuration for cluster mode client.
431
-
432
- Attributes:
433
- channels_and_patterns (Dict[GlideClusterClientConfiguration.PubSubChannelModes, Set[str]]):
434
- Channels and patterns by modes.
435
- callback (Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]):
436
- Optional callback to accept the incoming messages.
437
- context (Any):
438
- Arbitrary context to pass to the callback.
439
- """
440
-
441
- channels_and_patterns: Dict[
442
- GlideClusterClientConfiguration.PubSubChannelModes, Set[str]
443
- ]
444
- callback: Optional[Callable[[CoreCommands.PubSubMsg, Any], None]]
445
- context: Any
446
-
447
- def __init__(
448
- self,
449
- addresses: List[NodeAddress],
450
- use_tls: bool = False,
451
- credentials: Optional[ServerCredentials] = None,
452
- read_from: ReadFrom = ReadFrom.PRIMARY,
453
- request_timeout: Optional[int] = None,
454
- client_name: Optional[str] = None,
455
- protocol: ProtocolVersion = ProtocolVersion.RESP3,
456
- periodic_checks: Union[
457
- PeriodicChecksStatus, PeriodicChecksManualInterval
458
- ] = PeriodicChecksStatus.ENABLED_DEFAULT_CONFIGS,
459
- pubsub_subscriptions: Optional[PubSubSubscriptions] = None,
460
- inflight_requests_limit: Optional[int] = None,
461
- client_az: Optional[str] = None,
462
- ):
463
- super().__init__(
464
- addresses=addresses,
465
- use_tls=use_tls,
466
- credentials=credentials,
467
- read_from=read_from,
468
- request_timeout=request_timeout,
469
- client_name=client_name,
470
- protocol=protocol,
471
- inflight_requests_limit=inflight_requests_limit,
472
- client_az=client_az,
473
- )
474
- self.periodic_checks = periodic_checks
475
- self.pubsub_subscriptions = pubsub_subscriptions
476
-
477
- def _create_a_protobuf_conn_request(
478
- self, cluster_mode: bool = False
479
- ) -> ConnectionRequest:
480
- assert cluster_mode is True
481
- request = super()._create_a_protobuf_conn_request(cluster_mode)
482
- if type(self.periodic_checks) is PeriodicChecksManualInterval:
483
- request.periodic_checks_manual_interval.duration_in_sec = (
484
- self.periodic_checks.duration_in_sec
485
- )
486
- elif self.periodic_checks == PeriodicChecksStatus.DISABLED:
487
- request.periodic_checks_disabled.SetInParent()
488
-
489
- if self.pubsub_subscriptions:
490
- if self.protocol == ProtocolVersion.RESP2:
491
- raise ConfigurationError(
492
- "PubSub subscriptions require RESP3 protocol, but RESP2 was configured."
493
- )
494
- if (
495
- self.pubsub_subscriptions.context is not None
496
- and not self.pubsub_subscriptions.callback
497
- ):
498
- raise ConfigurationError(
499
- "PubSub subscriptions with a context require a callback function to be configured."
500
- )
501
- for (
502
- channel_type,
503
- channels_patterns,
504
- ) in self.pubsub_subscriptions.channels_and_patterns.items():
505
- entry = request.pubsub_subscriptions.channels_or_patterns_by_type[
506
- int(channel_type)
507
- ]
508
- for channel_pattern in channels_patterns:
509
- entry.channels_or_patterns.append(str.encode(channel_pattern))
510
-
511
- return request
512
-
513
- def _is_pubsub_configured(self) -> bool:
514
- return self.pubsub_subscriptions is not None
515
-
516
- def _get_pubsub_callback_and_context(
517
- self,
518
- ) -> Tuple[Optional[Callable[[CoreCommands.PubSubMsg, Any], None]], Any]:
519
- if self.pubsub_subscriptions:
520
- return self.pubsub_subscriptions.callback, self.pubsub_subscriptions.context
521
- return None, None
@@ -1,54 +0,0 @@
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\"9\n\x0bTransaction\x12*\n\x08\x63ommands\x18\x01 \x03(\x0b\x32\x18.command_request.Command\"\x93\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\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\"\xda\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\x33\n\x0btransaction\x18\x03 \x01(\x0b\x32\x1c.command_request.TransactionH\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.RoutesB\t\n\x07\x63ommand*:\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*\xc7/\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\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=1658
25
- _globals['_SIMPLEROUTES']._serialized_end=1716
26
- _globals['_SLOTTYPES']._serialized_start=1718
27
- _globals['_SLOTTYPES']._serialized_end=1755
28
- _globals['_REQUESTTYPE']._serialized_start=1758
29
- _globals['_REQUESTTYPE']._serialized_end=7845
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['_TRANSACTION']._serialized_start=884
47
- _globals['_TRANSACTION']._serialized_end=941
48
- _globals['_CLUSTERSCAN']._serialized_start=944
49
- _globals['_CLUSTERSCAN']._serialized_end=1091
50
- _globals['_UPDATECONNECTIONPASSWORD']._serialized_start=1093
51
- _globals['_UPDATECONNECTIONPASSWORD']._serialized_end=1179
52
- _globals['_COMMANDREQUEST']._serialized_start=1182
53
- _globals['_COMMANDREQUEST']._serialized_end=1656
54
- # @@protoc_insertion_point(module_scope)