Skip to content
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

Add trailers metadata support in unary response methods #713

Merged

Conversation

TalkingFoxMid
Copy link
Contributor

@TalkingFoxMid TalkingFoxMid commented Mar 7, 2024

Summary

This merge request introduces the capability for servers to send custom metadata (trailers) in responses for unaryToUnary and clientStreaming methods using the fs2.grpc library. Prior to this change, metadata was automatically filled with empty values, with no option for the server to specify or send custom metadata. This enhancement opens up the flexibility for server implementations to include additional information in their responses, providing a richer communication protocol between clients and servers.

Changes

In this Merge Request, the generation of additional traits and objects with the "Trailers" suffix is added, supporting GRPC trailers metadata. In the signature of the newly generated traits, two methods are modified: noStreaming and clientStreaming. This means that, in these two types of GRPC handlers, the server will be able to specify which metadata it wishes to return, and the client will be able to retrieve this metadata

@TalkingFoxMid TalkingFoxMid force-pushed the metadata_trailers_support branch from 3882588 to bb49357 Compare March 7, 2024 12:19
@TalkingFoxMid TalkingFoxMid force-pushed the metadata_trailers_support branch 3 times, most recently from 4392ed0 to 3294a3e Compare March 7, 2024 13:06
@TalkingFoxMid TalkingFoxMid force-pushed the metadata_trailers_support branch from 3294a3e to 75b9ba9 Compare March 12, 2024 11:16
@TalkingFoxMid
Copy link
Contributor Author

@ahjohannessen will check?

@ahjohannessen
Copy link
Collaborator

ahjohannessen commented Apr 5, 2024

I do not have the bandwidth to review currently, unfortunately :/ I can take a look when I find the time.

@a-khakimov
Copy link

Hi @ahjohannessen

We are also interested in this feature. Is there any hope that you will do a review soon?

@ahjohannessen
Copy link
Collaborator

ahjohannessen commented May 29, 2024

@TalkingFoxMid Can you remove the companion object of Fs2GrpcServicePrinter as the constants are now in the abstract printer's companion.

Edit: Nevermind, I'll merge and remove it.

@ahjohannessen ahjohannessen merged commit f44ab26 into typelevel:main May 29, 2024
5 checks passed
@ahjohannessen
Copy link
Collaborator

Did a v2.7.15 release - Should be on sonatype soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants