portforward

package
v0.31.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 26 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdPortForward

func NewCmdPortForward(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

Types

type PortForwardOptions

type PortForwardOptions struct {
	Namespace     string
	PodName       string
	RESTClient    restclient.Interface
	Config        *restclient.Config
	PodClient     corev1client.PodsGetter
	Address       []string
	Ports         []string
	PortForwarder portForwarder
	StopChannel   chan struct{}
	ReadyChannel  chan struct{}
}

PortForwardOptions contains all the options for running the port-forward cli command.

func NewDefaultPortForwardOptions added in v0.30.0

func NewDefaultPortForwardOptions(streams genericiooptions.IOStreams) *PortForwardOptions

func (*PortForwardOptions) Complete

func (o *PortForwardOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

Complete completes all the required options for port-forward cmd.

func (PortForwardOptions) RunPortForward deprecated

func (o PortForwardOptions) RunPortForward() error

Deprecated: Use RunPortForwardContext instead, which allows canceling. RunPortForward implements all the necessary functionality for port-forward cmd.

func (PortForwardOptions) RunPortForwardContext added in v0.30.0

func (o PortForwardOptions) RunPortForwardContext(ctx context.Context) error

RunPortForwardContext implements all the necessary functionality for port-forward cmd. It ends portforwarding when an error is received from the backend, or an os.Interrupt signal is received, or the provided context is done.

func (PortForwardOptions) Validate

func (o PortForwardOptions) Validate() error

Validate validates all the required options for port-forward cmd.

Jump to

Keyboard shortcuts

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