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

grpc: add websocket support #5509

Merged
merged 9 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions addOns/grpc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

### Added
- gRPC WebSocket Support Added

## [0.1.0] - 2024-06-11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@
public class ExtensionGrpcWebSocket extends ExtensionAdaptor {

public static final String NAME = "ExtensionGrpcWebSocket";
private static final List<Class<? extends Extension>> DEPENDENCIES =
List.of(ExtensionGrpc.class, ExtensionWebSocket.class);

public ExtensionGrpcWebSocket() {
super(NAME);
}

private static final List<Class<? extends Extension>> DEPENDENCIES =
List.of(ExtensionGrpc.class, ExtensionWebSocket.class);
public List<Class<? extends Extension>> getDependencies() {
return DEPENDENCIES;
}

@Override
public void hook(ExtensionHook extensionHook) {
super.hook(extensionHook);
if (hasView()) {
HttpPanelManager manager = HttpPanelManager.getInstance();
manager.addRequestViewFactory(WebSocketComponent.NAME, new WebSocketGrpcViewFactory());
Expand All @@ -72,7 +74,7 @@ public String getUIName() {

@Override
public String getDescription() {
return Constant.messages.getString("grpc.desc");
return Constant.messages.getString("grpc.websocket.desc");
}

private static final class WebSocketGrpcViewFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ <h2>See also</h2>
<td><a href="variant.html">gRPC Variant</a></td>
<td>for information about the gRPC variant.</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><a href="websocket.html">gRPC WebSocket</a></td>
<td>for information about the gRPC WebSocket Support.</td>
</tr>

</table>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ <h2>See also</h2>
<td><a href="grpc.html">gRPC</a></td>
<td>for an overview of the gRPC add-on.</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><a href="websocket.html">gRPC WebSocket</a></td>
<td>for information about the gRPC WebSocket Support.</td>
</tr>

</table>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>gRPC WebSocket</TITLE>
</HEAD>
<BODY>
<H1>gRPC WebSocket Support</H1>

The gRPC WebSocket support feature enables the WebSocket add-on to decode and encode gRPC message requests seamlessly. This integration allows users to inspect, modify, and manage gRPC communication over WebSockets.
thc202 marked this conversation as resolved.
Show resolved Hide resolved
<h2>See also</h2>
<table>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><a href="grpc.html">gRPC</a></td>
<td>for an overview of the gRPC add-on.</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><a href="variant.html">gRPC Variant</a></td>
<td>for information about the gRPC variant.</td>
</tr>

</table>

</BODY>
</HTML>
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<index version="2.0">
<indexitem text="grpc" target="addon.grpc" />
<indexitem text="grpc variant" target="addon.grpc.variant" />
<indexitem text="grpc websocket" target="addon.grpc.websocket" />
</index>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
<mapID target="addon.grpc.icon" url="../common/images/grpc.png"/>
<mapID target="addon.grpc" url="contents/grpc.html"/>
<mapID target="addon.grpc.variant" url="contents/variant.html" />
<mapID target="addon.grpc.websocket" url="contents/websocket.html" />
</map>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<tocitem text="Add Ons" tocid="addons">
<tocitem text="gRPC Support" image="addon.grpc.icon" target="addon.grpc">
<tocitem text="Variant" target="addon.grpc.variant"/>
<tocitem text="gRPC WebSocket" target="addon.grpc.websocket"/>
thc202 marked this conversation as resolved.
Show resolved Hide resolved
</tocitem>
</tocitem>
</tocitem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ grpc.encoder.nested.message.missing.braces.error = Invalid Format: Extra or miss
grpc.encoder.nested.message.newline.error = Invalid Format: Nested message must contain a newline immediately after every curly brace
grpc.name = gRPC Support
grpc.panel.view.name = gRPC
grpc.websocket.desc = Provides the WebSocket gRPC view and edit features
grpc.websocket.name = gRPC Websocket Support
Loading