runtime

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
}

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