runtime

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 22 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePorts added in v1.18.0

func ValidatePorts(remotePort, localPort string) error

ValidatePorts checks the remote and local ports Start would use; an empty local port means auto-assign.

Types

type Runtime

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

Runtime owns tunnel lifecycle resources (listener, smux session, websocket).

func Start

func Start(opts StartOptions) (*Runtime, error)

Start initializes a TCP tunnel runtime and starts accepting local TCP connections.

func (*Runtime) Cause

func (r *Runtime) Cause() error

Cause returns the first non-nil shutdown cause, if any.

func (*Runtime) CheckReady

func (r *Runtime) CheckReady() error

CheckReady validates that the tunnel session can open a stream and send metadata. This provides a fast fail signal before running long-lived local commands.

func (*Runtime) Close

func (r *Runtime) Close(cause error)

Close initiates runtime shutdown.

func (*Runtime) Done

func (r *Runtime) Done() <-chan struct{}

Done returns a channel closed when runtime shutdown completes.

func (*Runtime) LocalAddress

func (r *Runtime) LocalAddress() string

LocalAddress returns the resolved localhost bind address.

func (*Runtime) LocalPort

func (r *Runtime) LocalPort() int

LocalPort returns the resolved localhost port.

func (*Runtime) RemoteAddress

func (r *Runtime) RemoteAddress() string

RemoteAddress returns "<serverName>:<remotePort>".

type StartOptions

type StartOptions struct {
	ServerName    string
	LocalPort     string // Use "0" to auto-assign the local port.
	RemotePort    string
	Username      string
	Groupname     string
	Verbose       bool
	WorkSessionID string                // Optional work-session UUID to attach to the tunnel.
	Client        *client.AlpaconClient // Required; WorkSessionID must come from this client's workspace.
}

StartOptions contains user-provided inputs for starting a tunnel runtime.

Jump to

Keyboard shortcuts

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