portforward

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PickFreePort

func PickFreePort() (port int, err error)

PickFreePort asks the kernel for a free open port that is ready to use.

Types

type PortForward

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

PortForward provides port-forwarding functionality to results api service, so cli users would not bother to open a new terminal and type `kubectrl port-forward` manually

func NewPortForward

func NewPortForward() (*PortForward, error)

NewPortForward create a new PortForward to do port-forwarding staff

func (*PortForward) ForwardPortBackground

func (pf *PortForward) ForwardPortBackground(stopChan <-chan struct{}, port int) error

ForwardPortBackground do port-forwarding in background. stopChan control when port-forwarding stops, port specify which port on localhost port-forwarding will occupy

Jump to

Keyboard shortcuts

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