-
Notifications
You must be signed in to change notification settings - Fork 3
feat(grpc-nats-micro): bind annotated protobuf services to NATS micro #549
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ee5beef
feat(grpc-nats-micro): bind annotated protobuf services to NATS micro
yordis f06bda6
fix(grpc-nats-micro): keep transport failures matchable and the schem…
yordis 568b5c5
fix(grpc-nats-micro): keep fault details and discovery names faithful…
yordis ab0d9b4
feat(grpc-nats-micro): make binding identifiers unrepresentable when …
yordis 5e70b97
feat(grpc-nats-micro): make an invalid error reply unrepresentable
yordis 4b7f1fd
chore(mise): pin nats-server for the workspace toolchain
yordis 87eccb1
fix(grpc-nats-micro): keep every dispatch path exercised by tests
yordis 02e218c
fix(grpc-nats-micro): make an unregistrable service unrepresentable
yordis 3623887
refactor(grpc-nats-micro): source the conformance server from testcon…
yordis 2082c02
Merge remote-tracking branch 'origin/main' into yordis/wasm-event-sou…
yordis 38203b5
chore(rsworkspace): restore the lockfile entries the merge dropped
yordis da9571c
refactor(grpc-nats-micro): make binding identifiers and error headers…
yordis 15d2ed4
feat(grpc-nats-micro): carry annotated metadata into discovery
yordis 1741d82
fix(grpc-nats-micro): keep the fault-header warning queryable by field
yordis fbd8114
refactor(grpc-nats-micro): drop the unexercised boundary-type rendering
yordis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| edition = "2024"; | ||
|
|
||
| // Reference service for the grpc-nats-micro binding (ADR 0016). It is the | ||
| // conformance fixture the binding's integration tests drive, and a worked | ||
| // example of a protobuf service annotated for NATS micro. It carries no domain | ||
| // meaning. | ||
| package trogonai.grpc_nats_micro.v1; | ||
|
|
||
| import "google/rpc/code.proto"; | ||
| import "google/rpc/status.proto"; | ||
| import "trogon/nats/micro/v1alpha1/options.proto"; | ||
|
|
||
| // EchoService is the reference NATS micro service. The binding derives one | ||
| // endpoint per rpc; success replies carry the response message, faults carry | ||
| // a google.rpc.Status on the micro error channel (ADR 0016 section 3). | ||
| service EchoService { | ||
| option (trogon.nats.micro.v1alpha1.service) = {version: "1.0.0"}; | ||
|
|
||
| // Say returns the request message unchanged. | ||
| rpc Say(SayRequest) returns (SayResponse); | ||
|
|
||
| // Fail always faults, so tests can exercise the google.rpc.Status error | ||
| // channel. The requested code is echoed back as the fault's status code. | ||
| rpc Fail(FailRequest) returns (FailResponse) { | ||
| option (trogon.nats.micro.v1alpha1.method) = { | ||
| metadata: { | ||
| key: "always-faults" | ||
| value: "true" | ||
| } | ||
| }; | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| } | ||
| } | ||
|
|
||
| message SayRequest { | ||
| string message = 1; | ||
| } | ||
|
|
||
| message SayResponse { | ||
| string message = 1; | ||
| } | ||
|
|
||
| message FailRequest { | ||
| // Canonical status code the handler should fault with. | ||
| google.rpc.Code code = 1; | ||
| string message = 2; | ||
| } | ||
|
|
||
| message FailResponse { | ||
| string message = 1; | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.