momento 0.2.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/.rubocop.yml +14 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +105 -0
- data/CONTRIBUTING.md +5 -6
- data/Gemfile +1 -6
- data/Gemfile.lock +34 -28
- data/README.md +64 -44
- data/README.template.md +30 -25
- data/examples/.gitignore +1 -0
- data/examples/Gemfile +1 -1
- data/examples/README.md +5 -6
- data/examples/compact.rb +13 -9
- data/examples/example.rb +24 -8
- data/examples/file.rb +7 -6
- data/lib/README-generating-pb.txt +1 -1
- data/lib/momento/auth/credential_provider.rb +78 -0
- data/lib/momento/cache_client.rb +478 -0
- data/lib/momento/collection_ttl.rb +79 -0
- data/lib/momento/config/configuration.rb +42 -0
- data/lib/momento/config/configurations.rb +24 -0
- data/lib/momento/config/transport/grpc_configuration.rb +35 -0
- data/lib/momento/config/transport/static_transport_strategy.rb +12 -0
- data/lib/momento/config/transport/transport_strategy.rb +16 -0
- data/lib/momento/error/types.rb +22 -0
- data/lib/momento/generated/README.md +16 -0
- data/lib/momento/generated/auth_pb.rb +52 -0
- data/lib/momento/generated/auth_services_pb.rb +27 -0
- data/lib/momento/generated/cacheclient_pb.rb +203 -0
- data/lib/momento/generated/cacheclient_services_pb.rb +90 -0
- data/lib/momento/generated/cacheping_pb.rb +38 -0
- data/lib/momento/generated/cacheping_services_pb.rb +23 -0
- data/lib/momento/generated/cachepubsub_pb.rb +48 -0
- data/lib/momento/generated/cachepubsub_services_pb.rb +56 -0
- data/lib/momento/generated/common_pb.rb +44 -0
- data/lib/momento/generated/controlclient_pb.rb +72 -0
- data/lib/momento/generated/controlclient_services_pb.rb +35 -0
- data/lib/momento/generated/extensions_pb.rb +35 -0
- data/lib/momento/generated/generate_protos.sh +47 -0
- data/lib/momento/generated/leaderboard_pb.rb +56 -0
- data/lib/momento/generated/leaderboard_services_pb.rb +57 -0
- data/lib/momento/generated/permissionmessages_pb.rb +48 -0
- data/lib/momento/generated/token_pb.rb +43 -0
- data/lib/momento/generated/token_services_pb.rb +23 -0
- data/lib/momento/generated/webhook_pb.rb +49 -0
- data/lib/momento/generated/webhook_services_pb.rb +32 -0
- data/lib/momento/response/control/create_cache_response.rb +61 -0
- data/lib/momento/{delete_cache_response_builder.rb → response/control/delete_cache_response.rb} +24 -3
- data/lib/momento/response/control/list_caches_response.rb +80 -0
- data/lib/momento/{delete_response_builder.rb → response/delete_response.rb} +24 -2
- data/lib/momento/{get_response.rb → response/get_response.rb} +39 -9
- data/lib/momento/{response.rb → response/response.rb} +11 -14
- data/lib/momento/response/set_response.rb +59 -0
- data/lib/momento/response/sort_order.rb +11 -0
- data/lib/momento/response/sorted_set/sorted_set_fetch_response.rb +107 -0
- data/lib/momento/response/sorted_set/sorted_set_put_element_response.rb +44 -0
- data/lib/momento/response/sorted_set/sorted_set_put_elements_response.rb +44 -0
- data/lib/momento/version.rb +1 -1
- data/lib/momento.rb +6 -1
- data/momento.gemspec +5 -3
- data/release-please-config.json +1 -1
- data/sig/momento/auth/credential_provider.rbs +11 -0
- data/sig/momento/cache_client.rbs +11 -0
- data/sig/momento/collection_ttl.rbs +22 -0
- data/sig/momento/config/configuration.rbs +13 -0
- data/sig/momento/config/configurations.rbs +9 -0
- data/sig/momento/config/transport/grpc_configuration.rbs +9 -0
- data/sig/momento/config/transport/transport_strategy.rbs +7 -0
- data/sig/momento/list_caches_response.rbs +7 -0
- data/sig/momento/sorted_set_fetch_response.rbs +13 -0
- data/sig/momento/sorted_set_put_element_response.rbs +5 -0
- data/sig/momento/sorted_set_put_elements_response.rbs +5 -0
- metadata +101 -40
- data/lib/momento/cacheclient_pb.rb +0 -334
- data/lib/momento/cacheclient_services_pb.rb +0 -44
- data/lib/momento/controlclient_pb.rb +0 -73
- data/lib/momento/controlclient_services_pb.rb +0 -31
- data/lib/momento/create_cache_response.rb +0 -37
- data/lib/momento/create_cache_response_builder.rb +0 -27
- data/lib/momento/delete_cache_response.rb +0 -24
- data/lib/momento/delete_response.rb +0 -24
- data/lib/momento/get_response_builder.rb +0 -37
- data/lib/momento/list_caches_response.rb +0 -77
- data/lib/momento/list_caches_response_builder.rb +0 -25
- data/lib/momento/set_response.rb +0 -39
- data/lib/momento/set_response_builder.rb +0 -25
- data/lib/momento/simple_cache_client.rb +0 -336
- /data/lib/momento/{response_builder.rb → response/response_builder.rb} +0 -0
@@ -1,334 +0,0 @@
|
|
1
|
-
# @private
|
2
|
-
|
3
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
-
# source: cacheclient.proto
|
5
|
-
|
6
|
-
require 'google/protobuf'
|
7
|
-
|
8
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
add_file("cacheclient.proto", :syntax => :proto3) do
|
10
|
-
add_message "cache_client._GetRequest" do
|
11
|
-
optional :cache_key, :bytes, 1
|
12
|
-
end
|
13
|
-
add_message "cache_client._GetResponse" do
|
14
|
-
optional :result, :enum, 1, "cache_client.ECacheResult"
|
15
|
-
optional :cache_body, :bytes, 2
|
16
|
-
optional :message, :string, 3
|
17
|
-
end
|
18
|
-
add_message "cache_client._DeleteRequest" do
|
19
|
-
optional :cache_key, :bytes, 1
|
20
|
-
end
|
21
|
-
add_message "cache_client._DeleteResponse" do
|
22
|
-
end
|
23
|
-
add_message "cache_client._SetRequest" do
|
24
|
-
optional :cache_key, :bytes, 1
|
25
|
-
optional :cache_body, :bytes, 2
|
26
|
-
optional :ttl_milliseconds, :uint64, 3
|
27
|
-
end
|
28
|
-
add_message "cache_client._SetResponse" do
|
29
|
-
optional :result, :enum, 1, "cache_client.ECacheResult"
|
30
|
-
optional :message, :string, 2
|
31
|
-
end
|
32
|
-
add_message "cache_client._DictionaryGetRequest" do
|
33
|
-
optional :dictionary_name, :bytes, 1
|
34
|
-
repeated :fields, :bytes, 2
|
35
|
-
end
|
36
|
-
add_message "cache_client._DictionaryGetResponse" do
|
37
|
-
oneof :dictionary do
|
38
|
-
optional :found, :message, 1, "cache_client._DictionaryGetResponse._Found"
|
39
|
-
optional :missing, :message, 2, "cache_client._DictionaryGetResponse._Missing"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
add_message "cache_client._DictionaryGetResponse._DictionaryGetResponsePart" do
|
43
|
-
optional :result, :enum, 1, "cache_client.ECacheResult"
|
44
|
-
optional :cache_body, :bytes, 2
|
45
|
-
end
|
46
|
-
add_message "cache_client._DictionaryGetResponse._Found" do
|
47
|
-
repeated :items, :message, 1, "cache_client._DictionaryGetResponse._DictionaryGetResponsePart"
|
48
|
-
end
|
49
|
-
add_message "cache_client._DictionaryGetResponse._Missing" do
|
50
|
-
end
|
51
|
-
add_message "cache_client._DictionaryFetchRequest" do
|
52
|
-
optional :dictionary_name, :bytes, 1
|
53
|
-
end
|
54
|
-
add_message "cache_client._DictionaryFieldValuePair" do
|
55
|
-
optional :field, :bytes, 1
|
56
|
-
optional :value, :bytes, 2
|
57
|
-
end
|
58
|
-
add_message "cache_client._DictionaryFetchResponse" do
|
59
|
-
oneof :dictionary do
|
60
|
-
optional :found, :message, 1, "cache_client._DictionaryFetchResponse._Found"
|
61
|
-
optional :missing, :message, 2, "cache_client._DictionaryFetchResponse._Missing"
|
62
|
-
end
|
63
|
-
end
|
64
|
-
add_message "cache_client._DictionaryFetchResponse._Found" do
|
65
|
-
repeated :items, :message, 1, "cache_client._DictionaryFieldValuePair"
|
66
|
-
end
|
67
|
-
add_message "cache_client._DictionaryFetchResponse._Missing" do
|
68
|
-
end
|
69
|
-
add_message "cache_client._DictionarySetRequest" do
|
70
|
-
optional :dictionary_name, :bytes, 1
|
71
|
-
repeated :items, :message, 2, "cache_client._DictionaryFieldValuePair"
|
72
|
-
optional :ttl_milliseconds, :uint64, 3
|
73
|
-
optional :refresh_ttl, :bool, 4
|
74
|
-
end
|
75
|
-
add_message "cache_client._DictionarySetResponse" do
|
76
|
-
end
|
77
|
-
add_message "cache_client._DictionaryIncrementRequest" do
|
78
|
-
optional :dictionary_name, :bytes, 1
|
79
|
-
optional :field, :bytes, 2
|
80
|
-
optional :amount, :int64, 3
|
81
|
-
optional :ttl_milliseconds, :uint64, 4
|
82
|
-
optional :refresh_ttl, :bool, 5
|
83
|
-
end
|
84
|
-
add_message "cache_client._DictionaryIncrementResponse" do
|
85
|
-
optional :value, :int64, 1
|
86
|
-
end
|
87
|
-
add_message "cache_client._DictionaryDeleteRequest" do
|
88
|
-
optional :dictionary_name, :bytes, 1
|
89
|
-
oneof :delete do
|
90
|
-
optional :some, :message, 2, "cache_client._DictionaryDeleteRequest.Some"
|
91
|
-
optional :all, :message, 3, "cache_client._DictionaryDeleteRequest.All"
|
92
|
-
end
|
93
|
-
end
|
94
|
-
add_message "cache_client._DictionaryDeleteRequest.Some" do
|
95
|
-
repeated :fields, :bytes, 1
|
96
|
-
end
|
97
|
-
add_message "cache_client._DictionaryDeleteRequest.All" do
|
98
|
-
end
|
99
|
-
add_message "cache_client._DictionaryDeleteResponse" do
|
100
|
-
end
|
101
|
-
add_message "cache_client._SetFetchRequest" do
|
102
|
-
optional :set_name, :bytes, 1
|
103
|
-
end
|
104
|
-
add_message "cache_client._SetFetchResponse" do
|
105
|
-
oneof :set do
|
106
|
-
optional :found, :message, 1, "cache_client._SetFetchResponse._Found"
|
107
|
-
optional :missing, :message, 2, "cache_client._SetFetchResponse._Missing"
|
108
|
-
end
|
109
|
-
end
|
110
|
-
add_message "cache_client._SetFetchResponse._Found" do
|
111
|
-
repeated :elements, :bytes, 1
|
112
|
-
end
|
113
|
-
add_message "cache_client._SetFetchResponse._Missing" do
|
114
|
-
end
|
115
|
-
add_message "cache_client._SetUnionRequest" do
|
116
|
-
optional :set_name, :bytes, 1
|
117
|
-
repeated :elements, :bytes, 2
|
118
|
-
optional :ttl_milliseconds, :uint64, 3
|
119
|
-
optional :refresh_ttl, :bool, 4
|
120
|
-
end
|
121
|
-
add_message "cache_client._SetUnionResponse" do
|
122
|
-
end
|
123
|
-
add_message "cache_client._SetDifferenceRequest" do
|
124
|
-
optional :set_name, :bytes, 1
|
125
|
-
oneof :difference do
|
126
|
-
optional :minuend, :message, 2, "cache_client._SetDifferenceRequest._Minuend"
|
127
|
-
optional :subtrahend, :message, 3, "cache_client._SetDifferenceRequest._Subtrahend"
|
128
|
-
end
|
129
|
-
end
|
130
|
-
add_message "cache_client._SetDifferenceRequest._Minuend" do
|
131
|
-
repeated :elements, :bytes, 1
|
132
|
-
end
|
133
|
-
add_message "cache_client._SetDifferenceRequest._Subtrahend" do
|
134
|
-
oneof :subtrahend_set do
|
135
|
-
optional :set, :message, 1, "cache_client._SetDifferenceRequest._Subtrahend._Set"
|
136
|
-
optional :identity, :message, 2, "cache_client._SetDifferenceRequest._Subtrahend._Identity"
|
137
|
-
end
|
138
|
-
end
|
139
|
-
add_message "cache_client._SetDifferenceRequest._Subtrahend._Set" do
|
140
|
-
repeated :elements, :bytes, 1
|
141
|
-
end
|
142
|
-
add_message "cache_client._SetDifferenceRequest._Subtrahend._Identity" do
|
143
|
-
end
|
144
|
-
add_message "cache_client._SetDifferenceResponse" do
|
145
|
-
oneof :set do
|
146
|
-
optional :found, :message, 1, "cache_client._SetDifferenceResponse._Found"
|
147
|
-
optional :missing, :message, 2, "cache_client._SetDifferenceResponse._Missing"
|
148
|
-
end
|
149
|
-
end
|
150
|
-
add_message "cache_client._SetDifferenceResponse._Found" do
|
151
|
-
end
|
152
|
-
add_message "cache_client._SetDifferenceResponse._Missing" do
|
153
|
-
end
|
154
|
-
add_message "cache_client._ListPushFrontRequest" do
|
155
|
-
optional :list_name, :bytes, 1
|
156
|
-
optional :value, :bytes, 2
|
157
|
-
optional :ttl_milliseconds, :uint64, 3
|
158
|
-
optional :refresh_ttl, :bool, 4
|
159
|
-
proto3_optional :truncate_back_to_size, :uint32, 5
|
160
|
-
end
|
161
|
-
add_message "cache_client._ListPushFrontResponse" do
|
162
|
-
optional :list_length, :uint32, 1
|
163
|
-
end
|
164
|
-
add_message "cache_client._ListPushBackRequest" do
|
165
|
-
optional :list_name, :bytes, 1
|
166
|
-
optional :value, :bytes, 2
|
167
|
-
optional :ttl_milliseconds, :uint64, 3
|
168
|
-
optional :refresh_ttl, :bool, 4
|
169
|
-
proto3_optional :truncate_front_to_size, :uint32, 5
|
170
|
-
end
|
171
|
-
add_message "cache_client._ListPushBackResponse" do
|
172
|
-
optional :list_length, :uint32, 1
|
173
|
-
end
|
174
|
-
add_message "cache_client._ListPopFrontRequest" do
|
175
|
-
optional :list_name, :bytes, 1
|
176
|
-
end
|
177
|
-
add_message "cache_client._ListPopFrontResponse" do
|
178
|
-
oneof :list do
|
179
|
-
optional :found, :message, 1, "cache_client._ListPopFrontResponse._Found"
|
180
|
-
optional :missing, :message, 2, "cache_client._ListPopFrontResponse._Missing"
|
181
|
-
end
|
182
|
-
end
|
183
|
-
add_message "cache_client._ListPopFrontResponse._Found" do
|
184
|
-
optional :front, :bytes, 1
|
185
|
-
end
|
186
|
-
add_message "cache_client._ListPopFrontResponse._Missing" do
|
187
|
-
end
|
188
|
-
add_message "cache_client._ListPopBackRequest" do
|
189
|
-
optional :list_name, :bytes, 1
|
190
|
-
end
|
191
|
-
add_message "cache_client._ListPopBackResponse" do
|
192
|
-
oneof :list do
|
193
|
-
optional :found, :message, 1, "cache_client._ListPopBackResponse._Found"
|
194
|
-
optional :missing, :message, 2, "cache_client._ListPopBackResponse._Missing"
|
195
|
-
end
|
196
|
-
end
|
197
|
-
add_message "cache_client._ListPopBackResponse._Found" do
|
198
|
-
optional :back, :bytes, 1
|
199
|
-
end
|
200
|
-
add_message "cache_client._ListPopBackResponse._Missing" do
|
201
|
-
end
|
202
|
-
add_message "cache_client._ListRange" do
|
203
|
-
optional :begin_index, :uint32, 1
|
204
|
-
optional :count, :uint32, 2
|
205
|
-
end
|
206
|
-
add_message "cache_client._ListEraseRequest" do
|
207
|
-
optional :list_name, :bytes, 1
|
208
|
-
oneof :erase do
|
209
|
-
optional :some, :message, 2, "cache_client._ListEraseRequest._ListRanges"
|
210
|
-
optional :all, :message, 3, "cache_client._ListEraseRequest._All"
|
211
|
-
end
|
212
|
-
end
|
213
|
-
add_message "cache_client._ListEraseRequest._All" do
|
214
|
-
end
|
215
|
-
add_message "cache_client._ListEraseRequest._ListRanges" do
|
216
|
-
repeated :ranges, :message, 1, "cache_client._ListRange"
|
217
|
-
end
|
218
|
-
add_message "cache_client._ListEraseResponse" do
|
219
|
-
end
|
220
|
-
add_message "cache_client._ListRemoveRequest" do
|
221
|
-
optional :list_name, :bytes, 1
|
222
|
-
oneof :remove do
|
223
|
-
optional :all_elements_with_value, :bytes, 2
|
224
|
-
end
|
225
|
-
end
|
226
|
-
add_message "cache_client._ListRemoveResponse" do
|
227
|
-
end
|
228
|
-
add_message "cache_client._ListFetchRequest" do
|
229
|
-
optional :list_name, :bytes, 1
|
230
|
-
end
|
231
|
-
add_message "cache_client._ListFetchResponse" do
|
232
|
-
oneof :list do
|
233
|
-
optional :found, :message, 1, "cache_client._ListFetchResponse._Found"
|
234
|
-
optional :missing, :message, 2, "cache_client._ListFetchResponse._Missing"
|
235
|
-
end
|
236
|
-
end
|
237
|
-
add_message "cache_client._ListFetchResponse._Found" do
|
238
|
-
repeated :values, :bytes, 1
|
239
|
-
end
|
240
|
-
add_message "cache_client._ListFetchResponse._Missing" do
|
241
|
-
end
|
242
|
-
add_message "cache_client._ListLengthRequest" do
|
243
|
-
optional :list_name, :bytes, 1
|
244
|
-
end
|
245
|
-
add_message "cache_client._ListLengthResponse" do
|
246
|
-
oneof :list do
|
247
|
-
optional :found, :message, 1, "cache_client._ListLengthResponse._Found"
|
248
|
-
optional :missing, :message, 2, "cache_client._ListLengthResponse._Missing"
|
249
|
-
end
|
250
|
-
end
|
251
|
-
add_message "cache_client._ListLengthResponse._Found" do
|
252
|
-
optional :length, :uint32, 1
|
253
|
-
end
|
254
|
-
add_message "cache_client._ListLengthResponse._Missing" do
|
255
|
-
end
|
256
|
-
add_enum "cache_client.ECacheResult" do
|
257
|
-
value :Invalid, 0
|
258
|
-
value :Ok, 1
|
259
|
-
value :Hit, 2
|
260
|
-
value :Miss, 3
|
261
|
-
end
|
262
|
-
end
|
263
|
-
end
|
264
|
-
|
265
|
-
module Momento
|
266
|
-
module CacheClient
|
267
|
-
GetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._GetRequest").msgclass
|
268
|
-
GetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._GetResponse").msgclass
|
269
|
-
DeleteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DeleteRequest").msgclass
|
270
|
-
DeleteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DeleteResponse").msgclass
|
271
|
-
SetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetRequest").msgclass
|
272
|
-
SetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetResponse").msgclass
|
273
|
-
DictionaryGetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryGetRequest").msgclass
|
274
|
-
DictionaryGetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryGetResponse").msgclass
|
275
|
-
DictionaryGetResponse::DictionaryGetResponsePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryGetResponse._DictionaryGetResponsePart").msgclass
|
276
|
-
DictionaryGetResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryGetResponse._Found").msgclass
|
277
|
-
DictionaryGetResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryGetResponse._Missing").msgclass
|
278
|
-
DictionaryFetchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryFetchRequest").msgclass
|
279
|
-
DictionaryFieldValuePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryFieldValuePair").msgclass
|
280
|
-
DictionaryFetchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryFetchResponse").msgclass
|
281
|
-
DictionaryFetchResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryFetchResponse._Found").msgclass
|
282
|
-
DictionaryFetchResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryFetchResponse._Missing").msgclass
|
283
|
-
DictionarySetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionarySetRequest").msgclass
|
284
|
-
DictionarySetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionarySetResponse").msgclass
|
285
|
-
DictionaryIncrementRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryIncrementRequest").msgclass
|
286
|
-
DictionaryIncrementResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryIncrementResponse").msgclass
|
287
|
-
DictionaryDeleteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryDeleteRequest").msgclass
|
288
|
-
DictionaryDeleteRequest::Some = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryDeleteRequest.Some").msgclass
|
289
|
-
DictionaryDeleteRequest::All = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryDeleteRequest.All").msgclass
|
290
|
-
DictionaryDeleteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._DictionaryDeleteResponse").msgclass
|
291
|
-
SetFetchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetFetchRequest").msgclass
|
292
|
-
SetFetchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetFetchResponse").msgclass
|
293
|
-
SetFetchResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetFetchResponse._Found").msgclass
|
294
|
-
SetFetchResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetFetchResponse._Missing").msgclass
|
295
|
-
SetUnionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetUnionRequest").msgclass
|
296
|
-
SetUnionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetUnionResponse").msgclass
|
297
|
-
SetDifferenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceRequest").msgclass
|
298
|
-
SetDifferenceRequest::Minuend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceRequest._Minuend").msgclass
|
299
|
-
SetDifferenceRequest::Subtrahend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceRequest._Subtrahend").msgclass
|
300
|
-
SetDifferenceRequest::Subtrahend::Set = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceRequest._Subtrahend._Set").msgclass
|
301
|
-
SetDifferenceRequest::Subtrahend::Identity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceRequest._Subtrahend._Identity").msgclass
|
302
|
-
SetDifferenceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceResponse").msgclass
|
303
|
-
SetDifferenceResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceResponse._Found").msgclass
|
304
|
-
SetDifferenceResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._SetDifferenceResponse._Missing").msgclass
|
305
|
-
ListPushFrontRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPushFrontRequest").msgclass
|
306
|
-
ListPushFrontResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPushFrontResponse").msgclass
|
307
|
-
ListPushBackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPushBackRequest").msgclass
|
308
|
-
ListPushBackResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPushBackResponse").msgclass
|
309
|
-
ListPopFrontRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopFrontRequest").msgclass
|
310
|
-
ListPopFrontResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopFrontResponse").msgclass
|
311
|
-
ListPopFrontResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopFrontResponse._Found").msgclass
|
312
|
-
ListPopFrontResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopFrontResponse._Missing").msgclass
|
313
|
-
ListPopBackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopBackRequest").msgclass
|
314
|
-
ListPopBackResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopBackResponse").msgclass
|
315
|
-
ListPopBackResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopBackResponse._Found").msgclass
|
316
|
-
ListPopBackResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListPopBackResponse._Missing").msgclass
|
317
|
-
ListRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListRange").msgclass
|
318
|
-
ListEraseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListEraseRequest").msgclass
|
319
|
-
ListEraseRequest::All = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListEraseRequest._All").msgclass
|
320
|
-
ListEraseRequest::ListRanges = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListEraseRequest._ListRanges").msgclass
|
321
|
-
ListEraseResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListEraseResponse").msgclass
|
322
|
-
ListRemoveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListRemoveRequest").msgclass
|
323
|
-
ListRemoveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListRemoveResponse").msgclass
|
324
|
-
ListFetchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListFetchRequest").msgclass
|
325
|
-
ListFetchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListFetchResponse").msgclass
|
326
|
-
ListFetchResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListFetchResponse._Found").msgclass
|
327
|
-
ListFetchResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListFetchResponse._Missing").msgclass
|
328
|
-
ListLengthRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListLengthRequest").msgclass
|
329
|
-
ListLengthResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListLengthResponse").msgclass
|
330
|
-
ListLengthResponse::Found = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListLengthResponse._Found").msgclass
|
331
|
-
ListLengthResponse::Missing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client._ListLengthResponse._Missing").msgclass
|
332
|
-
ECacheResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cache_client.ECacheResult").enummodule
|
333
|
-
end
|
334
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# @private
|
2
|
-
|
3
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
-
# Source: cacheclient.proto for package 'cache_client'
|
5
|
-
|
6
|
-
require 'grpc'
|
7
|
-
require_relative 'cacheclient_pb'
|
8
|
-
|
9
|
-
module Momento
|
10
|
-
module CacheClient
|
11
|
-
module Scs
|
12
|
-
class Service
|
13
|
-
|
14
|
-
include ::GRPC::GenericService
|
15
|
-
|
16
|
-
self.marshal_class_method = :encode
|
17
|
-
self.unmarshal_class_method = :decode
|
18
|
-
self.service_name = 'cache_client.Scs'
|
19
|
-
|
20
|
-
rpc :Get, ::Momento::CacheClient::GetRequest, ::Momento::CacheClient::GetResponse
|
21
|
-
rpc :Set, ::Momento::CacheClient::SetRequest, ::Momento::CacheClient::SetResponse
|
22
|
-
rpc :Delete, ::Momento::CacheClient::DeleteRequest, ::Momento::CacheClient::DeleteResponse
|
23
|
-
rpc :DictionaryGet, ::Momento::CacheClient::DictionaryGetRequest, ::Momento::CacheClient::DictionaryGetResponse
|
24
|
-
rpc :DictionaryFetch, ::Momento::CacheClient::DictionaryFetchRequest, ::Momento::CacheClient::DictionaryFetchResponse
|
25
|
-
rpc :DictionarySet, ::Momento::CacheClient::DictionarySetRequest, ::Momento::CacheClient::DictionarySetResponse
|
26
|
-
rpc :DictionaryIncrement, ::Momento::CacheClient::DictionaryIncrementRequest, ::Momento::CacheClient::DictionaryIncrementResponse
|
27
|
-
rpc :DictionaryDelete, ::Momento::CacheClient::DictionaryDeleteRequest, ::Momento::CacheClient::DictionaryDeleteResponse
|
28
|
-
rpc :SetFetch, ::Momento::CacheClient::SetFetchRequest, ::Momento::CacheClient::SetFetchResponse
|
29
|
-
rpc :SetUnion, ::Momento::CacheClient::SetUnionRequest, ::Momento::CacheClient::SetUnionResponse
|
30
|
-
rpc :SetDifference, ::Momento::CacheClient::SetDifferenceRequest, ::Momento::CacheClient::SetDifferenceResponse
|
31
|
-
rpc :ListPushFront, ::Momento::CacheClient::ListPushFrontRequest, ::Momento::CacheClient::ListPushFrontResponse
|
32
|
-
rpc :ListPushBack, ::Momento::CacheClient::ListPushBackRequest, ::Momento::CacheClient::ListPushBackResponse
|
33
|
-
rpc :ListPopFront, ::Momento::CacheClient::ListPopFrontRequest, ::Momento::CacheClient::ListPopFrontResponse
|
34
|
-
rpc :ListPopBack, ::Momento::CacheClient::ListPopBackRequest, ::Momento::CacheClient::ListPopBackResponse
|
35
|
-
rpc :ListErase, ::Momento::CacheClient::ListEraseRequest, ::Momento::CacheClient::ListEraseResponse
|
36
|
-
rpc :ListRemove, ::Momento::CacheClient::ListRemoveRequest, ::Momento::CacheClient::ListRemoveResponse
|
37
|
-
rpc :ListFetch, ::Momento::CacheClient::ListFetchRequest, ::Momento::CacheClient::ListFetchResponse
|
38
|
-
rpc :ListLength, ::Momento::CacheClient::ListLengthRequest, ::Momento::CacheClient::ListLengthResponse
|
39
|
-
end
|
40
|
-
|
41
|
-
Stub = Service.rpc_stub_class
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# @private
|
2
|
-
|
3
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
-
# source: controlclient.proto
|
5
|
-
|
6
|
-
require 'google/protobuf'
|
7
|
-
|
8
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
add_file("controlclient.proto", :syntax => :proto3) do
|
10
|
-
add_message "control_client._DeleteCacheRequest" do
|
11
|
-
optional :cache_name, :string, 1
|
12
|
-
end
|
13
|
-
add_message "control_client._DeleteCacheResponse" do
|
14
|
-
end
|
15
|
-
add_message "control_client._CreateCacheRequest" do
|
16
|
-
optional :cache_name, :string, 1
|
17
|
-
end
|
18
|
-
add_message "control_client._CreateCacheResponse" do
|
19
|
-
end
|
20
|
-
add_message "control_client._ListCachesRequest" do
|
21
|
-
optional :next_token, :string, 1
|
22
|
-
end
|
23
|
-
add_message "control_client._Cache" do
|
24
|
-
optional :cache_name, :string, 1
|
25
|
-
end
|
26
|
-
add_message "control_client._ListCachesResponse" do
|
27
|
-
repeated :cache, :message, 1, "control_client._Cache"
|
28
|
-
optional :next_token, :string, 2
|
29
|
-
end
|
30
|
-
add_message "control_client._CreateSigningKeyRequest" do
|
31
|
-
optional :ttl_minutes, :uint32, 1
|
32
|
-
end
|
33
|
-
add_message "control_client._CreateSigningKeyResponse" do
|
34
|
-
optional :key, :string, 1
|
35
|
-
optional :expires_at, :uint64, 2
|
36
|
-
end
|
37
|
-
add_message "control_client._RevokeSigningKeyRequest" do
|
38
|
-
optional :key_id, :string, 1
|
39
|
-
end
|
40
|
-
add_message "control_client._RevokeSigningKeyResponse" do
|
41
|
-
end
|
42
|
-
add_message "control_client._SigningKey" do
|
43
|
-
optional :key_id, :string, 1
|
44
|
-
optional :expires_at, :uint64, 2
|
45
|
-
end
|
46
|
-
add_message "control_client._ListSigningKeysRequest" do
|
47
|
-
optional :next_token, :string, 1
|
48
|
-
end
|
49
|
-
add_message "control_client._ListSigningKeysResponse" do
|
50
|
-
repeated :signing_key, :message, 1, "control_client._SigningKey"
|
51
|
-
optional :next_token, :string, 2
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
module Momento
|
57
|
-
module ControlClient
|
58
|
-
DeleteCacheRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._DeleteCacheRequest").msgclass
|
59
|
-
DeleteCacheResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._DeleteCacheResponse").msgclass
|
60
|
-
CreateCacheRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._CreateCacheRequest").msgclass
|
61
|
-
CreateCacheResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._CreateCacheResponse").msgclass
|
62
|
-
ListCachesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._ListCachesRequest").msgclass
|
63
|
-
Cache = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._Cache").msgclass
|
64
|
-
ListCachesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._ListCachesResponse").msgclass
|
65
|
-
CreateSigningKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._CreateSigningKeyRequest").msgclass
|
66
|
-
CreateSigningKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._CreateSigningKeyResponse").msgclass
|
67
|
-
RevokeSigningKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._RevokeSigningKeyRequest").msgclass
|
68
|
-
RevokeSigningKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._RevokeSigningKeyResponse").msgclass
|
69
|
-
SigningKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._SigningKey").msgclass
|
70
|
-
ListSigningKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._ListSigningKeysRequest").msgclass
|
71
|
-
ListSigningKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("control_client._ListSigningKeysResponse").msgclass
|
72
|
-
end
|
73
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# @private
|
2
|
-
|
3
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
-
# Source: controlclient.proto for package 'control_client'
|
5
|
-
|
6
|
-
require 'grpc'
|
7
|
-
require_relative 'controlclient_pb'
|
8
|
-
|
9
|
-
module Momento
|
10
|
-
module ControlClient
|
11
|
-
module ScsControl
|
12
|
-
class Service
|
13
|
-
|
14
|
-
include ::GRPC::GenericService
|
15
|
-
|
16
|
-
self.marshal_class_method = :encode
|
17
|
-
self.unmarshal_class_method = :decode
|
18
|
-
self.service_name = 'control_client.ScsControl'
|
19
|
-
|
20
|
-
rpc :CreateCache, ::Momento::ControlClient::CreateCacheRequest, ::Momento::ControlClient::CreateCacheResponse
|
21
|
-
rpc :DeleteCache, ::Momento::ControlClient::DeleteCacheRequest, ::Momento::ControlClient::DeleteCacheResponse
|
22
|
-
rpc :ListCaches, ::Momento::ControlClient::ListCachesRequest, ::Momento::ControlClient::ListCachesResponse
|
23
|
-
rpc :CreateSigningKey, ::Momento::ControlClient::CreateSigningKeyRequest, ::Momento::ControlClient::CreateSigningKeyResponse
|
24
|
-
rpc :RevokeSigningKey, ::Momento::ControlClient::RevokeSigningKeyRequest, ::Momento::ControlClient::RevokeSigningKeyResponse
|
25
|
-
rpc :ListSigningKeys, ::Momento::ControlClient::ListSigningKeysRequest, ::Momento::ControlClient::ListSigningKeysResponse
|
26
|
-
end
|
27
|
-
|
28
|
-
Stub = Service.rpc_stub_class
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
require_relative 'response/error'
|
2
|
-
|
3
|
-
module Momento
|
4
|
-
# A response from creating a cache.
|
5
|
-
class CreateCacheResponse < Response
|
6
|
-
# Does the cache already exist?
|
7
|
-
# @return [Boolean]
|
8
|
-
def already_exists?
|
9
|
-
false
|
10
|
-
end
|
11
|
-
|
12
|
-
# Was the cache created?
|
13
|
-
# @return [Boolean]
|
14
|
-
def success?
|
15
|
-
false
|
16
|
-
end
|
17
|
-
|
18
|
-
# @private
|
19
|
-
class AlreadyExists < CreateCacheResponse
|
20
|
-
def already_exists?
|
21
|
-
true
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# @private
|
26
|
-
class Success < CreateCacheResponse
|
27
|
-
def success?
|
28
|
-
true
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
# @private
|
33
|
-
class Error < CreateCacheResponse
|
34
|
-
include ::Momento::Response::Error
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'grpc'
|
2
|
-
require_relative 'controlclient_pb'
|
3
|
-
|
4
|
-
module Momento
|
5
|
-
# @private
|
6
|
-
class CreateCacheResponseBuilder < ResponseBuilder
|
7
|
-
# Build a Momento::CreateCacheResponse from a block of code
|
8
|
-
# which returns a Momento::ControlClient::CreateCacheResponse.
|
9
|
-
#
|
10
|
-
# @return [Momento::CreateCacheResponse]
|
11
|
-
# @raise [StandardError] when the exception is not recognized.
|
12
|
-
# @raise [TypeError] when the response is not recognized.
|
13
|
-
def from_block
|
14
|
-
response = yield
|
15
|
-
rescue GRPC::AlreadyExists
|
16
|
-
return CreateCacheResponse::AlreadyExists.new
|
17
|
-
rescue *RESCUED_EXCEPTIONS => e
|
18
|
-
CreateCacheResponse::Error.new(
|
19
|
-
exception: e, context: context
|
20
|
-
)
|
21
|
-
else
|
22
|
-
raise TypeError unless response.is_a?(::Momento::ControlClient::CreateCacheResponse)
|
23
|
-
|
24
|
-
return CreateCacheResponse::Success.new
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require_relative 'response/error'
|
2
|
-
|
3
|
-
module Momento
|
4
|
-
# A response from deleting a cache.
|
5
|
-
class DeleteCacheResponse < Response
|
6
|
-
# Was the cache deleted?
|
7
|
-
# @return [Boolean]
|
8
|
-
def success?
|
9
|
-
false
|
10
|
-
end
|
11
|
-
|
12
|
-
# @private
|
13
|
-
class Error < DeleteCacheResponse
|
14
|
-
include ::Momento::Response::Error
|
15
|
-
end
|
16
|
-
|
17
|
-
# @private
|
18
|
-
class Success < DeleteCacheResponse
|
19
|
-
def success?
|
20
|
-
true
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require_relative 'response/error'
|
2
|
-
|
3
|
-
module Momento
|
4
|
-
# A response from deleting a key.
|
5
|
-
class DeleteResponse < Response
|
6
|
-
# Was the key deleted?
|
7
|
-
# @return [Boolean]
|
8
|
-
def success?
|
9
|
-
false
|
10
|
-
end
|
11
|
-
|
12
|
-
# @private
|
13
|
-
class Success < DeleteResponse
|
14
|
-
def success?
|
15
|
-
true
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
# @private
|
20
|
-
class Error < DeleteResponse
|
21
|
-
include Momento::Response::Error
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
require_relative 'response_builder'
|
2
|
-
require_relative 'cacheclient_pb'
|
3
|
-
require_relative 'get_response'
|
4
|
-
|
5
|
-
module Momento
|
6
|
-
# @private
|
7
|
-
class GetResponseBuilder < ResponseBuilder
|
8
|
-
# Build a Momento::GetResponse from a block of code
|
9
|
-
# which returns a Momento::ControlClient::GetResponse.
|
10
|
-
#
|
11
|
-
# @return [Momento::GetResponse]
|
12
|
-
# @raise [StandardError] when the exception is not recognized.
|
13
|
-
# @raise [TypeError] when the response is not recognized.
|
14
|
-
def from_block
|
15
|
-
response = yield
|
16
|
-
rescue *RESCUED_EXCEPTIONS => e
|
17
|
-
GetResponse::Error.new(exception: e, context: context)
|
18
|
-
else
|
19
|
-
from_response(response)
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
def from_response(response)
|
25
|
-
raise TypeError unless response.is_a?(Momento::CacheClient::GetResponse)
|
26
|
-
|
27
|
-
case response.result
|
28
|
-
when :Hit
|
29
|
-
GetResponse::Hit.new(grpc_response: response)
|
30
|
-
when :Miss
|
31
|
-
GetResponse::Miss.new
|
32
|
-
else
|
33
|
-
raise "Unknown get result: #{response.result}"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|