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 ¶
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 ¶
func RunServices(ctx context.Context, opts RunServicesOptions) error
RunServices forwards the ports for a given workspace and uses its SSH client to run the credentials server remotely and the services server locally to communicate with the container.
Types ¶
type ContainerTunnel ¶
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, 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
type RunServicesOptions ¶ added in v0.12.1
type RunServicesOptions struct {
DevPodConfig *config.Config
ContainerClient *ssh.Client
User string
ForwardPorts bool
ExtraPorts []string
PlatformOptions *devpod.PlatformOptions
Workspace *provider.Workspace
ConfigureDockerCredentials bool
ConfigureGitCredentials bool
ConfigureGitSSHSignatureHelper bool
Log log.Logger
}
RunServicesOptions contains all options for running services.