refactor: generalized pb message format and added an App manager#16
Open
Aditya-ds-1806 wants to merge 5 commits intomainfrom
Open
refactor: generalized pb message format and added an App manager#16Aditya-ds-1806 wants to merge 5 commits intomainfrom
Aditya-ds-1806 wants to merge 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements websocket tunneling by refactoring the protocol buffer message structure and introducing a new Message wrapper type. The changes move from a model where Request and Response messages had their own ID fields to a unified Message wrapper with a message_id field that can contain different payload types (Request, Response, or Socket). The PR also refactors app management into a separate package with improved lifecycle management.
Changes:
- Introduced new Message protobuf wrapper with message_id and oneof payload for Request/Response/Socket types
- Removed id fields from Request and Response protobuf messages and renumbered remaining fields
- Refactored app management into internal/server/app package with AppRegistry for centralized app tracking
- Changed WebSocket registration endpoint from /ws to /register
- Implemented channel-based message subscription system for request-response correlation
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 24 comments.
Show a summary per file
| File | Description |
|---|---|
| protos/message.proto | New Message wrapper definition with oneof payload |
| protos/request.proto | Removed id field, renumbered fields |
| protos/response.proto | Removed id field, renumbered fields |
| internal/server/server.go | Refactored to use new app package and message subscription system |
| internal/server/app/appRegistry.go | New global registry for app management with mutex protection |
| internal/server/app/app.go | New app abstraction with channel-based message handling and lifecycle management |
| internal/client/client.go | Updated to use new Message wrapper for protocol communication |
| borepb/*.pb.go | Generated protobuf Go code for new message definitions |
| Makefile | Added -I flag to protoc command for proper import resolution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.