-
Notifications
You must be signed in to change notification settings - Fork 57
feat(grpc): implement server reflection to discover services#105
Open
diegoQuinas wants to merge 1 commit into
Open
feat(grpc): implement server reflection to discover services #105diegoQuinas wants to merge 1 commit into
diegoQuinas wants to merge 1 commit into
Conversation
Implements the gRPC server reflection that issue berbicanes#103 reports as a stub. Previously reflection.rs returned a hardcoded error and reflect_services() was orphaned (never registered as a Tauri command nor called from the UI), so users had to load .proto files by hand. - Implement the bidirectional ServerReflectionInfo streaming call against grpc.reflection.v1 with v1alpha fallback, vendoring reflection.proto - Decode ServerReflectionResponse to gather the FileDescriptorProto set and feed it into the existing DescriptorPool builder (replaces the empty extract_* stubs) - Register a grpc_reflect_services Tauri command and wire a "Reflect" action into grpc-view alongside manual .proto loading - Persist gRPC request state (service, method, body, metadata) to the request YAML so saved gRPC requests reproduce; discovered services stay ephemeral - Refresh the sidebar node after saving so its badge reflects the gRPC protocol Closes berbicanes#103
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.
Closes #103
Summary
.protoloading.extract_*response parsers with a realServerReflectionResponsedecoder feeding the existingDescriptorPoolbuilder.grpc_reflect_servicesTauri command + a Reflect action in the gRPC view.Changes
src-tauri/proto/reflection.protogrpc.reflection.v1(+v1alphafallback) definitionssrc-tauri/build.rs/Cargo.toml/Cargo.locksrc-tauri/src/grpc/reflection.rsServerReflectionInfocall + response decoding (replaces stub error and empty parsers)src-tauri/src/grpc/client.rs/mod.rs/proto_parser.rssrc-tauri/src/commands/grpc.rs/lib.rsgrpc_reflect_servicescommandsrc-tauri/src/models/collection.rs,commands/collection.rs,importer/writer.rssrc/components/grpc/grpc-view.tsx,App.tsx,lib/tauri-api.ts,stores/tab-store.ts,packages/typesDiscovered services are intentionally not persisted — they require a live server, so they are re-fetched via Reflect.
Test plan
cargo checkandcargo fmt --checkpass (apps/desktop/src-tauri)tsc --noEmitandeslint .pass (apps/desktop)