Module: Google::Cloud::Bigtable
- Defined in:
- lib/google/cloud/bigtable.rb,
lib/google/cloud/bigtable/v2.rb,
lib/google/cloud/bigtable/row.rb,
lib/google/cloud/bigtable/admin.rb,
lib/google/cloud/bigtable/table.rb,
lib/google/cloud/bigtable/errors.rb,
lib/google/cloud/bigtable/policy.rb,
lib/google/cloud/bigtable/cluster.rb,
lib/google/cloud/bigtable/convert.rb,
lib/google/cloud/bigtable/gc_rule.rb,
lib/google/cloud/bigtable/project.rb,
lib/google/cloud/bigtable/service.rb,
lib/google/cloud/bigtable/version.rb,
lib/google/cloud/bigtable/admin/v2.rb,
lib/google/cloud/bigtable/instance.rb,
lib/google/cloud/bigtable/row_range.rb,
lib/google/cloud/bigtable/row_filter.rb,
lib/google/cloud/bigtable/table/list.rb,
lib/google/cloud/bigtable/app_profile.rb,
lib/google/cloud/bigtable/cluster/job.rb,
lib/google/cloud/bigtable/credentials.rb,
lib/google/cloud/bigtable/rows_reader.rb,
lib/google/cloud/bigtable/value_range.rb,
lib/google/cloud/bigtable/cluster/list.rb,
lib/google/cloud/bigtable/column_range.rb,
lib/google/cloud/bigtable/instance/job.rb,
lib/google/cloud/bigtable/rows_mutator.rb,
lib/google/cloud/bigtable/column_family.rb,
lib/google/cloud/bigtable/instance/list.rb,
lib/google/cloud/bigtable/mutation_entry.rb,
lib/google/cloud/bigtable/sample_row_key.rb,
lib/google/cloud/bigtable/v2/credentials.rb,
lib/google/cloud/bigtable/app_profile/job.rb,
lib/google/cloud/bigtable/chunk_processor.rb,
lib/google/cloud/bigtable/longrunning_job.rb,
lib/google/cloud/bigtable/read_operations.rb,
lib/google/cloud/bigtable/app_profile/list.rb,
lib/google/cloud/bigtable/admin/credentials.rb,
lib/google/cloud/bigtable/v2/bigtable_client.rb,
lib/google/cloud/bigtable/mutation_operations.rb,
lib/google/cloud/bigtable/table/cluster_state.rb,
lib/google/cloud/bigtable/admin/v2/credentials.rb,
lib/google/cloud/bigtable/instance/cluster_map.rb,
lib/google/cloud/bigtable/read_modify_write_rule.rb,
lib/google/cloud/bigtable/row_filter/chain_filter.rb,
lib/google/cloud/bigtable/table/column_family_map.rb,
lib/google/cloud/bigtable/row_filter/simple_filter.rb,
lib/google/cloud/bigtable/row_filter/condition_filter.rb,
lib/google/cloud/bigtable/row_filter/interleave_filter.rb,
lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb,
lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb
Overview
Cloud Bigtable
See Bigtable Overview.
Defined Under Namespace
Modules: Admin, MutationOperations, ReadOperations, RowFilter, V2 Classes: AppProfile, Cluster, ColumnFamily, ColumnRange, Credentials, GcRule, Instance, InvalidRowStateError, LongrunningJob, MutationEntry, Policy, Project, ReadModifyWriteRule, Row, RowFilterError, RowRange, SampleRowKey, Table, ValueRange
Constant Summary collapse
- VERSION =
"0.2.0".freeze
Class Method Summary collapse
-
.configure {|Google::Cloud.configure.bigtable| ... } ⇒ Google::Cloud::Config
Configure the Google Cloud Bigtable library.
-
.new(project_id: nil, credentials: nil, emulator_host: nil, scope: nil, client_config: nil, timeout: nil) ⇒ Google::Cloud::Bigtable::Project
Service for managing Cloud Bigtable instances and tables and for reading from and writing to Bigtable tables.
Class Method Details
.configure {|Google::Cloud.configure.bigtable| ... } ⇒ Google::Cloud::Config
Configure the Google Cloud Bigtable library.
The following Bigtable configuration parameters are supported:
project_id
- (String) Identifier for a Bigtable project. (The parameterproject
is considered deprecated, but may also be used.)credentials
- (String, Hash, Google::Auth::Credentials, GRPC::Core::Channel, GRPC::Core::ChannelCredentials) The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See Credentials) (The parameterkeyfile
is considered deprecated, but may also be used.)scope
- (String, Array) The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. timeout
- (Integer) Default timeout to use in requests.client_config
- (Hash) A hash of values to override the default behavior of the API client.
129 130 131 132 133 |
# File 'lib/google/cloud/bigtable.rb', line 129 def self.configure yield Google::Cloud.configure.bigtable if block_given? Google::Cloud.configure.bigtable end |
.new(project_id: nil, credentials: nil, emulator_host: nil, scope: nil, client_config: nil, timeout: nil) ⇒ Google::Cloud::Bigtable::Project
Service for managing Cloud Bigtable instances and tables and for reading from and writing to Bigtable tables.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/google/cloud/bigtable.rb', line 71 def self.new \ project_id: nil, credentials: nil, emulator_host: nil, scope: nil, client_config: nil, timeout: nil project_id = (project_id || default_project_id).to_s raise ArgumentError, "project_id is required" if project_id.empty? scope ||= configure.scope timeout ||= configure.timeout client_config ||= configure.client_config emulator_host ||= configure.emulator_host if emulator_host return Bigtable::Project.new( Bigtable::Service.new( project_id, :this_channel_is_insecure, host: emulator_host, timeout: timeout, client_config: client_config ) ) end credentials ||= default_credentials(scope: scope) unless credentials.is_a? Google::Auth::Credentials credentials = Bigtable::Credentials.new credentials, scope: scope end service = Bigtable::Service.new( project_id, credentials, timeout: timeout, client_config: client_config ) Bigtable::Project.new(service) end |