forwarder

package
v0.1.89 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 11 Imported by: ? 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 GetRunningKubeAPIServerPod

func GetRunningKubeAPIServerPod(ctx context.Context, kbClient crclient.Client, cpNamespace string) (*corev1.Pod, error)

Types

type PortForwarder

type PortForwarder struct {
	Namespace string
	PodName   string
	Client    kubernetes.Interface
	Config    *restclient.Config
	Out       io.Writer
	ErrOut    io.Writer
	// contains filtered or unexported fields
}

PortForwarder starts port forwarding to a given pod.

func (*PortForwarder) ForwardPorts

func (f *PortForwarder) ForwardPorts(ports []string, stopChan <-chan struct{}) error

ForwardPorts will forward a set of ports from a pod, the stopChan will stop the forwarding when it's closed or receives a struct{}

func (*PortForwarder) GetPorts added in v0.1.86

func (f *PortForwarder) GetPorts() ([]portforward.ForwardedPort, error)

GetPorts returns the locally bound ports after ForwardPorts has been called. Use this to retrieve the actual local port when binding with local port 0.

Jump to

Keyboard shortcuts

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