Help us shape the future of Go! Take the 2026 Go Developer Survey

sshtunnel

package
v1.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCommand

func ExecuteCommand(ctx context.Context, opts ExecuteCommandOptions) (*config2.Result, error)

ExecuteCommand runs the command in an SSH Tunnel and returns the result. It uses two PipeBridges: sshBridge connects the helper (agent inject) to the SSH tunnel, and grpcBridge connects the SSH command to the gRPC server.

Types

type AgentInjectFunc

type AgentInjectFunc func(context.Context, string, *os.File, *os.File, io.WriteCloser) error

type ExecuteCommandOptions

type ExecuteCommandOptions struct {
	Client           client2.WorkspaceClient
	AddPrivateKeys   bool
	AgentInject      AgentInjectFunc
	SSHCommand       string
	Command          string
	TunnelServerFunc TunnelServerFunc
}

type TunnelLogStreamer

type TunnelLogStreamer struct {
	// contains filtered or unexported fields
}

func NewTunnelLogStreamer

func NewTunnelLogStreamer() *TunnelLogStreamer

func (*TunnelLogStreamer) Close

func (l *TunnelLogStreamer) Close() error

func (*TunnelLogStreamer) ErrorOutput

func (l *TunnelLogStreamer) ErrorOutput() string

func (*TunnelLogStreamer) Write

func (l *TunnelLogStreamer) Write(p []byte) (int, error)

type TunnelServerFunc

type TunnelServerFunc func(ctx context.Context, stdin io.WriteCloser, stdout io.Reader) (*config2.Result, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL