google-cloud-redis 1.7.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02a97cd52fc48a4eed8de294717b2d26a56600fc0e5f9e273ca286ef1ec4367d
4
- data.tar.gz: 45b3cea0852a73e7416dee14dfe16b41f46bfa50a1847ee4c0793d82beb3bf61
3
+ metadata.gz: b625742dd8fdaecf12266a0832edf785339cdadb6347120cc4ec3d0c9e66aa21
4
+ data.tar.gz: 0bb9b42a30c6dc9628b30ae88ff17ba88f28d05e2ffc8d0febd33ae8d170403f
5
5
  SHA512:
6
- metadata.gz: ae52113b6eefabfe7b9e8c71ae6d4a443b4cb7bd1b032f615bb09914986a96a7554fb4556c39274ffe3a806cb5d355a09a6cdf49199ccaec9406f0f270660e05
7
- data.tar.gz: 6c8d00e05e6307052ddf223525cb816fe0802edcfa524a10664e9f2b7e1ffdaa0bd483030739ff7c9eb8b0b45e8c013bd3430ec33e66138da2d2f3708fd27434
6
+ metadata.gz: 4797afbcb87ebe10a50931115187b1ef67e41bd32d1c0bb8498e395c341086b7d7551b3eca293d6b065b8a1f54ccce5a539057d35be89f60b5744951be10b5fb
7
+ data.tar.gz: 4aec7292acbda0a0d60a68e86e0ef2e27996aa016af3576861b274447a5370faaf2b68b09f2ba25e3dcda1555245bc7042f9a0a0af875be68f2d047a3d8daa25
data/.yardopts CHANGED
@@ -8,5 +8,4 @@
8
8
  -
9
9
  README.md
10
10
  AUTHENTICATION.md
11
- MIGRATING.md
12
11
  LICENSE.md
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-redis, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest),
20
- [google-cloud-redis-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1beta1/latest).
19
+ [google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/memorystore/docs/redis)
23
22
  for more usage information.
@@ -35,14 +34,6 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/redis.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Migrating from 0.x versions
39
-
40
- The 1.0 release of the google-cloud-redis client is a significant upgrade
41
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
42
- and includes substantial interface changes. Existing code written for earlier
43
- versions of this library will likely require updates to use this version.
44
- See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
-
46
37
  ## Debug Logging
47
38
 
48
39
  This library comes with opt-in Debug Logging that can help you troubleshoot
@@ -71,8 +62,7 @@ results in logs appearing alongside your application logs in the
71
62
  Debug logging also requires that the versioned clients for this service be
72
63
  sufficiently recent, released after about Dec 10, 2024. If logging is not
73
64
  working, try updating the versioned clients in your bundle or installed gems:
74
- [google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest),
75
- [google-cloud-redis-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1beta1/latest).
65
+ [google-cloud-redis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest).
76
66
 
77
67
  ## Supported Ruby Versions
78
68
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Redis
23
- VERSION = "1.7.0"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-core
@@ -27,42 +27,16 @@ dependencies:
27
27
  name: google-cloud-redis-v1
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0.13'
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: 2.a
36
- type: :runtime
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: '0.13'
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: 2.a
46
- - !ruby/object:Gem::Dependency
47
- name: google-cloud-redis-v1beta1
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: '0.12'
53
- - - "<"
30
+ - - "~>"
54
31
  - !ruby/object:Gem::Version
55
- version: 2.a
32
+ version: '2.0'
56
33
  type: :runtime
57
34
  prerelease: false
58
35
  version_requirements: !ruby/object:Gem::Requirement
59
36
  requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0.12'
63
- - - "<"
37
+ - - "~>"
64
38
  - !ruby/object:Gem::Version
65
- version: 2.a
39
+ version: '2.0'
66
40
  description: Creates and manages Redis instances on the Google Cloud Platform.
67
41
  email: googleapis-packages@google.com
68
42
  executables: []
@@ -72,7 +46,6 @@ files:
72
46
  - ".yardopts"
73
47
  - AUTHENTICATION.md
74
48
  - LICENSE.md
75
- - MIGRATING.md
76
49
  - README.md
77
50
  - lib/google-cloud-redis.rb
78
51
  - lib/google/cloud/redis.rb
@@ -95,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
68
  - !ruby/object:Gem::Version
96
69
  version: '0'
97
70
  requirements: []
98
- rubygems_version: 3.6.2
71
+ rubygems_version: 3.6.3
99
72
  specification_version: 4
100
73
  summary: API Client library for the Google Cloud Memorystore for Redis API
101
74
  test_files: []
data/MIGRATING.md DELETED
@@ -1,318 +0,0 @@
1
- ## Migrating to google-cloud-redis 1.0
2
-
3
- The 1.0 release of the google-cloud-redis client is a significant upgrade
4
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
5
- and includes substantial interface changes. Existing code written for earlier
6
- versions of this library will likely require updates to use this version.
7
- This document describes the changes that have been made, and what you need to
8
- do to update your usage.
9
-
10
- To summarize:
11
-
12
- * The library has been broken out into three libraries. The new gems
13
- `google-cloud-redis-v1` and `google-cloud-redis-v1beta1` contain the
14
- actual client classes for versions V1 and V1beta1 of the Redis
15
- service, and the gem `google-cloud-redis` now simply provides a
16
- convenience wrapper. See [Library Structure](#library-structure) for more
17
- info.
18
- * The library uses a new configuration mechanism giving you closer control
19
- over endpoint address, network timeouts, and retry. See
20
- [Client Configuration](#client-configuration) for more info. Furthermore,
21
- when creating a client object, you can customize its configuration in a
22
- block rather than passing arguments to the constructor. See
23
- [Creating Clients](#creating-clients) for more info.
24
- * Previously, positional arguments were used to indicate required arguments.
25
- Now, all method arguments are keyword arguments, with documentation that
26
- specifies whether they are required or optional. Additionally, you can pass
27
- a proto request object instead of separate arguments. See
28
- [Passing Arguments](#passing-arguments) for more info.
29
- * Previously, some client classes included class methods for constructing
30
- resource paths. These paths are now instance methods on the client objects,
31
- and are also available in a separate paths module. See
32
- [Resource Path Helpers](#resource-path-helpers) for more info.
33
- * Previously, clients reported RPC errors by raising instances of
34
- `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
35
- `Google::Cloud::Error` and its subclasses. See
36
- [Handling Errors](#handling-errors) for more info.
37
- * Some classes have moved into different namespaces. See
38
- [Class Namespaces](#class-namespaces) for more info.
39
-
40
- ### Library Structure
41
-
42
- Older 0.x releases of the `google-cloud-redis` gem were all-in-one gems that
43
- included potentially multiple clients for multiple versions of the Redis
44
- service. The `Google::Cloud::Redis.new` factory method would
45
- return you an instance of a `Google::Cloud::Redis::V1::CloudRedisClient`
46
- object for the V1 version of the service, or a
47
- `Google::Cloud::Redis::V1beta1::CloudRedisClient` object for the
48
- V1beta1 version of the service. All these classes were defined in the same gem.
49
-
50
- With the 1.0 release, the `google-cloud-redis` gem still provides factory
51
- methods for obtaining clients. (The method signatures will have changed. See
52
- [Creating Clients](#creating-clients) for details.) However, the actual client
53
- classes have been moved into separate gems, one per service version. The
54
- `Google::Cloud::Redis::V1::CloudRedis::Client` class, along with its
55
- helpers and data types, is now part of the `google-cloud-redis-v1` gem.
56
- Similarly, the `Google::Cloud::Redis::V1beta1::CloudRedis::Client`
57
- class is part of the `google-cloud-redis-v1beta1` gem.
58
-
59
- For normal usage, you can continue to install the `google-cloud-redis` gem
60
- (which will bring in the versioned client gems as dependencies) and continue to
61
- use factory methods to create clients. However, you may alternatively choose to
62
- install only one of the versioned gems. For example, if you know you will only
63
- `V1` of the service, you can install `google-cloud-redis-v1` by itself, and
64
- construct instances of the
65
- `Google::Cloud::Redis::V1::CloudRedis::Client` client class directly.
66
-
67
- ### Client Configuration
68
-
69
- In older releases, if you wanted to customize performance parameters or
70
- low-level behavior of the client (such as credentials, timeouts, or
71
- instrumentation), you would pass a variety of keyword arguments to the client
72
- constructor. It was also extremely difficult to customize the default settings.
73
-
74
- With the 1.0 release, a configuration interface provides control over these
75
- parameters, including defaults for all instances of a client, and settings for
76
- each specific client instance. For example, to set default credentials and
77
- timeout for all Redis V1 clients:
78
-
79
- ```
80
- Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
81
- config.credentials = "/path/to/credentials.json"
82
- config.timeout = 10.0
83
- end
84
- ```
85
-
86
- Individual RPCs can also be configured independently. For example, to set the
87
- timeout for the `list_instances` call:
88
-
89
- ```
90
- Google::Cloud::Redis::V1::CloudRedis::Client.configure do |config|
91
- config.rpcs.list_instances.timeout = 20.0
92
- end
93
- ```
94
-
95
- Defaults for certain configurations can be set for all Redis versions
96
- globally:
97
-
98
- ```
99
- Google::Cloud::Redis.configure do |config|
100
- config.credentials = "/path/to/credentials.json"
101
- config.timeout = 10.0
102
- end
103
- ```
104
-
105
- Finally, you can override the configuration for each client instance. See the
106
- next section on [Creating Clients](#creating-clients) for details.
107
-
108
- ### Creating Clients
109
-
110
- In older releases, to create a client object, you would use the
111
- `Google::Cloud::Redis.new` class method. Keyword arguments were available to
112
- select a service version and to configure parameters such as credentials and
113
- timeouts.
114
-
115
- With the 1.0 release, use the `Google::Cloud::Redis.cloud_redis` class
116
- method to create a client object. You may select a service version using the
117
- `:version` keyword argument. However, other configuration parameters should be
118
- set in a configuration block when you create the client.
119
-
120
- Old:
121
- ```
122
- client = Google::Cloud::Redis.new credentials: "/path/to/credentials.json"
123
- ```
124
-
125
- New:
126
- ```
127
- client = Google::Cloud::Redis.cloud_redis do |config|
128
- config.credentials = "/path/to/credentials.json"
129
- end
130
- ```
131
-
132
- The configuration block is optional. If you do not provide it, or you do not
133
- set some configuration parameters, then the default configuration is used. See
134
- [Client Configuration](#client-configuration).
135
-
136
- ### Passing Arguments
137
-
138
- In older releases, required arguments would be passed as positional method
139
- arguments, while most optional arguments would be passed as keyword arguments.
140
-
141
- With the 1.0 release, all RPC arguments are passed as keyword arguments,
142
- regardless of whether they are required or optional. For example:
143
-
144
- Old:
145
- ```
146
- client = Google::Cloud::Redis.new
147
-
148
- parent = "projects/my-project/locations/-"
149
-
150
- # Parent is a positional argument.
151
- response = client.list_instances parent
152
- ```
153
-
154
- New:
155
- ```
156
- client = Google::Cloud::Redis.cloud_redis
157
-
158
- parent = "projects/my-project/locations/-"
159
-
160
- # Both document and encoding_type are keyword arguments.
161
- response = client.list_instances parent: parent
162
- ```
163
-
164
- In the 1.0 release, it is also possible to pass a request object, either
165
- as a hash or as a protocol buffer.
166
-
167
- New:
168
- ```
169
- client = Google::Cloud::Redis.cloud_redis
170
-
171
- request = Google::Cloud::Redis::V1::ListInstancesRequest.new(
172
- parent: "projects/my-project/locations/-"
173
- )
174
-
175
- # Pass a request object as a positional argument:
176
- response = client.list_instances request
177
- ```
178
-
179
- Finally, in older releases, to provide call options, you would pass a
180
- `Google::Gax::CallOptions` object with the `:options` keyword argument. In the
181
- 1.0 release, pass call options using a _second set_ of keyword arguments.
182
-
183
- Old:
184
- ```
185
- client = Google::Cloud::Redis.new
186
-
187
- parent = "projects/my-project/locations/-"
188
-
189
- options = Google::Gax::CallOptions.new timeout: 10.0
190
-
191
- response = client.list_instances parent, options: options
192
- ```
193
-
194
- New:
195
- ```
196
- client = Google::Cloud::Redis.cloud_redis
197
-
198
- parent = "projects/my-project/locations/-"
199
-
200
- # Use a hash to wrap the normal call arguments (or pass a request object), and
201
- # then add further keyword arguments for the call options.
202
- response = client.list_instances({ parent: parent }, timeout: 10.0)
203
- ```
204
-
205
- ### Resource Path Helpers
206
-
207
- The client library includes helper methods for generating the resource path
208
- strings passed to many calls. These helpers have changed in two ways:
209
-
210
- * In older releases, they are _class_ methods on the client class. In the 1.0
211
- release, they are _instance_ methods on the client. They are also available
212
- on a separate paths module that you can include elsewhere for convenience.
213
- * In older releases, arguments to a resource path helper are passed as
214
- _positional_ arguments. In the 1.0 release, they are passed as named _keyword_
215
- arguments.
216
-
217
- Following is an example involving using a resource path helper.
218
-
219
- Old:
220
- ```
221
- client = Google::Cloud::Redis.new
222
-
223
- # Call the helper on the client class
224
- parent = Google::Cloud::Redis::V1::CloudRedisClient.location_path(
225
- "my-project", "-"
226
- )
227
-
228
- response = client.list_instances parent
229
- ```
230
-
231
- New:
232
- ```
233
- client = Google::Cloud::Redis.cloud_redis
234
-
235
- # Call the helper on the client instance, and use keyword arguments
236
- parent = client.location_path project: "my-project", location: "-"
237
-
238
- response = client.list_instances parent: parent
239
- ```
240
-
241
- In the 1.0 client, you can also use the paths module as a convenience module.
242
-
243
- New:
244
- ```
245
- # Bring the path helper methods into the current class
246
- include Google::Cloud::Redis::V1::CloudRedis::Paths
247
-
248
- def foo
249
- client = Google::Cloud::Redis.cloud_redis
250
-
251
- # Call the included helper method
252
- parent = location_path project: "my-project", location: "-"
253
-
254
- response = client.list_instances parent: parent
255
-
256
- # Do something with response...
257
- end
258
- ```
259
-
260
- ### Handling Errors
261
-
262
- The client reports standard
263
- [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
264
- by raising exceptions. In older releases, these exceptions were located in the
265
- `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
266
- exception class, defined in the `google-gax` gem. However, these classes were
267
- different from the standard exceptions (subclasses of `Google::Cloud::Error`)
268
- thrown by other client libraries such as `google-cloud-storage`.
269
-
270
- The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
271
- for consistency across all the Google Cloud client libraries. In general, these
272
- exceptions have the same name as their counterparts from older releases, but
273
- are located in the `Google::Cloud` namespace rather than the `Google::Gax`
274
- namespace.
275
-
276
- Old:
277
- ```
278
- client = Google::Cloud::Redis.new
279
-
280
- parent = "projects/my-project/locations/-"
281
-
282
- begin
283
- response = client.list_instances parent
284
- rescue Google::Gax::Error => e
285
- # Handle exceptions that subclass Google::Gax::Error
286
- end
287
- ```
288
-
289
- New:
290
- ```
291
- client = Google::Cloud::Redis.cloud_redis
292
-
293
- parent = "projects/my-project/locations/-"
294
-
295
- begin
296
- response = client.list_instances parent: parent
297
- rescue Google::Cloud::Error => e
298
- # Handle exceptions that subclass Google::Cloud::Error
299
- end
300
- ```
301
-
302
- ### Class Namespaces
303
-
304
- In older releases, the client object was of class
305
- `Google::Cloud::Redis::V1::CloudRedisClient`.
306
- In the 1.0 release, the client object is of class
307
- `Google::Cloud::Redis::V1::CloudRedis::Client`.
308
- Note that most users will use the `Google::Cloud::Redis.cloud_redis`
309
- factory method to create instances of the client object, so you may not need to
310
- reference the actual class directly.
311
- See [Creating Clients](#creating-clients).
312
-
313
- In older releases, the credentials object was of class
314
- `Google::Cloud::Redis::V1::Credentials`.
315
- In the 1.0 release, the credentials object is of class
316
- `Google::Cloud::Redis::V1::CloudRedis::Credentials`.
317
- Again, most users will not need to reference this class directly.
318
- See [Client Configuration](#client-configuration).