code: func (r *ExecREST) Connect(ctx context.Context, name string, opts runtime.Object, responder rest.Responder) (http.Handler, error) {
  	execOpts, ok := opts.(*api.PodExecOptions)
  	if !ok {
  		return nil, fmt.Errorf("invalid options object: %#v", opts)
  	}
  	location, transport, err := pod.ExecLocation(r.Store, r.KubeletConn, ctx, name, execOpts)
  	if err != nil {
  		return nil, err
  	}
  	return newThrottledUpgradeAwareProxyHandler(location, transport, false, true, true, responder), nil
  }
docs: // Connect returns a handler for the pod exec proxy