google-cloud-redis-cluster 1.0.0 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac729976e7c34f0e89caee0039234f2a02679589329e9e4987ce750d12852dd6
4
- data.tar.gz: 6b6fca09876d2637d9c2427b3dc39228c0c056f96336282f2a945cf4fe3c74cb
3
+ metadata.gz: aa6fc6b945dbfdb1e8b2feaa219fa5e43318a258665b1e28663bd487093ec4d1
4
+ data.tar.gz: 503bd24d6cfb1aaa8a4dcf644ef4adc6a7069f6eadd20cba0a2eae21ed382648
5
5
  SHA512:
6
- metadata.gz: ab2713744201970fca9d649e86487f80f3d1b972b8355077b7ac650603a21d19871da5b96ad292c18ed19613f5c2255381c6af46be1fd1d076c219d4c94b67bb
7
- data.tar.gz: 4e469e084406d1fe44e266d4586855ea5534396c6efea558ba8020a1408e1ffba3832484cdd67d24e16a91c73028af4da1cf0663a57612230a4b242150b37d3d
6
+ metadata.gz: a6976ddd0fedcbc170cf5f65210a25847125030fe1e92d5292c3ef01ed3ac197a82130ee390034600e74455b6ef5d5fcd5e5186b5e3b0df82e975467ac29c594
7
+ data.tar.gz: fd05fca16191792fc761230f1c3a6959b1fbdcf715001872b04228df9a6518c58581c0e37c39cca1e74cb4fe4744e93f98eb644fbe2b8692fb4636f86076edf4
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  Creates and manages Redis instances on the Google Cloud Platform.
4
4
 
5
- Creates and manages Redis instances on the Google Cloud Platform.
6
5
 
7
6
  Actual client classes for the various versions of this API are defined in
8
7
  _versioned_ client gems, with names of the form `google-cloud-redis-cluster-v*`.
@@ -34,9 +33,39 @@ In order to use this library, you first need to go through the following steps:
34
33
  1. [Enable the API.](https://console.cloud.google.com/apis/library/redis.googleapis.com)
35
34
  1. {file:AUTHENTICATION.md Set up authentication.}
36
35
 
36
+ ## Debug Logging
37
+
38
+ This library comes with opt-in Debug Logging that can help you troubleshoot
39
+ your application's integration with the API. When logging is activated, key
40
+ events such as requests and responses, along with data payloads and metadata
41
+ such as headers and client configuration, are logged to the standard error
42
+ stream.
43
+
44
+ **WARNING:** Client Library Debug Logging includes your data payloads in
45
+ plaintext, which could include sensitive data such as PII for yourself or your
46
+ customers, private keys, or other security data that could be compromising if
47
+ leaked. Always practice good data hygiene with your application logs, and follow
48
+ the principle of least access. Google also recommends that Client Library Debug
49
+ Logging be enabled only temporarily during active debugging, and not used
50
+ permanently in production.
51
+
52
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
53
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
54
+ list of client library gem names. This will select the default logging behavior,
55
+ which writes logs to the standard error stream. On a local workstation, this may
56
+ result in logs appearing on the console. When running on a Google Cloud hosting
57
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
58
+ results in logs appearing alongside your application logs in the
59
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
60
+
61
+ Debug logging also requires that the versioned clients for this service be
62
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
63
+ working, try updating the versioned clients in your bundle or installed gems:
64
+ [google-cloud-redis-cluster-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-cluster-v1/latest).
65
+
37
66
  ## Supported Ruby Versions
38
67
 
39
- This library is supported on Ruby 2.7+.
68
+ This library is supported on Ruby 3.0+.
40
69
 
41
70
  Google provides official support for Ruby versions that are actively supported
42
71
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Redis
23
23
  module Cluster
24
- VERSION = "1.0.0"
24
+ VERSION = "1.1.0"
25
25
  end
26
26
  end
27
27
  end
@@ -59,6 +59,11 @@ module Google
59
59
  # You can also specify a different transport by passing `:rest` or `:grpc` in
60
60
  # the `transport` parameter.
61
61
  #
62
+ # Raises an exception if the currently installed versioned client gem for the
63
+ # given API version does not support the given transport of the CloudRedisCluster service.
64
+ # You can determine whether the method will succeed by calling
65
+ # {Google::Cloud::Redis::Cluster.cloud_redis_cluster_available?}.
66
+ #
62
67
  # ## About CloudRedisCluster
63
68
  #
64
69
  # Configures and manages Cloud Memorystore for Redis clusters
@@ -77,12 +82,6 @@ module Google
77
82
  # Note that location_id must be a GCP `region`; for example:
78
83
  # * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
79
84
  #
80
- # We use API version selector for Flex APIs
81
- # * The versioning strategy is release-based versioning
82
- # * Our backend CLH only deals with the superset version (called v1main)
83
- # * Existing backend for Redis Gen1 and MRR is not touched.
84
- # * More details in go/redis-flex-api-versioning
85
- #
86
85
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
87
86
  # Defaults to `:v1`.
88
87
  # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
@@ -100,6 +99,37 @@ module Google
100
99
  service_module.const_get(:Client).new(&block)
101
100
  end
102
101
 
102
+ ##
103
+ # Determines whether the CloudRedisCluster service is supported by the current client.
104
+ # If true, you can retrieve a client object by calling {Google::Cloud::Redis::Cluster.cloud_redis_cluster}.
105
+ # If false, that method will raise an exception. This could happen if the given
106
+ # API version does not exist or does not support the CloudRedisCluster service,
107
+ # or if the versioned client gem needs an update to support the CloudRedisCluster service.
108
+ #
109
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
110
+ # Defaults to `:v1`.
111
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
112
+ # @return [boolean] Whether the service is available.
113
+ #
114
+ def self.cloud_redis_cluster_available? version: :v1, transport: :grpc
115
+ require "google/cloud/redis/cluster/#{version.to_s.downcase}"
116
+ package_name = Google::Cloud::Redis::Cluster
117
+ .constants
118
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
119
+ .first
120
+ return false unless package_name
121
+ service_module = Google::Cloud::Redis::Cluster.const_get package_name
122
+ return false unless service_module.const_defined? :CloudRedisCluster
123
+ service_module = service_module.const_get :CloudRedisCluster
124
+ if transport == :rest
125
+ return false unless service_module.const_defined? :Rest
126
+ service_module = service_module.const_get :Rest
127
+ end
128
+ service_module.const_defined? :Client
129
+ rescue ::LoadError
130
+ false
131
+ end
132
+
103
133
  ##
104
134
  # Configure the google-cloud-redis-cluster library.
105
135
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-redis-cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-26 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -61,7 +60,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
61
60
  licenses:
62
61
  - Apache-2.0
63
62
  metadata: {}
64
- post_install_message:
65
63
  rdoc_options: []
66
64
  require_paths:
67
65
  - lib
@@ -69,15 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
67
  requirements:
70
68
  - - ">="
71
69
  - !ruby/object:Gem::Version
72
- version: '2.7'
70
+ version: '3.0'
73
71
  required_rubygems_version: !ruby/object:Gem::Requirement
74
72
  requirements:
75
73
  - - ">="
76
74
  - !ruby/object:Gem::Version
77
75
  version: '0'
78
76
  requirements: []
79
- rubygems_version: 3.5.6
80
- signing_key:
77
+ rubygems_version: 3.6.2
81
78
  specification_version: 4
82
79
  summary: Creates and manages Redis instances on the Google Cloud Platform.
83
80
  test_files: []