Documentation ¶
Overview ¶
Package tunnel provides the functions used by the CLI to tunnel into a container using either a tunneled connection from the workspace client (using a machine provider) or a direct SSH connection from the proxy client (Ssh, k8s or docker provider)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTunnel ¶ added in v0.2.0
NewTunnel creates a tunnel to the devcontainer using generic functions to establish the "outer" and "inner" tunnel, used by proxy clients Here the tunnel will be an SSH connection with it's STDIO as arguments and the handler will be the function to execute the command using the connected SSH client.
func RunServices ¶ added in v0.6.8
func RunServices( ctx context.Context, devPodConfig *config.Config, containerClient *ssh.Client, user string, forwardPorts bool, extraPorts []string, gitUsername, gitToken string, workspace *provider.Workspace, log log.Logger, ) error
RunServices forwards the ports for a given workspace and uses it's SSH client to run the credentials server remotely and the services server locally to communicate with the container
Types ¶
type ContainerTunnel ¶ added in v0.6.8
type ContainerTunnel struct {
// contains filtered or unexported fields
}
ContainerTunnel manages the state of the tunnel to the container
func NewContainerTunnel ¶
func NewContainerTunnel(client client.WorkspaceClient, proxy bool, log log.Logger) *ContainerTunnel
NewContainerTunnel constructs a ContainerTunnel using the workspace client, if proxy is True then the workspace's agent config is not periodically updated