google-cloud-memorystore 1.2.0 → 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 +4 -4
- data/README.md +1 -2
- data/lib/google/cloud/memorystore/version.rb +1 -1
- data/lib/google/cloud/memorystore.rb +19 -9
- data/lib/google-cloud-memorystore.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0befa6f011105e1be520825fe5328040b14d6583e4fba3809eb3892453923b42
|
|
4
|
+
data.tar.gz: 34fcd4b148bb21852d8c71fa13f0fab19382bf7121de4a74aa1e1e03f0642c31
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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*`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -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::
|
|
52
|
-
# for a
|
|
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)
|
|
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
|
-
|
|
104
|
-
|
|
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.
|
|
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:
|
|
41
|
-
|
|
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:
|
|
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: []
|