Commit ac0b7b5d authored by Chao Xu's avatar Chao Xu

remove RESTClient.Timeout

parent 0512d459
......@@ -19,7 +19,6 @@ package main
import (
"fmt"
"runtime"
"time"
docker "github.com/fsouza/go-dockerclient"
......@@ -72,9 +71,6 @@ func createClientFromFile(path string) (*client.Client, error) {
if err != nil {
return nil, fmt.Errorf("error while creating client: %v", err)
}
if client.Timeout == 0 {
client.Timeout = 30 * time.Second
}
return client, nil
}
......
......@@ -19,7 +19,6 @@ package unversioned
import (
"net/url"
"strings"
"time"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/runtime"
......@@ -46,10 +45,6 @@ type RESTClient struct {
// used.
Client HTTPClient
// Timeout will be converted to a query parameter and be sent with the request to the API
// server. The API server will fail the request if it does not finish within timeout.
Timeout time.Duration
// TODO extract this into a wrapper interface via the RESTClient interface in kubectl.
Throttle util.RateLimiter
}
......@@ -93,7 +88,7 @@ func (c *RESTClient) Verb(verb string) *Request {
if c.Throttle != nil {
c.Throttle.Accept()
}
return NewRequest(c.Client, verb, c.baseURL, c.apiVersion, c.Codec).Timeout(c.Timeout)
return NewRequest(c.Client, verb, c.baseURL, c.apiVersion, c.Codec)
}
// Post begins a POST request. Short for c.Verb("POST").
......
......@@ -879,9 +879,6 @@ func loadClient() (*client.Client, error) {
if err != nil {
return nil, fmt.Errorf("error creating client: %v", err.Error())
}
if c.Timeout == 0 {
c.Timeout = singleCallTimeout
}
return c, nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment