Last active
February 4, 2020 06:12
-
-
Save ihcsim/f77fafd59c2f0325aa030269bb79c4db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Connect returns a handler for the pod exec proxy | |
| 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 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment