MCPcopy
hub / github.com/kubernetes/client-go / Close

Method Close

tools/portforward/portforward.go:405–412  ·  view source on GitHub ↗

Close stops all listeners of PortForwarder.

()

Source from the content-addressed store, hash-verified

403
404// Close stops all listeners of PortForwarder.
405func (pf *PortForwarder) Close() {
406 // stop all listeners
407 for _, l := range pf.listeners {
408 if err := l.Close(); err != nil {
409 runtime.HandleError(fmt.Errorf("error closing listener: %v", err))
410 }
411 }
412}
413
414// GetPorts will return the ports that were forwarded; this can be used to
415// retrieve the locally-bound port in cases where the input was port 0. This

Callers 1

ForwardPortsMethod · 0.95

Calls 2

CloseMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected