googleapis / gax-ruby

Google API Extensions for Ruby
https://rubygems.org/gems/google-gax
BSD 3-Clause "New" or "Revised" License
20 stars 22 forks source link

Add channel_args to GRPC::Stub.new #201

Closed blowmage closed 5 years ago

blowmage commented 5 years ago

This PR adds the channel_args argument to GRPC::Stub.new. This argument is used to initialize the GRPC::ClientStub instance. It allows users to control the behavior of the stub object, including setting the size of the maximum request and response messages, which is very useful for services like BigQuery and Pub/Sub.

Gax 1.0 did not have this, so clients were forced to create a GRPC::Core::Channel object using the channel_args argument and pass that in as the credentials argument. Adding the channel_args argument allows clients to pass a Credentials object and still configure the GRPC behavior.

This PR is used in the GAPIC Generator in googleapis/gapic-generator-ruby#150.

codecov[bot] commented 5 years ago

Codecov Report

Merging #201 into master will decrease coverage by 0.01%. The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #201      +/-   ##
==========================================
- Coverage   28.34%   28.33%   -0.02%     
==========================================
  Files          44       44              
  Lines        2565     2566       +1     
==========================================
  Hits          727      727              
- Misses       1838     1839       +1
Impacted Files Coverage Δ
lib/google/gax/grpc/stub.rb 29.16% <25%> (-1.27%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f5c6818...d58080c. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #201 into master will decrease coverage by 0.02%. The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #201      +/-   ##
==========================================
- Coverage   28.34%   28.32%   -0.03%     
==========================================
  Files          44       44              
  Lines        2565     2567       +2     
==========================================
  Hits          727      727              
- Misses       1838     1840       +2
Impacted Files Coverage Δ
lib/google/gax/grpc/stub.rb 28% <20%> (-2.44%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f5c6818...7443708. Read the comment docs.