Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Quiet = true
)
Functions ¶
This section is empty.
Types ¶
type Forwarders ¶
type Forwarders struct { Close func() // close the port forwarding Ready func() ([][]portforward.ForwardedPort, error) // block till the forwarding ready Wait func() // block and listen IOStreams close signal }
func FromConfigBytes ¶
func FromConfigBytes(ctx context.Context, options []*Option, kubeconfigBytes []byte) (*Forwarders, error)
FromConfigBytes returns Forwarders from kube config bytes.
func FromConfigPath ¶
func FromConfigPath(ctx context.Context, options []*Option, kubeconfigPath string) (*Forwarders, error)
FromConfigPath returns Forwarders from kube config path.
type Option ¶
type Option struct { LocalPort int // the local port for forwarding RemotePort int // the remote port port for forwarding Namespace string // the k8s namespace metadata PodName string // the k8s pod metadata ServiceName string // the k8s service metadata Source string // the k8s source string, eg: svc/my-nginx-svc po/my-nginx-66b6c48dd5-ttdb2 Timeout time.Duration // returning error in case forwarding not ready after timeout duration }
Click to show internal directories.
Click to hide internal directories.