valkey-rb 0.3.5
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.
- checksums.yaml +7 -0
- data/.rubocop.yml +43 -0
- data/.rubocop_todo.yml +22 -0
- data/README.md +34 -0
- data/Rakefile +23 -0
- data/lib/valkey/bindings.rb +173 -0
- data/lib/valkey/commands/bitmap_commands.rb +86 -0
- data/lib/valkey/commands/cluster_commands.rb +259 -0
- data/lib/valkey/commands/connection_commands.rb +318 -0
- data/lib/valkey/commands/function_commands.rb +255 -0
- data/lib/valkey/commands/generic_commands.rb +454 -0
- data/lib/valkey/commands/geo_commands.rb +87 -0
- data/lib/valkey/commands/hash_commands.rb +586 -0
- data/lib/valkey/commands/hyper_log_log_commands.rb +51 -0
- data/lib/valkey/commands/json_commands.rb +389 -0
- data/lib/valkey/commands/list_commands.rb +348 -0
- data/lib/valkey/commands/module_commands.rb +125 -0
- data/lib/valkey/commands/pubsub_commands.rb +237 -0
- data/lib/valkey/commands/scripting_commands.rb +217 -0
- data/lib/valkey/commands/server_commands.rb +961 -0
- data/lib/valkey/commands/set_commands.rb +220 -0
- data/lib/valkey/commands/sorted_set_commands.rb +756 -0
- data/lib/valkey/commands/stream_commands.rb +636 -0
- data/lib/valkey/commands/string_commands.rb +359 -0
- data/lib/valkey/commands/transaction_commands.rb +175 -0
- data/lib/valkey/commands/vector_search_commands.rb +271 -0
- data/lib/valkey/commands.rb +69 -0
- data/lib/valkey/errors.rb +41 -0
- data/lib/valkey/libglide_ffi.dylib +0 -0
- data/lib/valkey/libglide_ffi.so +0 -0
- data/lib/valkey/pipeline.rb +20 -0
- data/lib/valkey/protobuf/command_request_pb.rb +30 -0
- data/lib/valkey/protobuf/connection_request_pb.rb +28 -0
- data/lib/valkey/protobuf/response_pb.rb +18 -0
- data/lib/valkey/pubsub_callback.rb +10 -0
- data/lib/valkey/request_error_type.rb +10 -0
- data/lib/valkey/request_type.rb +436 -0
- data/lib/valkey/response_type.rb +20 -0
- data/lib/valkey/utils.rb +253 -0
- data/lib/valkey/version.rb +5 -0
- data/lib/valkey.rb +477 -0
- metadata +119 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Valkey
|
|
4
|
+
module Commands
|
|
5
|
+
# This module contains commands related to RediSearch Vector Search.
|
|
6
|
+
#
|
|
7
|
+
# RediSearch provides secondary indexing, full-text search, and vector similarity search
|
|
8
|
+
# capabilities on top of Redis/Valkey. These commands require the RediSearch module to be loaded.
|
|
9
|
+
#
|
|
10
|
+
# @see https://redis.io/docs/stack/search/
|
|
11
|
+
#
|
|
12
|
+
module VectorSearchCommands
|
|
13
|
+
# List all available indexes.
|
|
14
|
+
#
|
|
15
|
+
# @example List all indexes
|
|
16
|
+
# valkey.ft_list
|
|
17
|
+
# # => ["idx1", "idx2"]
|
|
18
|
+
#
|
|
19
|
+
# @return [Array<String>] array of index names
|
|
20
|
+
#
|
|
21
|
+
# @see https://redis.io/commands/ft._list/
|
|
22
|
+
def ft_list
|
|
23
|
+
send_command(RequestType::FT_LIST)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Run a search query with aggregations.
|
|
27
|
+
#
|
|
28
|
+
# @example Perform an aggregation query
|
|
29
|
+
# valkey.ft_aggregate("myIndex", "*", "GROUPBY", "1", "@category", "REDUCE", "COUNT", "0", "AS", "count")
|
|
30
|
+
# # => [[1, ["category", "electronics", "count", "5"]]]
|
|
31
|
+
#
|
|
32
|
+
# @param [String] index the index name to search
|
|
33
|
+
# @param [String] query the search query
|
|
34
|
+
# @param [Array<String>] args additional query arguments (GROUPBY, REDUCE, etc.)
|
|
35
|
+
# @return [Array] aggregation results
|
|
36
|
+
#
|
|
37
|
+
# @see https://redis.io/commands/ft.aggregate/
|
|
38
|
+
def ft_aggregate(index, query, *args)
|
|
39
|
+
command_args = [index, query] + args
|
|
40
|
+
send_command(RequestType::FT_AGGREGATE, command_args)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Add an alias to an index.
|
|
44
|
+
#
|
|
45
|
+
# @example Add an alias to an index
|
|
46
|
+
# valkey.ft_alias_add("myAlias", "myIndex")
|
|
47
|
+
# # => "OK"
|
|
48
|
+
#
|
|
49
|
+
# @param [String] alias the alias name
|
|
50
|
+
# @param [String] index the index name
|
|
51
|
+
# @return [String] "OK" on success
|
|
52
|
+
#
|
|
53
|
+
# @see https://redis.io/commands/ft.aliasadd/
|
|
54
|
+
def ft_alias_add(alias_name, index)
|
|
55
|
+
send_command(RequestType::FT_ALIAS_ADD, [alias_name, index])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Delete an alias from an index.
|
|
59
|
+
#
|
|
60
|
+
# @example Delete an alias
|
|
61
|
+
# valkey.ft_alias_del("myAlias")
|
|
62
|
+
# # => "OK"
|
|
63
|
+
#
|
|
64
|
+
# @param [String] alias the alias name to delete
|
|
65
|
+
# @return [String] "OK" on success
|
|
66
|
+
#
|
|
67
|
+
# @see https://redis.io/commands/ft.aliasdel/
|
|
68
|
+
def ft_alias_del(alias_name)
|
|
69
|
+
send_command(RequestType::FT_ALIAS_DEL, [alias_name])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# List all existing aliases.
|
|
73
|
+
#
|
|
74
|
+
# @example List all aliases
|
|
75
|
+
# valkey.ft_alias_list
|
|
76
|
+
# # => ["alias1", "alias2"]
|
|
77
|
+
#
|
|
78
|
+
# @return [Array<String>] array of alias names
|
|
79
|
+
#
|
|
80
|
+
# @see https://redis.io/commands/ft.aliaslist/
|
|
81
|
+
def ft_alias_list
|
|
82
|
+
send_command(RequestType::FT_ALIAS_LIST)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Update an alias to point to a different index.
|
|
86
|
+
#
|
|
87
|
+
# @example Update an alias
|
|
88
|
+
# valkey.ft_alias_update("myAlias", "newIndex")
|
|
89
|
+
# # => "OK"
|
|
90
|
+
#
|
|
91
|
+
# @param [String] alias the alias name
|
|
92
|
+
# @param [String] index the new index name
|
|
93
|
+
# @return [String] "OK" on success
|
|
94
|
+
#
|
|
95
|
+
# @see https://redis.io/commands/ft.aliasupdate/
|
|
96
|
+
def ft_alias_update(alias_name, index)
|
|
97
|
+
send_command(RequestType::FT_ALIAS_UPDATE, [alias_name, index])
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Create a search index with the given schema.
|
|
101
|
+
#
|
|
102
|
+
# @example Create a basic index
|
|
103
|
+
# valkey.ft_create("myIndex", "SCHEMA", "title", "TEXT", "price", "NUMERIC")
|
|
104
|
+
# # => "OK"
|
|
105
|
+
#
|
|
106
|
+
# @example Create an index with vector field
|
|
107
|
+
# valkey.ft_create("vecIndex", "ON", "HASH", "PREFIX", "1", "doc:",
|
|
108
|
+
# "SCHEMA", "embedding", "VECTOR", "HNSW", "6",
|
|
109
|
+
# "TYPE", "FLOAT32", "DIM", "128", "DISTANCE_METRIC", "COSINE")
|
|
110
|
+
# # => "OK"
|
|
111
|
+
#
|
|
112
|
+
# @param [String] index the index name
|
|
113
|
+
# @param [Array<String>] args schema definition and options
|
|
114
|
+
# @return [String] "OK" on success
|
|
115
|
+
#
|
|
116
|
+
# @see https://redis.io/commands/ft.create/
|
|
117
|
+
def ft_create(index, *args)
|
|
118
|
+
command_args = [index] + args
|
|
119
|
+
send_command(RequestType::FT_CREATE, command_args)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Drop an index and optionally delete all documents.
|
|
123
|
+
#
|
|
124
|
+
# @example Drop an index without deleting documents
|
|
125
|
+
# valkey.ft_drop_index("myIndex")
|
|
126
|
+
# # => "OK"
|
|
127
|
+
#
|
|
128
|
+
# @example Drop an index and delete all documents
|
|
129
|
+
# valkey.ft_drop_index("myIndex", dd: true)
|
|
130
|
+
# # => "OK"
|
|
131
|
+
#
|
|
132
|
+
# @param [String] index the index name
|
|
133
|
+
# @param [Boolean] dd whether to delete documents (DD flag)
|
|
134
|
+
# @return [String] "OK" on success
|
|
135
|
+
#
|
|
136
|
+
# @see https://redis.io/commands/ft.dropindex/
|
|
137
|
+
def ft_drop_index(index, dd: false)
|
|
138
|
+
args = [index]
|
|
139
|
+
args << "DD" if dd
|
|
140
|
+
send_command(RequestType::FT_DROP_INDEX, args)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Explain how a query is parsed and executed.
|
|
144
|
+
#
|
|
145
|
+
# @example Explain a query
|
|
146
|
+
# valkey.ft_explain("myIndex", "@title:hello @price:[0 100]")
|
|
147
|
+
# # => "INTERSECT {\n @title:hello\n @price:[0 100]\n}\n"
|
|
148
|
+
#
|
|
149
|
+
# @param [String] index the index name
|
|
150
|
+
# @param [String] query the search query
|
|
151
|
+
# @param [Array<String>] args additional query arguments
|
|
152
|
+
# @return [String] query execution plan
|
|
153
|
+
#
|
|
154
|
+
# @see https://redis.io/commands/ft.explain/
|
|
155
|
+
def ft_explain(index, query, *args)
|
|
156
|
+
command_args = [index, query] + args
|
|
157
|
+
send_command(RequestType::FT_EXPLAIN, command_args)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Explain how a query is parsed and executed (CLI-formatted output).
|
|
161
|
+
#
|
|
162
|
+
# @example Explain a query in CLI format
|
|
163
|
+
# valkey.ft_explain_cli("myIndex", "@title:hello")
|
|
164
|
+
# # => formatted query plan
|
|
165
|
+
#
|
|
166
|
+
# @param [String] index the index name
|
|
167
|
+
# @param [String] query the search query
|
|
168
|
+
# @param [Array<String>] args additional query arguments
|
|
169
|
+
# @return [String] formatted query execution plan
|
|
170
|
+
#
|
|
171
|
+
# @see https://redis.io/commands/ft.explaincli/
|
|
172
|
+
def ft_explain_cli(index, query, *args)
|
|
173
|
+
command_args = [index, query] + args
|
|
174
|
+
send_command(RequestType::FT_EXPLAIN_CLI, command_args)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Get information about an index.
|
|
178
|
+
#
|
|
179
|
+
# @example Get index info
|
|
180
|
+
# valkey.ft_info("myIndex")
|
|
181
|
+
# # => ["index_name", "myIndex", "fields", [...], ...]
|
|
182
|
+
#
|
|
183
|
+
# @param [String] index the index name
|
|
184
|
+
# @return [Array] index information as array of key-value pairs
|
|
185
|
+
#
|
|
186
|
+
# @see https://redis.io/commands/ft.info/
|
|
187
|
+
def ft_info(index)
|
|
188
|
+
send_command(RequestType::FT_INFO, [index])
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Profile a search or aggregation query.
|
|
192
|
+
#
|
|
193
|
+
# @example Profile a search query
|
|
194
|
+
# valkey.ft_profile("myIndex", "SEARCH", "QUERY", "@title:hello")
|
|
195
|
+
# # => [execution time, results]
|
|
196
|
+
#
|
|
197
|
+
# @example Profile an aggregation query
|
|
198
|
+
# valkey.ft_profile("myIndex", "AGGREGATE", "QUERY", "*", "GROUPBY", "1", "@category")
|
|
199
|
+
# # => [execution time, results]
|
|
200
|
+
#
|
|
201
|
+
# @param [String] index the index name
|
|
202
|
+
# @param [String] query_type either "SEARCH" or "AGGREGATE"
|
|
203
|
+
# @param [Array<String>] args query arguments
|
|
204
|
+
# @return [Array] profiling results with execution time and query results
|
|
205
|
+
#
|
|
206
|
+
# @see https://redis.io/commands/ft.profile/
|
|
207
|
+
def ft_profile(index, query_type, *args)
|
|
208
|
+
command_args = [index, query_type] + args
|
|
209
|
+
send_command(RequestType::FT_PROFILE, command_args)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Search an index with a query.
|
|
213
|
+
#
|
|
214
|
+
# @example Basic search
|
|
215
|
+
# valkey.ft_search("myIndex", "hello world")
|
|
216
|
+
# # => [1, "doc1", ["title", "hello world"]]
|
|
217
|
+
#
|
|
218
|
+
# @example Search with options
|
|
219
|
+
# valkey.ft_search("myIndex", "@title:hello", "LIMIT", "0", "10", "RETURN", "2", "title", "price")
|
|
220
|
+
# # => [total_results, doc_id, [field1, value1, field2, value2], ...]
|
|
221
|
+
#
|
|
222
|
+
# @example Vector similarity search
|
|
223
|
+
# valkey.ft_search("vecIndex", "*=>[KNN 5 @embedding $vec]",
|
|
224
|
+
# "PARAMS", "2", "vec", vector_blob,
|
|
225
|
+
# "RETURN", "1", "__embedding_score",
|
|
226
|
+
# "DIALECT", "2")
|
|
227
|
+
# # => [results_count, doc_id, ["__embedding_score", "0.95"], ...]
|
|
228
|
+
#
|
|
229
|
+
# @param [String] index the index name
|
|
230
|
+
# @param [String] query the search query
|
|
231
|
+
# @param [Array<String>] args additional query arguments (LIMIT, RETURN, SORTBY, etc.)
|
|
232
|
+
# @return [Array] search results with total count and matching documents
|
|
233
|
+
#
|
|
234
|
+
# @see https://redis.io/commands/ft.search/
|
|
235
|
+
def ft_search(index, query, *args)
|
|
236
|
+
command_args = [index, query] + args
|
|
237
|
+
send_command(RequestType::FT_SEARCH, command_args)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Convenience method for FT.* commands.
|
|
241
|
+
#
|
|
242
|
+
# @example List indexes
|
|
243
|
+
# valkey.ft(:list)
|
|
244
|
+
# # => ["idx1", "idx2"]
|
|
245
|
+
#
|
|
246
|
+
# @example Create an index
|
|
247
|
+
# valkey.ft(:create, "myIndex", "SCHEMA", "title", "TEXT")
|
|
248
|
+
# # => "OK"
|
|
249
|
+
#
|
|
250
|
+
# @example Search an index
|
|
251
|
+
# valkey.ft(:search, "myIndex", "hello")
|
|
252
|
+
# # => [results]
|
|
253
|
+
#
|
|
254
|
+
# @param [String, Symbol] subcommand the subcommand (list, create, search, etc.)
|
|
255
|
+
# @param [Array] args arguments for the subcommand
|
|
256
|
+
# @param [Hash] options options for the subcommand
|
|
257
|
+
# @return [Object] depends on subcommand
|
|
258
|
+
def ft(subcommand, *args, **options)
|
|
259
|
+
subcommand = subcommand.to_s.downcase.gsub("-", "_")
|
|
260
|
+
|
|
261
|
+
if args.empty? && options.empty?
|
|
262
|
+
send("ft_#{subcommand}")
|
|
263
|
+
elsif options.empty?
|
|
264
|
+
send("ft_#{subcommand}", *args)
|
|
265
|
+
else
|
|
266
|
+
send("ft_#{subcommand}", *args, **options)
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "valkey/commands/string_commands"
|
|
4
|
+
require "valkey/commands/connection_commands"
|
|
5
|
+
require "valkey/commands/server_commands"
|
|
6
|
+
require "valkey/commands/generic_commands"
|
|
7
|
+
require "valkey/commands/bitmap_commands"
|
|
8
|
+
require "valkey/commands/list_commands"
|
|
9
|
+
require "valkey/commands/geo_commands"
|
|
10
|
+
require "valkey/commands/hyper_log_log_commands"
|
|
11
|
+
require "valkey/commands/sorted_set_commands"
|
|
12
|
+
require "valkey/commands/set_commands"
|
|
13
|
+
require "valkey/commands/scripting_commands"
|
|
14
|
+
require "valkey/commands/function_commands"
|
|
15
|
+
require "valkey/commands/module_commands"
|
|
16
|
+
require "valkey/commands/pubsub_commands"
|
|
17
|
+
require "valkey/commands/json_commands"
|
|
18
|
+
require "valkey/commands/cluster_commands"
|
|
19
|
+
require "valkey/commands/transaction_commands"
|
|
20
|
+
require "valkey/commands/vector_search_commands"
|
|
21
|
+
require "valkey/commands/stream_commands"
|
|
22
|
+
require "valkey/commands/hash_commands"
|
|
23
|
+
|
|
24
|
+
class Valkey
|
|
25
|
+
# Valkey commands module
|
|
26
|
+
#
|
|
27
|
+
# This module includes various command modules that provide methods
|
|
28
|
+
# for interacting with a Valkey server. Each command module corresponds to a
|
|
29
|
+
# specific set of commands that can be executed against the Valkey server.
|
|
30
|
+
#
|
|
31
|
+
# The commands are organized into groups based on their functionality,
|
|
32
|
+
# such as string operations, connection management, server information,
|
|
33
|
+
# key management, and bitmap operations.
|
|
34
|
+
#
|
|
35
|
+
# @see https://valkey.io/commands/ Valkey Commands Documentation
|
|
36
|
+
#
|
|
37
|
+
module Commands
|
|
38
|
+
include StringCommands
|
|
39
|
+
include ConnectionCommands
|
|
40
|
+
include ServerCommands
|
|
41
|
+
include GenericCommands
|
|
42
|
+
include BitmapCommands
|
|
43
|
+
include ListCommands
|
|
44
|
+
include GeoCommands
|
|
45
|
+
include HyperLogLogCommands
|
|
46
|
+
include SortedSetCommands
|
|
47
|
+
include SetCommands
|
|
48
|
+
include ScriptingCommands
|
|
49
|
+
include FunctionCommands
|
|
50
|
+
include ModuleCommands
|
|
51
|
+
include PubSubCommands
|
|
52
|
+
include JsonCommands
|
|
53
|
+
include ClusterCommands
|
|
54
|
+
include TransactionCommands
|
|
55
|
+
include VectorSearchCommands
|
|
56
|
+
include StreamCommands
|
|
57
|
+
include HashCommands
|
|
58
|
+
|
|
59
|
+
# there are a few commands that are not implemented by design
|
|
60
|
+
#
|
|
61
|
+
# raises CommandError when called
|
|
62
|
+
#
|
|
63
|
+
%i[keys].each do |command|
|
|
64
|
+
define_method command do |*_args|
|
|
65
|
+
raise CommandError, "Unsupported command: #{command}"
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Valkey
|
|
4
|
+
class BaseError < StandardError; end
|
|
5
|
+
|
|
6
|
+
class ProtocolError < BaseError
|
|
7
|
+
def initialize(reply_type)
|
|
8
|
+
super(<<-MESSAGE.gsub(/(?:^|\n)\s*/, " "))
|
|
9
|
+
Got '#{reply_type}' as initial reply byte.
|
|
10
|
+
If you're in a forking environment, such as Unicorn, you need to
|
|
11
|
+
connect to Valkey after forking.
|
|
12
|
+
MESSAGE
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class CommandError < BaseError; end
|
|
17
|
+
|
|
18
|
+
class PermissionError < CommandError; end
|
|
19
|
+
|
|
20
|
+
class WrongTypeError < CommandError; end
|
|
21
|
+
|
|
22
|
+
class OutOfMemoryError < CommandError; end
|
|
23
|
+
|
|
24
|
+
class NoScriptError < CommandError; end
|
|
25
|
+
|
|
26
|
+
class BaseConnectionError < BaseError; end
|
|
27
|
+
|
|
28
|
+
class CannotConnectError < BaseConnectionError; end
|
|
29
|
+
|
|
30
|
+
class ConnectionError < BaseConnectionError; end
|
|
31
|
+
|
|
32
|
+
class TimeoutError < BaseConnectionError; end
|
|
33
|
+
|
|
34
|
+
class InheritedError < BaseConnectionError; end
|
|
35
|
+
|
|
36
|
+
class ReadOnlyError < BaseConnectionError; end
|
|
37
|
+
|
|
38
|
+
class InvalidClientOptionError < BaseError; end
|
|
39
|
+
|
|
40
|
+
class SubscriptionError < BaseError; end
|
|
41
|
+
end
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Valkey
|
|
4
|
+
class Pipeline
|
|
5
|
+
include Commands
|
|
6
|
+
|
|
7
|
+
attr_reader :commands
|
|
8
|
+
|
|
9
|
+
def initialize
|
|
10
|
+
@commands = []
|
|
11
|
+
# Keep transactional state consistent with the main client so that
|
|
12
|
+
# helpers like `multi`/`exec` can safely consult `@in_multi`.
|
|
13
|
+
@in_multi = false
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def send_command(command_type, command_args = [], &block)
|
|
17
|
+
@commands << [command_type, command_args, block]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: command_request.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
descriptor_data = "\n\x15\x63ommand_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\"\x11\n\x0fRefreshIamToken\"\xbb\x04\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\x11refresh_iam_token\x18\x08 \x01(\x0b\x32 .command_request.RefreshIamTokenH\x00\x12&\n\x05route\x18\t \x01(\x0b\x32\x17.command_request.Routes\x12\x1a\n\rroot_span_ptr\x18\n \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"
|
|
9
|
+
|
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
|
12
|
+
|
|
13
|
+
module CommandRequest
|
|
14
|
+
SlotIdRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.SlotIdRoute").msgclass
|
|
15
|
+
SlotKeyRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.SlotKeyRoute").msgclass
|
|
16
|
+
ByAddressRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.ByAddressRoute").msgclass
|
|
17
|
+
Routes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.Routes").msgclass
|
|
18
|
+
Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.Command").msgclass
|
|
19
|
+
Command::ArgsArray = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.Command.ArgsArray").msgclass
|
|
20
|
+
ScriptInvocationPointers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.ScriptInvocationPointers").msgclass
|
|
21
|
+
ScriptInvocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.ScriptInvocation").msgclass
|
|
22
|
+
Batch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.Batch").msgclass
|
|
23
|
+
ClusterScan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.ClusterScan").msgclass
|
|
24
|
+
UpdateConnectionPassword = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.UpdateConnectionPassword").msgclass
|
|
25
|
+
RefreshIamToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.RefreshIamToken").msgclass
|
|
26
|
+
CommandRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.CommandRequest").msgclass
|
|
27
|
+
SimpleRoutes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.SimpleRoutes").enummodule
|
|
28
|
+
SlotTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.SlotTypes").enummodule
|
|
29
|
+
RequestType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("command_request.RequestType").enummodule
|
|
30
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: connection_request.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
descriptor_data = "\n\x18\x63onnection_request.proto\x12\x12\x63onnection_request\")\n\x0bNodeAddress\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\"\x8e\x01\n\x12\x41uthenticationInfo\x12\x10\n\x08password\x18\x01 \x01(\t\x12\x10\n\x08username\x18\x02 \x01(\t\x12@\n\x0fiam_credentials\x18\x03 \x01(\x0b\x32\".connection_request.IamCredentialsH\x00\x88\x01\x01\x42\x12\n\x10_iam_credentials\"\xb1\x01\n\x0eIamCredentials\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x35\n\x0cservice_type\x18\x03 \x01(\x0e\x32\x1f.connection_request.ServiceType\x12%\n\x18refresh_interval_seconds\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_refresh_interval_seconds\"7\n\x1cPeriodicChecksManualInterval\x12\x17\n\x0f\x64uration_in_sec\x18\x01 \x01(\r\"\x18\n\x16PeriodicChecksDisabled\"8\n\x18PubSubChannelsOrPatterns\x12\x1c\n\x14\x63hannels_or_patterns\x18\x01 \x03(\x0c\"\xf1\x01\n\x13PubSubSubscriptions\x12k\n\x1c\x63hannels_or_patterns_by_type\x18\x01 \x03(\x0b\x32\x45.connection_request.PubSubSubscriptions.ChannelsOrPatternsByTypeEntry\x1am\n\x1d\x43hannelsOrPatternsByTypeEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.connection_request.PubSubChannelsOrPatterns:\x02\x38\x01\"\x94\x07\n\x11\x43onnectionRequest\x12\x32\n\taddresses\x18\x01 \x03(\x0b\x32\x1f.connection_request.NodeAddress\x12-\n\x08tls_mode\x18\x02 \x01(\x0e\x32\x1b.connection_request.TlsMode\x12\x1c\n\x14\x63luster_mode_enabled\x18\x03 \x01(\x08\x12\x17\n\x0frequest_timeout\x18\x04 \x01(\r\x12/\n\tread_from\x18\x05 \x01(\x0e\x32\x1c.connection_request.ReadFrom\x12N\n\x19\x63onnection_retry_strategy\x18\x06 \x01(\x0b\x32+.connection_request.ConnectionRetryStrategy\x12\x43\n\x13\x61uthentication_info\x18\x07 \x01(\x0b\x32&.connection_request.AuthenticationInfo\x12\x13\n\x0b\x64\x61tabase_id\x18\x08 \x01(\r\x12\x35\n\x08protocol\x18\t \x01(\x0e\x32#.connection_request.ProtocolVersion\x12\x13\n\x0b\x63lient_name\x18\n \x01(\t\x12[\n\x1fperiodic_checks_manual_interval\x18\x0b \x01(\x0b\x32\x30.connection_request.PeriodicChecksManualIntervalH\x00\x12N\n\x18periodic_checks_disabled\x18\x0c \x01(\x0b\x32*.connection_request.PeriodicChecksDisabledH\x00\x12\x45\n\x14pubsub_subscriptions\x18\r \x01(\x0b\x32\'.connection_request.PubSubSubscriptions\x12\x1f\n\x17inflight_requests_limit\x18\x0e \x01(\r\x12\x11\n\tclient_az\x18\x0f \x01(\t\x12\x1a\n\x12\x63onnection_timeout\x18\x10 \x01(\r\x12\x14\n\x0clazy_connect\x18\x11 \x01(\x08\x12+\n#refresh_topology_from_initial_nodes\x18\x12 \x01(\x08\x12\x10\n\x08lib_name\x18\x13 \x01(\t\x12\x12\n\nroot_certs\x18\x14 \x03(\x0c\x42\x11\n\x0fperiodic_checks\"\x8b\x01\n\x17\x43onnectionRetryStrategy\x12\x19\n\x11number_of_retries\x18\x01 \x01(\r\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\r\x12\x15\n\rexponent_base\x18\x03 \x01(\r\x12\x1b\n\x0ejitter_percent\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\x11\n\x0f_jitter_percent*o\n\x08ReadFrom\x12\x0b\n\x07Primary\x10\x00\x12\x11\n\rPreferReplica\x10\x01\x12\x11\n\rLowestLatency\x10\x02\x12\x0e\n\nAZAffinity\x10\x03\x12 \n\x1c\x41ZAffinityReplicasAndPrimary\x10\x04*4\n\x07TlsMode\x12\t\n\x05NoTls\x10\x00\x12\r\n\tSecureTls\x10\x01\x12\x0f\n\x0bInsecureTls\x10\x02*,\n\x0bServiceType\x12\x0f\n\x0b\x45LASTICACHE\x10\x00\x12\x0c\n\x08MEMORYDB\x10\x01*\'\n\x0fProtocolVersion\x12\t\n\x05RESP3\x10\x00\x12\t\n\x05RESP2\x10\x01*8\n\x11PubSubChannelType\x12\t\n\x05\x45xact\x10\x00\x12\x0b\n\x07Pattern\x10\x01\x12\x0b\n\x07Sharded\x10\x02\x62\x06proto3"
|
|
9
|
+
|
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
|
12
|
+
|
|
13
|
+
module ConnectionRequest
|
|
14
|
+
NodeAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.NodeAddress").msgclass
|
|
15
|
+
AuthenticationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.AuthenticationInfo").msgclass
|
|
16
|
+
IamCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.IamCredentials").msgclass
|
|
17
|
+
PeriodicChecksManualInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.PeriodicChecksManualInterval").msgclass
|
|
18
|
+
PeriodicChecksDisabled = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.PeriodicChecksDisabled").msgclass
|
|
19
|
+
PubSubChannelsOrPatterns = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.PubSubChannelsOrPatterns").msgclass
|
|
20
|
+
PubSubSubscriptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.PubSubSubscriptions").msgclass
|
|
21
|
+
ConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.ConnectionRequest").msgclass
|
|
22
|
+
ConnectionRetryStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.ConnectionRetryStrategy").msgclass
|
|
23
|
+
ReadFrom = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.ReadFrom").enummodule
|
|
24
|
+
TlsMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.TlsMode").enummodule
|
|
25
|
+
ServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.ServiceType").enummodule
|
|
26
|
+
ProtocolVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.ProtocolVersion").enummodule
|
|
27
|
+
PubSubChannelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("connection_request.PubSubChannelType").enummodule
|
|
28
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: response.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
descriptor_data = "\n\x0eresponse.proto\x12\x08response\"I\n\x0cRequestError\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.response.RequestErrorType\x12\x0f\n\x07message\x18\x02 \x01(\t\"\x83\x02\n\x08Response\x12\x14\n\x0c\x63\x61llback_idx\x18\x01 \x01(\r\x12\x16\n\x0cresp_pointer\x18\x02 \x01(\x04H\x00\x12\x37\n\x11\x63onstant_response\x18\x03 \x01(\x0e\x32\x1a.response.ConstantResponseH\x00\x12/\n\rrequest_error\x18\x04 \x01(\x0b\x32\x16.response.RequestErrorH\x00\x12\x17\n\rclosing_error\x18\x05 \x01(\tH\x00\x12\x0f\n\x07is_push\x18\x06 \x01(\x08\x12\x1a\n\rroot_span_ptr\x18\x07 \x01(\x04H\x01\x88\x01\x01\x42\x07\n\x05valueB\x10\n\x0e_root_span_ptr*O\n\x10RequestErrorType\x12\x0f\n\x0bUnspecified\x10\x00\x12\r\n\tExecAbort\x10\x01\x12\x0b\n\x07Timeout\x10\x02\x12\x0e\n\nDisconnect\x10\x03*\x1a\n\x10\x43onstantResponse\x12\x06\n\x02OK\x10\x00\x62\x06proto3"
|
|
9
|
+
|
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
|
12
|
+
|
|
13
|
+
module Response
|
|
14
|
+
RequestError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("response.RequestError").msgclass
|
|
15
|
+
Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("response.Response").msgclass
|
|
16
|
+
RequestErrorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("response.RequestErrorType").enummodule
|
|
17
|
+
ConstantResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("response.ConstantResponse").enummodule
|
|
18
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class Valkey
|
|
4
|
+
module PubSubCallback
|
|
5
|
+
def pubsub_callback(_client_ptr, kind, msg_ptr, msg_len, chan_ptr, chan_len, pat_ptr, pat_len)
|
|
6
|
+
puts "PubSub received kind=#{kind}, message=#{msg_ptr.read_string(msg_len)}"\
|
|
7
|
+
", channel=#{chan_ptr.read_string(chan_len)}, pattern=#{pat_ptr.read_string(pat_len)}"
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|