google-cloud-memorystore 1.2.1 → 1.2.2

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: 267be3c45cd75f9b3c3822ae6e20f860d63384483567ae7a48d2d5e912350123
4
- data.tar.gz: c3290d1adb431d6f5d4f9cc0c0363ca8e9ca3f6cf5b5ddabe560235c7b311305
3
+ metadata.gz: 0befa6f011105e1be520825fe5328040b14d6583e4fba3809eb3892453923b42
4
+ data.tar.gz: 34fcd4b148bb21852d8c71fa13f0fab19382bf7121de4a74aa1e1e03f0642c31
5
5
  SHA512:
6
- metadata.gz: bc44fbc643bcea98c97716c0ed63b84816fc9dbf0e4b2e4999e4bf11ea207e1f292225e9555ad05c1345f10f5c73fc9b60d8c9080ae3be5f061e78c2f1eccc2c
7
- data.tar.gz: 6e44d6386450e3d0f65fbac84345f95f35da4843b591bac57a31dc8cc4e54c8fa4d14fa0482abc9fc91a99a2b47d56d007042bc8a8b5a06cdc5bbca9eeb5b168
6
+ metadata.gz: '081ae17aea5c1c8edc0ed0093e80883d5ca4edcc72e4b11bd001c4eee0da5ab8ea9eb441002613e94bb12d21e647320474f876ae07368c0cb9b04663b04c853d'
7
+ data.tar.gz: 9b1906cb0f5a13c697c159ecd897c646e8d8fe664680926dc43f639df93c063e542bef770d252a645a5e7e3a7a937d950a342149cec49f0e3ea2dbf3ac4e49d9
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Ruby Client for the Memorystore API
2
2
 
3
- API Client library for the Memorystore API
3
+ Memorystore for Valkey is a fully managed Valkey service for Google Cloud which supports both Cluster Mode Enabled and Cluster Mode Disabled instances.
4
4
 
5
- google-cloud-memorystore is the official client library for the Memorystore API.
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-memorystore-v*`.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Memorystore
23
- VERSION = "1.2.1"
23
+ VERSION = "1.2.2"
24
24
  end
25
25
  end
26
26
  end
@@ -34,6 +34,7 @@ require "google/cloud/config"
34
34
  config.add_field! :scope, nil, match: [::Array, ::String]
35
35
  config.add_field! :lib_name, nil, match: ::String
36
36
  config.add_field! :lib_version, nil, match: ::String
37
+ config.add_field! :interceptors, nil, match: ::Array
37
38
  config.add_field! :timeout, nil, match: ::Numeric
38
39
  config.add_field! :metadata, nil, match: ::Hash
39
40
  config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
@@ -48,15 +49,17 @@ module Google
48
49
  # Create a new client object for Memorystore.
49
50
  #
50
51
  # By default, this returns an instance of
51
- # [Google::Cloud::Memorystore::V1::Memorystore::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1/latest/Google-Cloud-Memorystore-V1-Memorystore-Rest-Client)
52
- # for a REST client for version V1 of the API.
52
+ # [Google::Cloud::Memorystore::V1::Memorystore::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1/latest/Google-Cloud-Memorystore-V1-Memorystore-Client)
53
+ # for a gRPC client for version V1 of the API.
53
54
  # However, you can specify a different API version by passing it in the
54
55
  # `version` parameter. If the Memorystore service is
55
56
  # supported by that API version, and the corresponding gem is available, the
56
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.
57
60
  #
58
61
  # Raises an exception if the currently installed versioned client gem for the
59
- # given API version does not support the Memorystore service.
62
+ # given API version does not support the given transport of the Memorystore service.
60
63
  # You can determine whether the method will succeed by calling
61
64
  # {Google::Cloud::Memorystore.memorystore_available?}.
62
65
  #
@@ -66,9 +69,10 @@ module Google
66
69
  #
67
70
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
68
71
  # Defaults to `:v1`.
72
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
69
73
  # @return [::Object] A client object for the specified version.
70
74
  #
71
- def self.memorystore version: :v1, &block
75
+ def self.memorystore version: :v1, transport: :grpc, &block
72
76
  require "google/cloud/memorystore/#{version.to_s.downcase}"
73
77
 
74
78
  package_name = Google::Cloud::Memorystore
@@ -76,7 +80,8 @@ module Google
76
80
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
77
81
  .first
78
82
  service_module = Google::Cloud::Memorystore.const_get(package_name).const_get(:Memorystore)
79
- service_module.const_get(:Rest).const_get(:Client).new(&block)
83
+ service_module = service_module.const_get(:Rest) if transport == :rest
84
+ service_module.const_get(:Client).new(&block)
80
85
  end
81
86
 
82
87
  ##
@@ -88,9 +93,10 @@ module Google
88
93
  #
89
94
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
90
95
  # Defaults to `:v1`.
96
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
91
97
  # @return [boolean] Whether the service is available.
92
98
  #
93
- def self.memorystore_available? version: :v1
99
+ def self.memorystore_available? version: :v1, transport: :grpc
94
100
  require "google/cloud/memorystore/#{version.to_s.downcase}"
95
101
  package_name = Google::Cloud::Memorystore
96
102
  .constants
@@ -100,8 +106,10 @@ module Google
100
106
  service_module = Google::Cloud::Memorystore.const_get package_name
101
107
  return false unless service_module.const_defined? :Memorystore
102
108
  service_module = service_module.const_get :Memorystore
103
- return false unless service_module.const_defined? :Rest
104
- service_module = service_module.const_get :Rest
109
+ if transport == :rest
110
+ return false unless service_module.const_defined? :Rest
111
+ service_module = service_module.const_get :Rest
112
+ end
105
113
  service_module.const_defined? :Client
106
114
  rescue ::LoadError
107
115
  false
@@ -119,6 +127,8 @@ module Google
119
127
  # The library name as recorded in instrumentation and logging.
120
128
  # * `lib_version` (*type:* `String`) -
121
129
  # The library version as recorded in instrumentation and logging.
130
+ # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
131
+ # An array of interceptors that are run before calls are executed.
122
132
  # * `timeout` (*type:* `Numeric`) -
123
133
  # Default timeout in seconds.
124
134
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-memorystore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -37,8 +37,8 @@ dependencies:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '1.0'
40
- description: google-cloud-memorystore is the official client library for the Memorystore
41
- API.
40
+ description: Memorystore for Valkey is a fully managed Valkey service for Google Cloud
41
+ which supports both Cluster Mode Enabled and Cluster Mode Disabled instances.
42
42
  email: googleapis-packages@google.com
43
43
  executables: []
44
44
  extensions: []
@@ -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: API Client library for the Memorystore API
74
+ summary: Memorystore for Valkey is a fully managed Valkey service for Google Cloud
75
+ which supports both Cluster Mode Enabled and Cluster Mode Disabled instances.
75
76
  test_files: []