Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Epic: [api]: add RPC API #32

Open
10 tasks
legomushroom opened this issue Jun 21, 2022 · 1 comment
Open
10 tasks

Epic: [api]: add RPC API #32

legomushroom opened this issue Jun 21, 2022 · 1 comment
Assignees
Labels
API enhancement New feature or request

Comments

@legomushroom
Copy link
Contributor

Add RPC API for the extension that will allow using the extension by other tools as a standalone binary. For instance, a vscode extension could use the RPC API to set up the network bridge for a specified Codesapce and control its logic, like allowed DNS names or IP addresses list. This API also needs to provide a channel for UI notifications to be able to replace the current terminal GUI with a vscode UI completely.

Adding such RPC surface involves:

  • the RPC services to allow for DNS, IP routing control, and app state change notifications.
  • JSON schema for RPC API, which can be used to generate types/helpers for other programming languages.
  • Typescript types/helpers generated out of the JSON schema above to interface with the CLI extension RPC surface.
  • new --rpc-pipe(or similar name) argument for the CLI that will launch the gh net extension as binary in raw mode. Such mode would use the pipe provided to run the RPC server on. The VScode extension will use the pipe for RPC client connection.
  • [TBD] means to get a tunnel to the codespace, can be provided by vscode extension as another pipe, a TCP port or stdio stream.
  • VSCode extension that will use the new RPC API to create the network bridge:
    • automatically get the binaries for the current machine
    • [TBD] provides the way to leverage a tunnel on the existing connection to a Codespace
    • manage the lifecycle of the pipes required for the gh net extension and the lifecycle of gh net extension itself
    • implement UI and network bridge control logic thru the RPC client
@legomushroom legomushroom added enhancement New feature or request API labels Jun 21, 2022
@legomushroom legomushroom self-assigned this Jun 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@legomushroom and others