google-cloud-bigtable 1.2.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/CHANGELOG.md +57 -0
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google-cloud-bigtable.rb +30 -27
- data/lib/google/cloud/bigtable.rb +18 -26
- data/lib/google/cloud/bigtable/app_profile.rb +3 -3
- data/lib/google/cloud/bigtable/app_profile/list.rb +6 -4
- data/lib/google/cloud/bigtable/backup.rb +445 -0
- data/lib/google/cloud/bigtable/backup/job.rb +87 -0
- data/lib/google/cloud/bigtable/backup/list.rb +167 -0
- data/lib/google/cloud/bigtable/chunk_processor.rb +1 -1
- data/lib/google/cloud/bigtable/cluster.rb +101 -2
- data/lib/google/cloud/bigtable/cluster/list.rb +2 -2
- data/lib/google/cloud/bigtable/column_family.rb +2 -2
- data/lib/google/cloud/bigtable/column_family_map.rb +11 -11
- data/lib/google/cloud/bigtable/column_range.rb +2 -2
- data/lib/google/cloud/bigtable/credentials.rb +36 -2
- data/lib/google/cloud/bigtable/gc_rule.rb +7 -7
- data/lib/google/cloud/bigtable/instance.rb +6 -6
- data/lib/google/cloud/bigtable/instance/cluster_map.rb +1 -1
- data/lib/google/cloud/bigtable/instance/list.rb +2 -2
- data/lib/google/cloud/bigtable/longrunning_job.rb +13 -2
- data/lib/google/cloud/bigtable/mutation_entry.rb +10 -9
- data/lib/google/cloud/bigtable/mutation_operations.rb +2 -2
- data/lib/google/cloud/bigtable/project.rb +1 -1
- data/lib/google/cloud/bigtable/read_modify_write_rule.rb +2 -2
- data/lib/google/cloud/bigtable/read_operations.rb +2 -2
- data/lib/google/cloud/bigtable/routing_policy.rb +2 -2
- data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_range.rb +2 -2
- data/lib/google/cloud/bigtable/rows_mutator.rb +3 -3
- data/lib/google/cloud/bigtable/rows_reader.rb +10 -10
- data/lib/google/cloud/bigtable/sample_row_key.rb +2 -2
- data/lib/google/cloud/bigtable/service.rb +282 -245
- data/lib/google/cloud/bigtable/table.rb +5 -4
- data/lib/google/cloud/bigtable/table/cluster_state.rb +27 -6
- data/lib/google/cloud/bigtable/table/list.rb +2 -2
- data/lib/google/cloud/bigtable/table/restore_job.rb +117 -0
- data/lib/google/cloud/bigtable/value_range.rb +2 -2
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +16 -94
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +0 -145
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +0 -90
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +0 -208
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +0 -154
- data/lib/google/bigtable/admin/v2/common_pb.rb +0 -30
- data/lib/google/bigtable/admin/v2/instance_pb.rb +0 -74
- data/lib/google/bigtable/admin/v2/table_pb.rb +0 -127
- data/lib/google/bigtable/v2/bigtable_pb.rb +0 -113
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +0 -68
- data/lib/google/bigtable/v2/data_pb.rb +0 -156
- data/lib/google/cloud/bigtable/admin.rb +0 -202
- data/lib/google/cloud/bigtable/admin/credentials.rb +0 -27
- data/lib/google/cloud/bigtable/admin/v2.rb +0 -223
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +0 -1451
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +0 -139
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +0 -1734
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +0 -163
- data/lib/google/cloud/bigtable/admin/v2/credentials.rb +0 -51
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +0 -297
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +0 -587
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +0 -193
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +0 -303
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +0 -64
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +0 -33
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +0 -151
- data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +0 -45
- data/lib/google/cloud/bigtable/v2.rb +0 -146
- data/lib/google/cloud/bigtable/v2/bigtable_client.rb +0 -591
- data/lib/google/cloud/bigtable/v2/bigtable_client_config.json +0 -83
- data/lib/google/cloud/bigtable/v2/credentials.rb +0 -46
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +0 -290
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +0 -493
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +0 -34
- data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +0 -39
@@ -1,202 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
require "google/gax"
|
17
|
-
require "pathname"
|
18
|
-
|
19
|
-
module Google
|
20
|
-
module Cloud
|
21
|
-
module Bigtable
|
22
|
-
# rubocop:disable LineLength
|
23
|
-
|
24
|
-
##
|
25
|
-
# # Ruby Client for Cloud Bigtable Admin API
|
26
|
-
#
|
27
|
-
# [Cloud Bigtable Admin API][Product Documentation]:
|
28
|
-
# Administer your Cloud Bigtable tables and instances.
|
29
|
-
# - [Product Documentation][]
|
30
|
-
#
|
31
|
-
# ## Quick Start
|
32
|
-
# In order to use this library, you first need to go through the following
|
33
|
-
# steps:
|
34
|
-
#
|
35
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
36
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
37
|
-
# 3. [Enable the Cloud Bigtable Admin API.](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com)
|
38
|
-
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigtable/latest/file.AUTHENTICATION.html)
|
39
|
-
#
|
40
|
-
# ### Installation
|
41
|
-
# ```
|
42
|
-
# $ gem install google-cloud-bigtable
|
43
|
-
# ```
|
44
|
-
#
|
45
|
-
# ### Next Steps
|
46
|
-
# - Read the [Cloud Bigtable Admin API Product documentation][Product Documentation]
|
47
|
-
# to learn more about the product and see How-to Guides.
|
48
|
-
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
49
|
-
# to see the full list of Cloud APIs that we cover.
|
50
|
-
#
|
51
|
-
# [Product Documentation]: https://cloud.google.com/bigtable-admin
|
52
|
-
#
|
53
|
-
# ## Enabling Logging
|
54
|
-
#
|
55
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
56
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
57
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
58
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
59
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
60
|
-
#
|
61
|
-
# Configuring a Ruby stdlib logger:
|
62
|
-
#
|
63
|
-
# ```ruby
|
64
|
-
# require "logger"
|
65
|
-
#
|
66
|
-
# module MyLogger
|
67
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
68
|
-
# def logger
|
69
|
-
# LOGGER
|
70
|
-
# end
|
71
|
-
# end
|
72
|
-
#
|
73
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
74
|
-
# module GRPC
|
75
|
-
# extend MyLogger
|
76
|
-
# end
|
77
|
-
# ```
|
78
|
-
#
|
79
|
-
module Admin
|
80
|
-
# rubocop:enable LineLength
|
81
|
-
|
82
|
-
FILE_DIR = File.realdirpath(Pathname.new(__FILE__).join("..").join("admin"))
|
83
|
-
|
84
|
-
AVAILABLE_VERSIONS = Dir["#{FILE_DIR}/*"]
|
85
|
-
.select { |file| File.directory?(file) }
|
86
|
-
.select { |dir| Google::Gax::VERSION_MATCHER.match(File.basename(dir)) }
|
87
|
-
.select { |dir| File.exist?(dir + ".rb") }
|
88
|
-
.map { |dir| File.basename(dir) }
|
89
|
-
|
90
|
-
module BigtableInstanceAdmin
|
91
|
-
##
|
92
|
-
# Service for creating, configuring, and deleting Cloud Bigtable Instances and
|
93
|
-
# Clusters. Provides access to the Instance and Cluster schemas only, not the
|
94
|
-
# tables' metadata or data stored in those tables.
|
95
|
-
#
|
96
|
-
# @param version [Symbol, String]
|
97
|
-
# The major version of the service to be used. By default :v2
|
98
|
-
# is used.
|
99
|
-
# @overload new(version:, credentials:, scopes:, client_config:, timeout:)
|
100
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
101
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
102
|
-
# be many types.
|
103
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
104
|
-
# authenticating requests made by this client.
|
105
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
106
|
-
# credentials for this client.
|
107
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
108
|
-
# credentials for this client.
|
109
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
110
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
111
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
112
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
113
|
-
# metadata for requests, generally, to give OAuth credentials.
|
114
|
-
# @param scopes [Array<String>]
|
115
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
116
|
-
# an updater_proc is supplied.
|
117
|
-
# @param client_config [Hash]
|
118
|
-
# A Hash for call options for each method. See
|
119
|
-
# Google::Gax#construct_settings for the structure of
|
120
|
-
# this data. Falls back to the default config if not specified
|
121
|
-
# or the specified config is missing data points.
|
122
|
-
# @param timeout [Numeric]
|
123
|
-
# The default timeout, in seconds, for calls made through this client.
|
124
|
-
# @param metadata [Hash]
|
125
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
126
|
-
# @param exception_transformer [Proc]
|
127
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
128
|
-
# custom error handling.
|
129
|
-
def self.new(*args, version: :v2, **kwargs)
|
130
|
-
unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
|
131
|
-
raise "The version: #{version} is not available. The available versions " \
|
132
|
-
"are: [#{AVAILABLE_VERSIONS.join(", ")}]"
|
133
|
-
end
|
134
|
-
|
135
|
-
require "#{FILE_DIR}/#{version.to_s.downcase}"
|
136
|
-
version_module = Google::Cloud::Bigtable::Admin
|
137
|
-
.constants
|
138
|
-
.select {|sym| sym.to_s.downcase == version.to_s.downcase}
|
139
|
-
.first
|
140
|
-
Google::Cloud::Bigtable::Admin.const_get(version_module)::BigtableInstanceAdmin.new(*args, **kwargs)
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
module BigtableTableAdmin
|
145
|
-
##
|
146
|
-
# Service for creating, configuring, and deleting Cloud Bigtable tables.
|
147
|
-
#
|
148
|
-
#
|
149
|
-
# Provides access to the table schemas only, not the data stored within
|
150
|
-
# the tables.
|
151
|
-
#
|
152
|
-
# @param version [Symbol, String]
|
153
|
-
# The major version of the service to be used. By default :v2
|
154
|
-
# is used.
|
155
|
-
# @overload new(version:, credentials:, scopes:, client_config:, timeout:)
|
156
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
157
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
158
|
-
# be many types.
|
159
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
160
|
-
# authenticating requests made by this client.
|
161
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
162
|
-
# credentials for this client.
|
163
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
164
|
-
# credentials for this client.
|
165
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
166
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
167
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
168
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
169
|
-
# metadata for requests, generally, to give OAuth credentials.
|
170
|
-
# @param scopes [Array<String>]
|
171
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
172
|
-
# an updater_proc is supplied.
|
173
|
-
# @param client_config [Hash]
|
174
|
-
# A Hash for call options for each method. See
|
175
|
-
# Google::Gax#construct_settings for the structure of
|
176
|
-
# this data. Falls back to the default config if not specified
|
177
|
-
# or the specified config is missing data points.
|
178
|
-
# @param timeout [Numeric]
|
179
|
-
# The default timeout, in seconds, for calls made through this client.
|
180
|
-
# @param metadata [Hash]
|
181
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
182
|
-
# @param exception_transformer [Proc]
|
183
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
184
|
-
# custom error handling.
|
185
|
-
def self.new(*args, version: :v2, **kwargs)
|
186
|
-
unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
|
187
|
-
raise "The version: #{version} is not available. The available versions " \
|
188
|
-
"are: [#{AVAILABLE_VERSIONS.join(", ")}]"
|
189
|
-
end
|
190
|
-
|
191
|
-
require "#{FILE_DIR}/#{version.to_s.downcase}"
|
192
|
-
version_module = Google::Cloud::Bigtable::Admin
|
193
|
-
.constants
|
194
|
-
.select {|sym| sym.to_s.downcase == version.to_s.downcase}
|
195
|
-
.first
|
196
|
-
Google::Cloud::Bigtable::Admin.const_get(version_module)::BigtableTableAdmin.new(*args, **kwargs)
|
197
|
-
end
|
198
|
-
end
|
199
|
-
end
|
200
|
-
end
|
201
|
-
end
|
202
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# Copyright 2018 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
require "google/cloud/bigtable/admin/v2/credentials"
|
17
|
-
|
18
|
-
module Google
|
19
|
-
module Cloud
|
20
|
-
module Bigtable
|
21
|
-
module Admin
|
22
|
-
class Credentials < Google::Cloud::Bigtable::Admin::V2::Credentials
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,223 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
require "google/cloud/bigtable/admin/v2/bigtable_instance_admin_client"
|
17
|
-
require "google/cloud/bigtable/admin/v2/bigtable_table_admin_client"
|
18
|
-
require "google/bigtable/admin/v2/bigtable_instance_admin_pb"
|
19
|
-
require "google/bigtable/admin/v2/table_pb"
|
20
|
-
require "google/bigtable/admin/v2/bigtable_table_admin_pb"
|
21
|
-
|
22
|
-
module Google
|
23
|
-
module Cloud
|
24
|
-
module Bigtable
|
25
|
-
module Admin
|
26
|
-
# rubocop:disable LineLength
|
27
|
-
|
28
|
-
##
|
29
|
-
# # Ruby Client for Cloud Bigtable Admin API
|
30
|
-
#
|
31
|
-
# [Cloud Bigtable Admin API][Product Documentation]:
|
32
|
-
# Administer your Cloud Bigtable tables and instances.
|
33
|
-
# - [Product Documentation][]
|
34
|
-
#
|
35
|
-
# ## Quick Start
|
36
|
-
# In order to use this library, you first need to go through the following
|
37
|
-
# steps:
|
38
|
-
#
|
39
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
40
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
41
|
-
# 3. [Enable the Cloud Bigtable Admin API.](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com)
|
42
|
-
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigtable/latest/file.AUTHENTICATION.html)
|
43
|
-
#
|
44
|
-
# ### Installation
|
45
|
-
# ```
|
46
|
-
# $ gem install google-cloud-bigtable
|
47
|
-
# ```
|
48
|
-
#
|
49
|
-
# ### Next Steps
|
50
|
-
# - Read the [Cloud Bigtable Admin API Product documentation][Product Documentation]
|
51
|
-
# to learn more about the product and see How-to Guides.
|
52
|
-
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
53
|
-
# to see the full list of Cloud APIs that we cover.
|
54
|
-
#
|
55
|
-
# [Product Documentation]: https://cloud.google.com/bigtable-admin
|
56
|
-
#
|
57
|
-
# ## Enabling Logging
|
58
|
-
#
|
59
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
60
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
61
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
62
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
63
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
64
|
-
#
|
65
|
-
# Configuring a Ruby stdlib logger:
|
66
|
-
#
|
67
|
-
# ```ruby
|
68
|
-
# require "logger"
|
69
|
-
#
|
70
|
-
# module MyLogger
|
71
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
72
|
-
# def logger
|
73
|
-
# LOGGER
|
74
|
-
# end
|
75
|
-
# end
|
76
|
-
#
|
77
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
78
|
-
# module GRPC
|
79
|
-
# extend MyLogger
|
80
|
-
# end
|
81
|
-
# ```
|
82
|
-
#
|
83
|
-
module V2
|
84
|
-
# rubocop:enable LineLength
|
85
|
-
|
86
|
-
module BigtableInstanceAdmin
|
87
|
-
##
|
88
|
-
# Service for creating, configuring, and deleting Cloud Bigtable Instances and
|
89
|
-
# Clusters. Provides access to the Instance and Cluster schemas only, not the
|
90
|
-
# tables' metadata or data stored in those tables.
|
91
|
-
#
|
92
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
93
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
94
|
-
# be many types.
|
95
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
96
|
-
# authenticating requests made by this client.
|
97
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
98
|
-
# credentials for this client.
|
99
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
100
|
-
# credentials for this client.
|
101
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
102
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
103
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
104
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
105
|
-
# metadata for requests, generally, to give OAuth credentials.
|
106
|
-
# @param scopes [Array<String>]
|
107
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
108
|
-
# an updater_proc is supplied.
|
109
|
-
# @param client_config [Hash]
|
110
|
-
# A Hash for call options for each method. See
|
111
|
-
# Google::Gax#construct_settings for the structure of
|
112
|
-
# this data. Falls back to the default config if not specified
|
113
|
-
# or the specified config is missing data points.
|
114
|
-
# @param timeout [Numeric]
|
115
|
-
# The default timeout, in seconds, for calls made through this client.
|
116
|
-
# @param metadata [Hash]
|
117
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
118
|
-
# @param service_address [String]
|
119
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
120
|
-
# @param service_port [Integer]
|
121
|
-
# Override for the service port, or `nil` to leave as the default.
|
122
|
-
# @param exception_transformer [Proc]
|
123
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
124
|
-
# custom error handling.
|
125
|
-
def self.new \
|
126
|
-
credentials: nil,
|
127
|
-
scopes: nil,
|
128
|
-
client_config: nil,
|
129
|
-
timeout: nil,
|
130
|
-
metadata: nil,
|
131
|
-
service_address: nil,
|
132
|
-
service_port: nil,
|
133
|
-
exception_transformer: nil,
|
134
|
-
lib_name: nil,
|
135
|
-
lib_version: nil
|
136
|
-
kwargs = {
|
137
|
-
credentials: credentials,
|
138
|
-
scopes: scopes,
|
139
|
-
client_config: client_config,
|
140
|
-
timeout: timeout,
|
141
|
-
metadata: metadata,
|
142
|
-
exception_transformer: exception_transformer,
|
143
|
-
lib_name: lib_name,
|
144
|
-
service_address: service_address,
|
145
|
-
service_port: service_port,
|
146
|
-
lib_version: lib_version
|
147
|
-
}.select { |_, v| v != nil }
|
148
|
-
Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdminClient.new(**kwargs)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
module BigtableTableAdmin
|
153
|
-
##
|
154
|
-
# Service for creating, configuring, and deleting Cloud Bigtable tables.
|
155
|
-
#
|
156
|
-
#
|
157
|
-
# Provides access to the table schemas only, not the data stored within
|
158
|
-
# the tables.
|
159
|
-
#
|
160
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
161
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
162
|
-
# be many types.
|
163
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
164
|
-
# authenticating requests made by this client.
|
165
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
166
|
-
# credentials for this client.
|
167
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
168
|
-
# credentials for this client.
|
169
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
170
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
171
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
172
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
173
|
-
# metadata for requests, generally, to give OAuth credentials.
|
174
|
-
# @param scopes [Array<String>]
|
175
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
176
|
-
# an updater_proc is supplied.
|
177
|
-
# @param client_config [Hash]
|
178
|
-
# A Hash for call options for each method. See
|
179
|
-
# Google::Gax#construct_settings for the structure of
|
180
|
-
# this data. Falls back to the default config if not specified
|
181
|
-
# or the specified config is missing data points.
|
182
|
-
# @param timeout [Numeric]
|
183
|
-
# The default timeout, in seconds, for calls made through this client.
|
184
|
-
# @param metadata [Hash]
|
185
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
186
|
-
# @param service_address [String]
|
187
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
188
|
-
# @param service_port [Integer]
|
189
|
-
# Override for the service port, or `nil` to leave as the default.
|
190
|
-
# @param exception_transformer [Proc]
|
191
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
192
|
-
# custom error handling.
|
193
|
-
def self.new \
|
194
|
-
credentials: nil,
|
195
|
-
scopes: nil,
|
196
|
-
client_config: nil,
|
197
|
-
timeout: nil,
|
198
|
-
metadata: nil,
|
199
|
-
service_address: nil,
|
200
|
-
service_port: nil,
|
201
|
-
exception_transformer: nil,
|
202
|
-
lib_name: nil,
|
203
|
-
lib_version: nil
|
204
|
-
kwargs = {
|
205
|
-
credentials: credentials,
|
206
|
-
scopes: scopes,
|
207
|
-
client_config: client_config,
|
208
|
-
timeout: timeout,
|
209
|
-
metadata: metadata,
|
210
|
-
exception_transformer: exception_transformer,
|
211
|
-
lib_name: lib_name,
|
212
|
-
service_address: service_address,
|
213
|
-
service_port: service_port,
|
214
|
-
lib_version: lib_version
|
215
|
-
}.select { |_, v| v != nil }
|
216
|
-
Google::Cloud::Bigtable::Admin::V2::BigtableTableAdminClient.new(**kwargs)
|
217
|
-
end
|
218
|
-
end
|
219
|
-
end
|
220
|
-
end
|
221
|
-
end
|
222
|
-
end
|
223
|
-
end
|