Documentation
¶
Index ¶
Constants ¶
const AuthHeader = "Coder-IPC-Token"
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ctx context.Context, client *codersdk.Client, agentID uuid.UUID, options *codersdk.DialWorkspaceAgentOptions) (http.Handler, io.Closer, error)
New creates a VS Code IPC client that can be used to communicate with workspaces.
Creating this IPC was required instead of using SSH, because we're unable to get connection information to display in the bottom-bar when using SSH. It's possible we could jank around this (maybe by using a temporary SSH host), but that's not ideal.
This persists a single workspace connection, and lets you execute commands, check for network information, and forward ports.
The VS Code extension is located at https://github.com/coder/vscode-coder. The extension downloads the slim binary from `/bin/*` and executes `coder vscodeipc` which calls this function. This API must maintain backward compatibility with the extension to support prior versions of Coder.