Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwardPod ¶
func ForwardPod(ctx context.Context, cfg *rest.Config, pod *corev1obj.Pod, ports []uint16, fn func(ctx context.Context, m Map) error) (err error)
ForwardPod connects to the given pod on an HTTP-accessible Kubernetes instance, exposing the specified remote TCP ports on the pod locally.
It invokes the given callback function with a map of the remote port number to the allocated local port number. When the callback completes, the connection is torn down.
func ForwardService ¶
func ForwardService(ctx context.Context, cfg *rest.Config, svc *corev1obj.Service, port uint16, fn func(ctx context.Context, port uint16) error) error
ForwardService forwards a single port from a given service on an HTTP-accessible Kubernetes instance. It always picks the first pod that serves as an endpoint for that service and port combination, and otherwise behaves like ForwardPod.
Types ¶
Click to show internal directories.
Click to hide internal directories.