google-cloud-container 2.2.1 → 2.3.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/README.md +5 -11
- data/lib/google/cloud/container/version.rb +1 -1
- data/lib/google/cloud/container.rb +12 -3
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25281a10d663eff8cfe81af373271803582154beed99942cbc9d41cdb3ce2caf
|
|
4
|
+
data.tar.gz: 9f4bda8b466be99ddc1562525b0e0d7dac9349008950c92a94990e7f7f184395
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d97f89305777e3eb7939cde2d36385e8cbded868880a30aa375b3e61f0ced9ddcf3193458bfa2c86d76f9f8a4273e59f8893414880c34318f3477a0363f5b221
|
|
7
|
+
data.tar.gz: 269772333b15df5ea60f692ffe06c58c1274dd596e43faf8d247e3dec491188ccd47df6412775118cb7206b2038a6f7a36f0020a42809d4d8fa0f645c7a4b673
|
data/README.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Ruby Client for the Kubernetes Engine API
|
|
2
2
|
|
|
3
|
-
API Client library for the Kubernetes Engine API
|
|
4
|
-
|
|
5
3
|
Builds and manages container-based applications, powered by the open source Kubernetes technology.
|
|
6
4
|
|
|
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-container-v*`.
|
|
9
8
|
The gem `google-cloud-container` is the main client library that brings the
|
|
@@ -18,9 +17,6 @@ themselves can be found in the client library documentation for the versioned
|
|
|
18
17
|
client gems:
|
|
19
18
|
[google-cloud-container-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-container-v1/latest).
|
|
20
19
|
|
|
21
|
-
See also the [Product Documentation](https://cloud.google.com/kubernetes-engine)
|
|
22
|
-
for more usage information.
|
|
23
|
-
|
|
24
20
|
## Quick Start
|
|
25
21
|
|
|
26
22
|
```
|
|
@@ -76,12 +72,10 @@ working, try updating the versioned clients in your bundle or installed gems:
|
|
|
76
72
|
|
|
77
73
|
This library is supported on Ruby 3.2+.
|
|
78
74
|
|
|
79
|
-
Google provides official support for Ruby versions
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
|
84
|
-
support schedule.
|
|
75
|
+
Google provides official support for Ruby versions as described in the
|
|
76
|
+
[Supported Ruby versions](https://docs.cloud.google.com/ruby/getting-started/supported-ruby-versions)
|
|
77
|
+
policy. Older versions of Ruby _may_ still work, but are unsupported and not
|
|
78
|
+
recommended.
|
|
85
79
|
|
|
86
80
|
## Which client should I use?
|
|
87
81
|
|
|
@@ -55,9 +55,11 @@ module Google
|
|
|
55
55
|
# `version` parameter. If the ClusterManager service is
|
|
56
56
|
# supported by that API version, and the corresponding gem is available, the
|
|
57
57
|
# appropriate versioned client will be returned.
|
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
59
|
+
# the `transport` parameter.
|
|
58
60
|
#
|
|
59
61
|
# Raises an exception if the currently installed versioned client gem for the
|
|
60
|
-
# given API version does not support the ClusterManager service.
|
|
62
|
+
# given API version does not support the given transport of the ClusterManager service.
|
|
61
63
|
# You can determine whether the method will succeed by calling
|
|
62
64
|
# {Google::Cloud::Container.cluster_manager_available?}.
|
|
63
65
|
#
|
|
@@ -67,9 +69,10 @@ module Google
|
|
|
67
69
|
#
|
|
68
70
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
69
71
|
# Defaults to `:v1`.
|
|
72
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
70
73
|
# @return [::Object] A client object for the specified version.
|
|
71
74
|
#
|
|
72
|
-
def self.cluster_manager version: :v1, &block
|
|
75
|
+
def self.cluster_manager version: :v1, transport: :grpc, &block
|
|
73
76
|
require "google/cloud/container/#{version.to_s.downcase}"
|
|
74
77
|
|
|
75
78
|
package_name = Google::Cloud::Container
|
|
@@ -77,6 +80,7 @@ module Google
|
|
|
77
80
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
78
81
|
.first
|
|
79
82
|
service_module = Google::Cloud::Container.const_get(package_name).const_get(:ClusterManager)
|
|
83
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
80
84
|
service_module.const_get(:Client).new(&block)
|
|
81
85
|
end
|
|
82
86
|
|
|
@@ -89,9 +93,10 @@ module Google
|
|
|
89
93
|
#
|
|
90
94
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
91
95
|
# Defaults to `:v1`.
|
|
96
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
92
97
|
# @return [boolean] Whether the service is available.
|
|
93
98
|
#
|
|
94
|
-
def self.cluster_manager_available? version: :v1
|
|
99
|
+
def self.cluster_manager_available? version: :v1, transport: :grpc
|
|
95
100
|
require "google/cloud/container/#{version.to_s.downcase}"
|
|
96
101
|
package_name = Google::Cloud::Container
|
|
97
102
|
.constants
|
|
@@ -101,6 +106,10 @@ module Google
|
|
|
101
106
|
service_module = Google::Cloud::Container.const_get package_name
|
|
102
107
|
return false unless service_module.const_defined? :ClusterManager
|
|
103
108
|
service_module = service_module.const_get :ClusterManager
|
|
109
|
+
if transport == :rest
|
|
110
|
+
return false unless service_module.const_defined? :Rest
|
|
111
|
+
service_module = service_module.const_get :Rest
|
|
112
|
+
end
|
|
104
113
|
service_module.const_defined? :Client
|
|
105
114
|
rescue ::LoadError
|
|
106
115
|
false
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-container
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -71,5 +71,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
71
71
|
requirements: []
|
|
72
72
|
rubygems_version: 3.6.9
|
|
73
73
|
specification_version: 4
|
|
74
|
-
summary:
|
|
74
|
+
summary: Builds and manages container-based applications, powered by the open source
|
|
75
|
+
Kubernetes technology.
|
|
75
76
|
test_files: []
|