Add streaming command execution & port forwarding

Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
This commit is contained in:
Andy Goldstein
2015-01-08 15:41:38 -05:00
parent 25d38c175b
commit 5bd0e9ab05
45 changed files with 4439 additions and 157 deletions

View File

@@ -119,8 +119,8 @@ func waitForPodSuccess(c *client.Client, podName string, contName string, tryFor
return fmt.Errorf("Gave up waiting for pod %q status to be success or failure after %d seconds", podName, trySecs)
}
func loadClient() (*client.Client, error) {
config := client.Config{
func loadConfig() (*client.Config, error) {
config := &client.Config{
Host: testContext.host,
}
info, err := clientauth.LoadFromFile(testContext.authConfig)
@@ -134,11 +134,16 @@ func loadClient() (*client.Client, error) {
info.CertFile = filepath.Join(testContext.certDir, "kubecfg.crt")
info.KeyFile = filepath.Join(testContext.certDir, "kubecfg.key")
}
config, err = info.MergeWithConfig(config)
mergedConfig, err := info.MergeWithConfig(*config)
return &mergedConfig, err
}
func loadClient() (*client.Client, error) {
config, err := loadConfig()
if err != nil {
return nil, fmt.Errorf("Error creating client: %v", err.Error())
}
c, err := client.New(&config)
c, err := client.New(config)
if err != nil {
return nil, fmt.Errorf("Error creating client: %v", err.Error())
}