Documentation ¶
Overview ¶
Package portforwarder provides port forwarding between local and Kubernetes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Set = wire.NewSet( wire.Struct(new(PortForwarder), "*"), wire.Bind(new(Interface), new(*PortForwarder)), )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option struct { Config *rest.Config SourceHost string SourcePort int TargetNamespace string TargetPodName string TargetContainerPort int }
Option represents an option of PortForwarder.
type PortForwarder ¶
type PortForwarder struct { }
func (*PortForwarder) Run ¶
func (pf *PortForwarder) Run(o Option, readyChan chan struct{}, stopChan <-chan struct{}) error
Run executes a port forwarder.
It returns nil if stopChan has been closed or connection has lost. It returns an error if it could not connect to the pod.
It will close the readyChan when the port forwarder is ready. Caller can stop the port forwarder by closing the stopChan.
Directories ¶
Path | Synopsis |
---|---|
Package mock_portforwarder is a generated GoMock package.
|
Package mock_portforwarder is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.