portforward

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 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 RandomLocalPort

func RandomLocalPort() string

Types

type ForwardingSpec

type ForwardingSpec struct {
	LocalHost  string // Defaults to "127.0.0.1" if not specified
	LocalPort  string // Empty if a random port is to be used
	RemoteHost string // Defaults to ""
	RemotePort string // Required, no default
}

func ParseLocal

func ParseLocal(s string) (ForwardingSpec, error)

func (ForwardingSpec) LocalAddr

func (f ForwardingSpec) LocalAddr() string

func (ForwardingSpec) RemoteAddr

func (f ForwardingSpec) RemoteAddr() string

type Tunnel

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

func StartTunnel

func StartTunnel(ctx context.Context, client *api.Client, opts TunnelOptions) (*Tunnel, error)

func (*Tunnel) Forward

func (t *Tunnel) Forward(ctx context.Context, spec ForwardingSpec, errCh chan error) error

func (*Tunnel) MarshalJSON

func (t *Tunnel) MarshalJSON() ([]byte, error)

func (*Tunnel) UnmarshalJSON

func (t *Tunnel) UnmarshalJSON(data []byte) error

type TunnelOptions

type TunnelOptions struct {
	PlayID   string
	Machine  string
	PlaysDir string
	SSHUser  string
	SSHDir   string
}

Jump to

Keyboard shortcuts

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