Esempio n. 1
0
// Connect returns a handler for the pod portforward proxy
func (r *PortForwardREST) Connect(ctx api.Context, name string, opts runtime.Object) (rest.ConnectHandler, error) {
	location, transport, err := pod.PortForwardLocation(r.store, r.kubeletConn, ctx, name)
	if err != nil {
		return nil, err
	}
	return newUpgradeAwareProxyHandler(location, transport, true), nil
}
Esempio n. 2
0
// Connect returns a handler for the pod portforward proxy
func (r *PortForwardREST) Connect(ctx api.Context, name string, opts runtime.Object, responder rest.Responder) (http.Handler, error) {
	location, transport, err := pod.PortForwardLocation(r.store, r.kubeletConn, ctx, name)
	if err != nil {
		return nil, err
	}
	return newThrottledUpgradeAwareProxyHandler(location, transport, false, true, responder), nil
}