-
Notifications
You must be signed in to change notification settings - Fork 654
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
grpc-js: Client interceptors #1184
Merged
murgatroid99
merged 19 commits into
grpc:master
from
murgatroid99:grpc-js_client_interceptors
Feb 28, 2020
Merged
grpc-js: Client interceptors #1184
murgatroid99
merged 19 commits into
grpc:master
from
murgatroid99:grpc-js_client_interceptors
Feb 28, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jan 16, 2020
WeiranFang
reviewed
Feb 27, 2020
LGTM for the intercepting logic! |
WeiranFang
approved these changes
Feb 28, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements client interceptors in grpc-js, based primarily on the tests provided with the original client interceptors PR (grpc/grpc#9842) in the
grpc
library, and conforming to the specification gRFC where possible. This commit shows the semantically meaningful changes made to the tests to make them pass with this implementation. In short:When constructing a client or making a call, absent
interceptors
orinterceptor_providers
options are considered equivalent to empty list values of the same options. So, those options are only considered conflicting if each list has at least one element.This implementation does not make the same guarantees as the other with respect to the order in which requester methods are called.
Both implementations are tested against the modified tests.
In addition, any APIs and behaviors not described in the specification document are equivalent only where the tests depend on them.
CC @drobertduke