port_forward

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortForwardDefaultInterface = "127.0.0.1"
	KubeConfigFilename          = "kube-config-pfwd.yaml"
)

Variables

View Source
var (
	ErrNoPods = fmt.Errorf("the selected resource has no pods")

	TerminationSignals = []os.Signal{
		syscall.SIGINT,
		syscall.SIGTERM,
	}
)
View Source
var PortMappingExp = regexp.MustCompile("^(?P<local>[1-9][0-9]*)?(:(?P<remote>[1-9][0-9]*))?$")

Functions

This section is empty.

Types

type PortForwardManager

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

func NewPortForwardManager

func NewPortForwardManager() *PortForwardManager

func (*PortForwardManager) Close

func (m *PortForwardManager) Close()

func (*PortForwardManager) PrepareKubernetesClient

func (m *PortForwardManager) PrepareKubernetesClient() error

func (*PortForwardManager) SelectPod

func (m *PortForwardManager) SelectPod() error

func (*PortForwardManager) Start

func (m *PortForwardManager) Start() error

func (*PortForwardManager) Wait

func (m *PortForwardManager) Wait() error

func (*PortForwardManager) WithEnvironmentResource

func (m *PortForwardManager) WithEnvironmentResource(environmentResource *environment.EnvironmentResource) *PortForwardManager

func (*PortForwardManager) WithEnvironmentWorkspaceDir

func (m *PortForwardManager) WithEnvironmentWorkspaceDir(environmentWorkspaceDir string) *PortForwardManager

func (*PortForwardManager) WithKubeConfigPath

func (m *PortForwardManager) WithKubeConfigPath(kubeConfigPath string) *PortForwardManager

func (*PortForwardManager) WithKubernetesClient

func (m *PortForwardManager) WithKubernetesClient(kubernetesClient *k8s.KubernetesClient) *PortForwardManager

func (*PortForwardManager) WithPod

func (m *PortForwardManager) WithPod(pod *v1.Pod) *PortForwardManager

func (*PortForwardManager) WithPodName

func (m *PortForwardManager) WithPodName(podName string) *PortForwardManager

func (*PortForwardManager) WithPortMappings

func (m *PortForwardManager) WithPortMappings(portMappings []string) *PortForwardManager

Jump to

Keyboard shortcuts

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