You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 26, 2023. It is now read-only.
metadataHandler.onTrailers(..) should be called before onClose(..). With the current implementation, I don't think it's possible for ServerStreamingCallables or UnaryCallable#futureCalls() to get the trailers because the trailers are set after the call is closed?
If you want to get the trailer on an event, I guess you can just extend GrpcResponseMetadata, which implements ResponseMetadataHandler.onTrailers()? Or, implement ResponseMetadataHandler.onTrailers() yourself?
But to be fair, I'm not actually familiar with this.
If you want to get the trailer on an event, I guess you can just extend GrpcResponseMetadata, which implements ResponseMetadataHandler.onTrailers()? Or, implement ResponseMetadataHandler.onTrailers() yourself?
But to be fair, I'm not actually familiar with this.
Yes, it shouldn't be hard to get the trailers. I guess I'm proposing this change because I thought GrpcResponseMetadata gives client libraries a nice and easy way to access headers and trailers, so we won't need to implement our own versions of interceptors etc in the client libraries. But with the current implementation I'm not sure how I can get the trailers easily 😢 which defeats the point of providing a ResponeHandler class.
This file contains hidden or 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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cla: yesThis human has signed the Contributor License Agreement.
4 participants
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.
metadataHandler.onTrailers(..)should be called beforeonClose(..). With the current implementation, I don't think it's possible for ServerStreamingCallables or UnaryCallable#futureCalls() to get the trailers because the trailers are set after the call is closed?The comment in the code and test case also only showed synchronized calls for UnaryCallables.
Use a server stream call as an example, the way I'm trying to access the trailer is:
Unless
GrpcResponseMetadatais not intended to be used this way?