feat(api): add generic server-side method traits for codegen - #3
Open
sauravzg wants to merge 1 commit into
Open
Conversation
This was referenced Jan 13, 2026
Owner
Author
|
This PR is part of a stack of 13 bookmarks:
Created with jj-stack |
This was referenced Jan 13, 2026
Open
Open
sauravzg
force-pushed
the
method_handler_codegen_api
branch
from
January 21, 2026 22:19
eaceea8 to
17e457a
Compare
sauravzg
force-pushed
the
method_handler_codegen_api
branch
from
February 24, 2026 16:53
17e457a to
775568a
Compare
Introduce the public API traits for server-side gRPC methods (`UnaryMethod`, `ClientStreamingMethod`, `ServerStreamingMethod`, `BidiStreamingMethod`). These traits are designed to be the primary interface for codegen. Currently, the API models a handler as an async function with a (requeststream, responsesink) interface. Note on design: - The public API is scoped to access request and response messages only. - Modifications to headers and trailers are intended to be handled via "interceptor" APIs, following the Java gRPC model. - Contextual information is expected to be accessed via a read-only local context. Known pitfalls: - Unary inputs are references, implying that they will not trivially work with spawns. While responses can be shallow copied due to them being mut refs, requests will have to be copied if they need to be sent to a different task.
sauravzg
force-pushed
the
method_handler_codegen_api
branch
from
March 6, 2026 15:15
775568a to
05cdf87
Compare
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.