google-cloud-run-client 0.3.0 → 0.4.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: 581091773e0e9123c43393e0f4b9259b828a4874ab43b7cd2ffbee30a0271db7
4
- data.tar.gz: e10520bd155244c51485ea6dc0446c0ddec74e19530301d418b888d169c52754
3
+ metadata.gz: f94374952efb5ed30adb6d58fe4dcdaa1bef920338d244efd6450f8cbd04501d
4
+ data.tar.gz: ab150e9fb5790344161493e61f044577e184064a8a1f4743b12c693649fabfac
5
5
  SHA512:
6
- metadata.gz: f7de5d1739a8f31aca819ad1354fe76da273e878c9c78cf74cba7617cd8aeeed5ad3798b94afd62cd5c8ef10f6f2bef36a2240bdc2c98489c29e529faf9244de
7
- data.tar.gz: c8b3b4951a832cab1238db54a95cc432a6f5d1dc2fc8a8b4fda11c22f5b1a43a871a04c3e0064034a294c7b9c12fb7400dbc7d9e08502abdaa598d09cc117d95
6
+ metadata.gz: 3f566793f738022eab85635ad7cec14a62041b8f04d5e504b94228bb54fd53019de83c11b5eef0feae554dec1a4d7a88305a6ae134eedf99271ae6b63293c435
7
+ data.tar.gz: a998b5a73293a5bdea3058136eaf07e1a6362faf94bab3342a04c3fcf92b9c6aa2c30bcb4965079f8d304100ceae69eeee73a05278e1690518e77686b44456e7
data/README.md CHANGED
@@ -34,32 +34,6 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/run.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
42
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -18,7 +18,7 @@ module Google
18
18
  module Cloud
19
19
  module Run
20
20
  module Client
21
- VERSION = "0.3.0"
21
+ VERSION = "0.4.0"
22
22
  end
23
23
  end
24
24
  end
@@ -49,11 +49,13 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::Run::V2::Executions::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Executions/Client.html)
52
- # for version V2 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V2 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the Executions service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About Executions
59
61
  #
@@ -61,17 +63,19 @@ module Google
61
63
  #
62
64
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
63
65
  # Defaults to `:v2`.
64
- # @return [Executions::Client] A client object for the specified version.
66
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
67
+ # @return [::Object] A client object for the specified version.
65
68
  #
66
- def self.executions version: :v2, &block
69
+ def self.executions version: :v2, transport: :grpc, &block
67
70
  require "google/cloud/run/#{version.to_s.downcase}"
68
71
 
69
72
  package_name = Google::Cloud::Run
70
73
  .constants
71
74
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
72
75
  .first
73
- package_module = Google::Cloud::Run.const_get package_name
74
- package_module.const_get(:Executions).const_get(:Client).new(&block)
76
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Executions)
77
+ service_module = service_module.const_get(:Rest) if transport == :rest
78
+ service_module.const_get(:Client).new(&block)
75
79
  end
76
80
 
77
81
  ##
@@ -79,11 +83,13 @@ module Google
79
83
  #
80
84
  # By default, this returns an instance of
81
85
  # [Google::Cloud::Run::V2::Jobs::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Jobs/Client.html)
82
- # for version V2 of the API.
83
- # However, you can specify specify a different API version by passing it in the
86
+ # for a gRPC client for version V2 of the API.
87
+ # However, you can specify a different API version by passing it in the
84
88
  # `version` parameter. If the Jobs service is
85
89
  # supported by that API version, and the corresponding gem is available, the
86
90
  # appropriate versioned client will be returned.
91
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
92
+ # the `transport` parameter.
87
93
  #
88
94
  # ## About Jobs
89
95
  #
@@ -91,17 +97,19 @@ module Google
91
97
  #
92
98
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
93
99
  # Defaults to `:v2`.
94
- # @return [Jobs::Client] A client object for the specified version.
100
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
101
+ # @return [::Object] A client object for the specified version.
95
102
  #
96
- def self.jobs version: :v2, &block
103
+ def self.jobs version: :v2, transport: :grpc, &block
97
104
  require "google/cloud/run/#{version.to_s.downcase}"
98
105
 
99
106
  package_name = Google::Cloud::Run
100
107
  .constants
101
108
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
102
109
  .first
103
- package_module = Google::Cloud::Run.const_get package_name
104
- package_module.const_get(:Jobs).const_get(:Client).new(&block)
110
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Jobs)
111
+ service_module = service_module.const_get(:Rest) if transport == :rest
112
+ service_module.const_get(:Client).new(&block)
105
113
  end
106
114
 
107
115
  ##
@@ -109,11 +117,13 @@ module Google
109
117
  #
110
118
  # By default, this returns an instance of
111
119
  # [Google::Cloud::Run::V2::Revisions::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Revisions/Client.html)
112
- # for version V2 of the API.
113
- # However, you can specify specify a different API version by passing it in the
120
+ # for a gRPC client for version V2 of the API.
121
+ # However, you can specify a different API version by passing it in the
114
122
  # `version` parameter. If the Revisions service is
115
123
  # supported by that API version, and the corresponding gem is available, the
116
124
  # appropriate versioned client will be returned.
125
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
126
+ # the `transport` parameter.
117
127
  #
118
128
  # ## About Revisions
119
129
  #
@@ -121,17 +131,19 @@ module Google
121
131
  #
122
132
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
123
133
  # Defaults to `:v2`.
124
- # @return [Revisions::Client] A client object for the specified version.
134
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
135
+ # @return [::Object] A client object for the specified version.
125
136
  #
126
- def self.revisions version: :v2, &block
137
+ def self.revisions version: :v2, transport: :grpc, &block
127
138
  require "google/cloud/run/#{version.to_s.downcase}"
128
139
 
129
140
  package_name = Google::Cloud::Run
130
141
  .constants
131
142
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
132
143
  .first
133
- package_module = Google::Cloud::Run.const_get package_name
134
- package_module.const_get(:Revisions).const_get(:Client).new(&block)
144
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Revisions)
145
+ service_module = service_module.const_get(:Rest) if transport == :rest
146
+ service_module.const_get(:Client).new(&block)
135
147
  end
136
148
 
137
149
  ##
@@ -139,11 +151,13 @@ module Google
139
151
  #
140
152
  # By default, this returns an instance of
141
153
  # [Google::Cloud::Run::V2::Services::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Services/Client.html)
142
- # for version V2 of the API.
143
- # However, you can specify specify a different API version by passing it in the
154
+ # for a gRPC client for version V2 of the API.
155
+ # However, you can specify a different API version by passing it in the
144
156
  # `version` parameter. If the Services service is
145
157
  # supported by that API version, and the corresponding gem is available, the
146
158
  # appropriate versioned client will be returned.
159
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
160
+ # the `transport` parameter.
147
161
  #
148
162
  # ## About Services
149
163
  #
@@ -151,17 +165,19 @@ module Google
151
165
  #
152
166
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
153
167
  # Defaults to `:v2`.
154
- # @return [Services::Client] A client object for the specified version.
168
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
169
+ # @return [::Object] A client object for the specified version.
155
170
  #
156
- def self.services version: :v2, &block
171
+ def self.services version: :v2, transport: :grpc, &block
157
172
  require "google/cloud/run/#{version.to_s.downcase}"
158
173
 
159
174
  package_name = Google::Cloud::Run
160
175
  .constants
161
176
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
162
177
  .first
163
- package_module = Google::Cloud::Run.const_get package_name
164
- package_module.const_get(:Services).const_get(:Client).new(&block)
178
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Services)
179
+ service_module = service_module.const_get(:Rest) if transport == :rest
180
+ service_module.const_get(:Client).new(&block)
165
181
  end
166
182
 
167
183
  ##
@@ -169,11 +185,13 @@ module Google
169
185
  #
170
186
  # By default, this returns an instance of
171
187
  # [Google::Cloud::Run::V2::Tasks::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Tasks/Client.html)
172
- # for version V2 of the API.
173
- # However, you can specify specify a different API version by passing it in the
188
+ # for a gRPC client for version V2 of the API.
189
+ # However, you can specify a different API version by passing it in the
174
190
  # `version` parameter. If the Tasks service is
175
191
  # supported by that API version, and the corresponding gem is available, the
176
192
  # appropriate versioned client will be returned.
193
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
194
+ # the `transport` parameter.
177
195
  #
178
196
  # ## About Tasks
179
197
  #
@@ -181,17 +199,19 @@ module Google
181
199
  #
182
200
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
183
201
  # Defaults to `:v2`.
184
- # @return [Tasks::Client] A client object for the specified version.
202
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
203
+ # @return [::Object] A client object for the specified version.
185
204
  #
186
- def self.tasks version: :v2, &block
205
+ def self.tasks version: :v2, transport: :grpc, &block
187
206
  require "google/cloud/run/#{version.to_s.downcase}"
188
207
 
189
208
  package_name = Google::Cloud::Run
190
209
  .constants
191
210
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
192
211
  .first
193
- package_module = Google::Cloud::Run.const_get package_name
194
- package_module.const_get(:Tasks).const_get(:Client).new(&block)
212
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Tasks)
213
+ service_module = service_module.const_get(:Rest) if transport == :rest
214
+ service_module.const_get(:Client).new(&block)
195
215
  end
196
216
 
197
217
  ##
@@ -211,7 +231,7 @@ module Google
211
231
  # * `timeout` (*type:* `Numeric`) -
212
232
  # Default timeout in seconds.
213
233
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
214
- # Additional gRPC headers to be sent with the call.
234
+ # Additional headers to be sent with the call.
215
235
  # * `retry_policy` (*type:* `Hash`) -
216
236
  # The retry policy. The value is a hash with the following keys:
217
237
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-run-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-11 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.5'
33
+ version: '0.7'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.5'
43
+ version: '0.7'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.3.14
192
+ rubygems_version: 3.4.2
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: API Client library for the Cloud Run API