tunnelserver

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...Option) *tunnelServer

func NewStreamReader

func NewStreamReader(stream tunnel.Tunnel_StreamWorkspaceClient) io.Reader

func NewStreamWriter

func NewStreamWriter(stream tunnel.Tunnel_StreamWorkspaceServer) io.Writer

func NewTunnelClient

func NewTunnelClient(
	reader io.Reader,
	writer io.WriteCloser,
	exitOnClose bool,
	exitCode int,
) (tunnel.TunnelClient, error)

func RunServicesServer

func RunServicesServer(
	ctx context.Context,
	reader io.Reader,
	writer io.WriteCloser,
	allowGitCredentials, allowDockerCredentials bool,
	forwarder netstat.Forwarder,
	workspace *provider2.Workspace,
	options ...Option,
) error

func RunSetupServer

func RunSetupServer(
	ctx context.Context,
	reader io.Reader,
	writer io.WriteCloser,
	allowGitCredentials, allowDockerCredentials bool,
	mounts []*config.Mount,
	options ...Option,
) (*config.Result, error)

func RunUpServer

func RunUpServer(
	ctx context.Context,
	reader io.Reader,
	writer io.WriteCloser,
	allowGitCredentials, allowDockerCredentials bool,
	workspace *provider2.Workspace,
	options ...Option,
) (*config.Result, error)

Types

type Logger added in v1.1.0

type Logger interface {
	Debugf(format string, args ...any)
	Info(args ...any)
	Infof(format string, args ...any)
	Warnf(format string, args ...any)
}

Logger is the minimal logging interface used by workspace initialization. It is implemented by tunnelLogger, which sends log messages through the tunnel protocol back to the client.

func NewTunnelLogger

func NewTunnelLogger(ctx context.Context, client tunnel.TunnelClient, debug bool) Logger

type Option

type Option func(*tunnelServer) *tunnelServer

func WithAllowDockerCredentials

func WithAllowDockerCredentials(allowDockerCredentials bool) Option

func WithAllowGitCredentials

func WithAllowGitCredentials(allowGitCredentials bool) Option

func WithAllowKubeConfig

func WithAllowKubeConfig(allow bool) Option

func WithForwarder

func WithForwarder(forwarder netstat.Forwarder) Option

func WithMounts

func WithMounts(mounts []*config.Mount) Option

func WithPlatformOptions

func WithPlatformOptions(options *devsy.PlatformOptions) Option

func WithWorkspace

func WithWorkspace(workspace *provider2.Workspace) Option

Jump to

Keyboard shortcuts

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