package portforward
import "k8s.io/client-go/tools/portforward"
Package portforward adds support for SSH-like port forwarding from the client's local host to remote containers.
Index ¶
Types ¶
type ForwardedPort ¶
ForwardedPort contains a Local:Remote port pairing.
type PortForwarder ¶
type PortForwarder struct { Ready chan struct{} // contains filtered or unexported fields }
PortForwarder knows how to listen for local connections and forward them to a remote pod via an upgraded HTTP request.
func New ¶
func New(dialer httpstream.Dialer, ports []string, stopChan <-chan struct{}, readyChan chan struct{}, out, errOut io.Writer) (*PortForwarder, error)
New creates a new PortForwarder.
func (*PortForwarder) Close ¶
func (pf *PortForwarder) Close()
func (*PortForwarder) ForwardPorts ¶
func (pf *PortForwarder) ForwardPorts() error
ForwardPorts formats and executes a port forwarding request. The connection will remain open until stopChan is closed.
Source Files ¶
doc.go portforward.go
- Version
- v2.0.0+incompatible
- Published
- Feb 13, 2017
- Platform
- js/wasm
- Imports
- 13 packages
- Last checked
- 4 seconds ago –
Tools for package owners.