-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass through options to grpc client creation. #113
Conversation
With toolkit changes, this allows customizing grpc behaviors. See: - googleapis/google-cloud-node#1991 - googleapis/google-cloud-node#1905
lib/grpc.js
Outdated
return new CreateStub(serviceAddress, credentials); | ||
var grpcOptions = {}; | ||
Object.keys(options).forEach(function(key) { | ||
if (key.indexOf('grpc.') == 0) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
lib/grpc.js
Outdated
@@ -148,7 +148,8 @@ GrpcClient.prototype.constructSettings = function constructSettings( | |||
* @param {number} port - The port of the service. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #113 +/- ##
==========================================
+ Coverage 91.08% 92.27% +1.19%
==========================================
Files 11 11
Lines 1279 1282 +3
Branches 257 257
==========================================
+ Hits 1165 1183 +18
+ Misses 114 99 -15
Continue to review full report at Codecov.
|
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One nit.
test/grpc.js
Outdated
combineChannelCredentials: sinon.stub(), | ||
createFromGoogleCredential: sinon.stub() | ||
}}; | ||
var dummyAuth = {authData: 'dummy'}; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
With toolkit changes, this allows customizing grpc behaviors.
See:
updates #107