google-cloud-bigtable-v2 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5fb75fc501d818ecd5807733a7bfc74a171ce4faa364c396ac877d79d569672
4
- data.tar.gz: 36207f12fa04771251de03294407eab209bee753a0506e42a38d3f3192d19798
3
+ metadata.gz: f9fa234bc4b468a542653487a866f84e3783cbc4f779b295aca972fcc1e78506
4
+ data.tar.gz: db085ca8f0130e79c75021b9474d12dcedf0e1f9e72bb199ce54f3828f1fd334
5
5
  SHA512:
6
- metadata.gz: 753e7151d7ab0b4251b6cbf8563a13633eb79298923e1a070b4a15a68298a12b43bac5a577bdb00dde920d38c66e939c6374b58f0c1ab0bc167fe90553a54f52
7
- data.tar.gz: ec37feca1c7686983e03522dea95d2db2f4687bf660e3cc43e1d7100bf055947ad3ecf71b8ae708f9535c51d1cfce90e52e2c2e0010c9686f35131fd851aa17d
6
+ metadata.gz: 3d5443bce3015996a3dc2a2aafdbefe524b0870806cb3da9b35ce3fa1c3c28bf42c35448f980fca94f0914e2c1f502af9c16babcf60a708714d8ec9223298b5a
7
+ data.tar.gz: f346ca810c1d682b34ca9ea4540a3973e3c45f0a836a6e81ab5e7d0ad828ad77f19d6c03acec78d364b02f9023d1145dd2479cf76cbeddf05f50f26dafe0255a
@@ -80,6 +80,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
80
80
  add_message "google.bigtable.v2.CheckAndMutateRowResponse" do
81
81
  optional :predicate_matched, :bool, 1
82
82
  end
83
+ add_message "google.bigtable.v2.PingAndWarmRequest" do
84
+ optional :name, :string, 1
85
+ optional :app_profile_id, :string, 2
86
+ end
87
+ add_message "google.bigtable.v2.PingAndWarmResponse" do
88
+ end
83
89
  add_message "google.bigtable.v2.ReadModifyWriteRowRequest" do
84
90
  optional :table_name, :string, 1
85
91
  optional :app_profile_id, :string, 4
@@ -109,6 +115,8 @@ module Google
109
115
  MutateRowsResponse::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsResponse.Entry").msgclass
110
116
  CheckAndMutateRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.CheckAndMutateRowRequest").msgclass
111
117
  CheckAndMutateRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.CheckAndMutateRowResponse").msgclass
118
+ PingAndWarmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PingAndWarmRequest").msgclass
119
+ PingAndWarmResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PingAndWarmResponse").msgclass
112
120
  ReadModifyWriteRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRowRequest").msgclass
113
121
  ReadModifyWriteRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRowResponse").msgclass
114
122
  end
@@ -53,6 +53,9 @@ module Google
53
53
  rpc :MutateRows, ::Google::Cloud::Bigtable::V2::MutateRowsRequest, stream(::Google::Cloud::Bigtable::V2::MutateRowsResponse)
54
54
  # Mutates a row atomically based on the output of a predicate Reader filter.
55
55
  rpc :CheckAndMutateRow, ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest, ::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse
56
+ # Warm up associated instance metadata for this connection.
57
+ # This call is not required but may be useful for connection keep-alive.
58
+ rpc :PingAndWarm, ::Google::Cloud::Bigtable::V2::PingAndWarmRequest, ::Google::Cloud::Bigtable::V2::PingAndWarmResponse
56
59
  # Modifies a row atomically on the server. The method reads the latest
57
60
  # existing timestamp and value from the specified columns and writes a new
58
61
  # entry based on pre-defined read/modify/write rules. The new value for the
@@ -65,14 +65,8 @@ module Google
65
65
  default_config = Client::Configuration.new parent_config
66
66
 
67
67
  default_config.rpcs.read_rows.timeout = 43_200.0
68
- default_config.rpcs.read_rows.retry_policy = {
69
- initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
70
- }
71
68
 
72
69
  default_config.rpcs.sample_row_keys.timeout = 60.0
73
- default_config.rpcs.sample_row_keys.retry_policy = {
74
- initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
75
- }
76
70
 
77
71
  default_config.rpcs.mutate_row.timeout = 60.0
78
72
  default_config.rpcs.mutate_row.retry_policy = {
@@ -80,19 +74,10 @@ module Google
80
74
  }
81
75
 
82
76
  default_config.rpcs.mutate_rows.timeout = 600.0
83
- default_config.rpcs.mutate_rows.retry_policy = {
84
- initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
85
- }
86
77
 
87
78
  default_config.rpcs.check_and_mutate_row.timeout = 20.0
88
- default_config.rpcs.check_and_mutate_row.retry_policy = {
89
- initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
90
- }
91
79
 
92
80
  default_config.rpcs.read_modify_write_row.timeout = 20.0
93
- default_config.rpcs.read_modify_write_row.retry_policy = {
94
- initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: []
95
- }
96
81
 
97
82
  default_config
98
83
  end
@@ -702,6 +687,100 @@ module Google
702
687
  raise ::Google::Cloud::Error.from_error(e)
703
688
  end
704
689
 
690
+ ##
691
+ # Warm up associated instance metadata for this connection.
692
+ # This call is not required but may be useful for connection keep-alive.
693
+ #
694
+ # @overload ping_and_warm(request, options = nil)
695
+ # Pass arguments to `ping_and_warm` via a request object, either of type
696
+ # {::Google::Cloud::Bigtable::V2::PingAndWarmRequest} or an equivalent Hash.
697
+ #
698
+ # @param request [::Google::Cloud::Bigtable::V2::PingAndWarmRequest, ::Hash]
699
+ # A request object representing the call parameters. Required. To specify no
700
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
701
+ # @param options [::Gapic::CallOptions, ::Hash]
702
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
703
+ #
704
+ # @overload ping_and_warm(name: nil, app_profile_id: nil)
705
+ # Pass arguments to `ping_and_warm` via keyword arguments. Note that at
706
+ # least one keyword argument is required. To specify no parameters, or to keep all
707
+ # the default parameter values, pass an empty Hash as a request object (see above).
708
+ #
709
+ # @param name [::String]
710
+ # Required. The unique name of the instance to check permissions for as well as
711
+ # respond. Values are of the form `projects/<project>/instances/<instance>`.
712
+ # @param app_profile_id [::String]
713
+ # This value specifies routing for replication. If not specified, the
714
+ # "default" application profile will be used.
715
+ #
716
+ # @yield [response, operation] Access the result along with the RPC operation
717
+ # @yieldparam response [::Google::Cloud::Bigtable::V2::PingAndWarmResponse]
718
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
719
+ #
720
+ # @return [::Google::Cloud::Bigtable::V2::PingAndWarmResponse]
721
+ #
722
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
723
+ #
724
+ # @example Basic example
725
+ # require "google/cloud/bigtable/v2"
726
+ #
727
+ # # Create a client object. The client can be reused for multiple calls.
728
+ # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
729
+ #
730
+ # # Create a request. To set request fields, pass in keyword arguments.
731
+ # request = Google::Cloud::Bigtable::V2::PingAndWarmRequest.new
732
+ #
733
+ # # Call the ping_and_warm method.
734
+ # result = client.ping_and_warm request
735
+ #
736
+ # # The returned object is of type Google::Cloud::Bigtable::V2::PingAndWarmResponse.
737
+ # p result
738
+ #
739
+ def ping_and_warm request, options = nil
740
+ raise ::ArgumentError, "request must be provided" if request.nil?
741
+
742
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::PingAndWarmRequest
743
+
744
+ # Converts hash and nil to an options object
745
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
746
+
747
+ # Customize the options with defaults
748
+ metadata = @config.rpcs.ping_and_warm.metadata.to_h
749
+
750
+ # Set x-goog-api-client and x-goog-user-project headers
751
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
752
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
753
+ gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
754
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
755
+
756
+ header_params = {}
757
+ if request.name &&
758
+ %r{^projects/[^/]+/instances/[^/]+/?$}.match?(request.name)
759
+ header_params["name"] = request.name
760
+ end
761
+ if request.app_profile_id && !request.app_profile_id.empty?
762
+ header_params["app_profile_id"] = request.app_profile_id
763
+ end
764
+
765
+ request_params_header = URI.encode_www_form header_params
766
+ metadata[:"x-goog-request-params"] ||= request_params_header
767
+
768
+ options.apply_defaults timeout: @config.rpcs.ping_and_warm.timeout,
769
+ metadata: metadata,
770
+ retry_policy: @config.rpcs.ping_and_warm.retry_policy
771
+
772
+ options.apply_defaults timeout: @config.timeout,
773
+ metadata: @config.metadata,
774
+ retry_policy: @config.retry_policy
775
+
776
+ @bigtable_stub.call_rpc :ping_and_warm, request, options: options do |response, operation|
777
+ yield response, operation if block_given?
778
+ return response
779
+ end
780
+ rescue ::GRPC::BadStatus => e
781
+ raise ::Google::Cloud::Error.from_error(e)
782
+ end
783
+
705
784
  ##
706
785
  # Modifies a row atomically on the server. The method reads the latest
707
786
  # existing timestamp and value from the specified columns and writes a new
@@ -968,6 +1047,11 @@ module Google
968
1047
  #
969
1048
  attr_reader :check_and_mutate_row
970
1049
  ##
1050
+ # RPC-specific configuration for `ping_and_warm`
1051
+ # @return [::Gapic::Config::Method]
1052
+ #
1053
+ attr_reader :ping_and_warm
1054
+ ##
971
1055
  # RPC-specific configuration for `read_modify_write_row`
972
1056
  # @return [::Gapic::Config::Method]
973
1057
  #
@@ -985,6 +1069,8 @@ module Google
985
1069
  @mutate_rows = ::Gapic::Config::Method.new mutate_rows_config
986
1070
  check_and_mutate_row_config = parent_rpcs.check_and_mutate_row if parent_rpcs.respond_to? :check_and_mutate_row
987
1071
  @check_and_mutate_row = ::Gapic::Config::Method.new check_and_mutate_row_config
1072
+ ping_and_warm_config = parent_rpcs.ping_and_warm if parent_rpcs.respond_to? :ping_and_warm
1073
+ @ping_and_warm = ::Gapic::Config::Method.new ping_and_warm_config
988
1074
  read_modify_write_row_config = parent_rpcs.read_modify_write_row if parent_rpcs.respond_to? :read_modify_write_row
989
1075
  @read_modify_write_row = ::Gapic::Config::Method.new read_modify_write_row_config
990
1076
 
@@ -24,6 +24,23 @@ module Google
24
24
  module Bigtable
25
25
  # Path helper methods for the Bigtable API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified Instance resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/instances/{instance}`
33
+ #
34
+ # @param project [String]
35
+ # @param instance [String]
36
+ #
37
+ # @return [::String]
38
+ def instance_path project:, instance:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/instances/#{instance}"
42
+ end
43
+
27
44
  ##
28
45
  # Create a fully-qualified Table resource string.
29
46
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Bigtable
23
23
  module V2
24
- VERSION = "0.4.0"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -304,6 +304,26 @@ module Google
304
304
  extend ::Google::Protobuf::MessageExts::ClassMethods
305
305
  end
306
306
 
307
+ # Request message for client connection keep-alive and warming.
308
+ # @!attribute [rw] name
309
+ # @return [::String]
310
+ # Required. The unique name of the instance to check permissions for as well as
311
+ # respond. Values are of the form `projects/<project>/instances/<instance>`.
312
+ # @!attribute [rw] app_profile_id
313
+ # @return [::String]
314
+ # This value specifies routing for replication. If not specified, the
315
+ # "default" application profile will be used.
316
+ class PingAndWarmRequest
317
+ include ::Google::Protobuf::MessageExts
318
+ extend ::Google::Protobuf::MessageExts::ClassMethods
319
+ end
320
+
321
+ # Response message for Bigtable.PingAndWarm connection keepalive and warming.
322
+ class PingAndWarmResponse
323
+ include ::Google::Protobuf::MessageExts
324
+ extend ::Google::Protobuf::MessageExts::ClassMethods
325
+ end
326
+
307
327
  # Request message for Bigtable.ReadModifyWriteRow.
308
328
  # @!attribute [rw] table_name
309
329
  # @return [::String]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2022-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common