portforward

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortForward

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

PortForward is a handle represents a port-forward connection.

func New

func New(cfg *rest.Config, localAddress string, localPort uint16, namespace string, name string, port uint16) *PortForward

Create new PortForward handle

func (*PortForward) LocalAddress

func (pfw *PortForward) LocalAddress() string

func (*PortForward) LocalPort

func (pfw *PortForward) LocalPort() uint16

func (*PortForward) Start

func (pfw *PortForward) Start() error

Start port-forwarding; blocks up to 10 seconds, until port-forward is ready, or an error or timeout occurred; Start() may be called only once (even after error); any further call will return an error.

func (*PortForward) Stop

func (pfw *PortForward) Stop()

Stop port-forwarding; calling Stop() on a not yet started or already stopped handle has no effect.

Jump to

Keyboard shortcuts

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