google-cloud-managed_kafka 2.0.0 → 2.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 +4 -4
- data/lib/google/cloud/managed_kafka/version.rb +1 -1
- data/lib/google/cloud/managed_kafka.rb +71 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e512ab4e749e2f5c874052888d884dba5a92c173f8c02788f013e2980ef873d0
|
4
|
+
data.tar.gz: 514c805b4f61e014754674a3838ee95cbede5c3d45a9f3bbedabb7aa4d758459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc0f7040ed128d697b123eab4442dbfffdb4a09f04e0e84aafd596a8dafaf718c6ced4c881c3c4335c88392454c24f4c8a3b0060fa3b650b632e2c6496a229f8
|
7
|
+
data.tar.gz: f8c7e5374f9bd7a2f38405f644746b44baeba56557e72defac037dcaffdb05f3d3f7014519f1465f8da6ef69f9999a1221bf0baf2e3eb46acc8199846a621a78
|
@@ -116,6 +116,77 @@ module Google
|
|
116
116
|
false
|
117
117
|
end
|
118
118
|
|
119
|
+
##
|
120
|
+
# Create a new client object for ManagedKafkaConnect.
|
121
|
+
#
|
122
|
+
# By default, this returns an instance of
|
123
|
+
# [Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-managed_kafka-v1/latest/Google-Cloud-ManagedKafka-V1-ManagedKafkaConnect-Client)
|
124
|
+
# for a gRPC client for version V1 of the API.
|
125
|
+
# However, you can specify a different API version by passing it in the
|
126
|
+
# `version` parameter. If the ManagedKafkaConnect service is
|
127
|
+
# supported by that API version, and the corresponding gem is available, the
|
128
|
+
# appropriate versioned client will be returned.
|
129
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
130
|
+
# the `transport` parameter.
|
131
|
+
#
|
132
|
+
# Raises an exception if the currently installed versioned client gem for the
|
133
|
+
# given API version does not support the given transport of the ManagedKafkaConnect service.
|
134
|
+
# You can determine whether the method will succeed by calling
|
135
|
+
# {Google::Cloud::ManagedKafka.managed_kafka_connect_available?}.
|
136
|
+
#
|
137
|
+
# ## About ManagedKafkaConnect
|
138
|
+
#
|
139
|
+
# The service that a client application uses to manage Apache Kafka Connect
|
140
|
+
# clusters and connectors.
|
141
|
+
#
|
142
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
143
|
+
# Defaults to `:v1`.
|
144
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
145
|
+
# @return [::Object] A client object for the specified version.
|
146
|
+
#
|
147
|
+
def self.managed_kafka_connect version: :v1, transport: :grpc, &block
|
148
|
+
require "google/cloud/managed_kafka/#{version.to_s.downcase}"
|
149
|
+
|
150
|
+
package_name = Google::Cloud::ManagedKafka
|
151
|
+
.constants
|
152
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
153
|
+
.first
|
154
|
+
service_module = Google::Cloud::ManagedKafka.const_get(package_name).const_get(:ManagedKafkaConnect)
|
155
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
156
|
+
service_module.const_get(:Client).new(&block)
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# Determines whether the ManagedKafkaConnect service is supported by the current client.
|
161
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::ManagedKafka.managed_kafka_connect}.
|
162
|
+
# If false, that method will raise an exception. This could happen if the given
|
163
|
+
# API version does not exist or does not support the ManagedKafkaConnect service,
|
164
|
+
# or if the versioned client gem needs an update to support the ManagedKafkaConnect service.
|
165
|
+
#
|
166
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
167
|
+
# Defaults to `:v1`.
|
168
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
169
|
+
# @return [boolean] Whether the service is available.
|
170
|
+
#
|
171
|
+
def self.managed_kafka_connect_available? version: :v1, transport: :grpc
|
172
|
+
require "google/cloud/managed_kafka/#{version.to_s.downcase}"
|
173
|
+
package_name = Google::Cloud::ManagedKafka
|
174
|
+
.constants
|
175
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
176
|
+
.first
|
177
|
+
return false unless package_name
|
178
|
+
service_module = Google::Cloud::ManagedKafka.const_get package_name
|
179
|
+
return false unless service_module.const_defined? :ManagedKafkaConnect
|
180
|
+
service_module = service_module.const_get :ManagedKafkaConnect
|
181
|
+
if transport == :rest
|
182
|
+
return false unless service_module.const_defined? :Rest
|
183
|
+
service_module = service_module.const_get :Rest
|
184
|
+
end
|
185
|
+
service_module.const_defined? :Client
|
186
|
+
rescue ::LoadError
|
187
|
+
false
|
188
|
+
end
|
189
|
+
|
119
190
|
##
|
120
191
|
# Configure the google-cloud-managed_kafka library.
|
121
192
|
#
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-managed_kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-cloud-core
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.6.
|
71
|
+
rubygems_version: 3.6.5
|
72
72
|
specification_version: 4
|
73
73
|
summary: Manage Apache Kafka clusters and resources.
|
74
74
|
test_files: []
|