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.
Click to show internal directories.
Click to hide internal directories.