portforward

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodPortForwarder

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

PodPortForwarder is used to forward traffic to specific pod's TCP port from local listener.

func NewPodPortForwarder

func NewPodPortForwarder(kubeCfgPath string, namespace, podName string, targetPort uint16) (*PodPortForwarder, error)

NewPodPortForwarder return a new instance of PodPortForwarder.

func (*PodPortForwarder) GetLocalPort

func (pf *PodPortForwarder) GetLocalPort() (uint16, error)

GetLocalPort returns the local listener's port.

func (*PodPortForwarder) Start

func (pf *PodPortForwarder) Start() error

Start is to start local listener to forward traffic.

func (*PodPortForwarder) Stop

func (pf *PodPortForwarder) Stop()

Stop stops port forward.

Jump to

Keyboard shortcuts

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