Use Dial with context

Kubernetes-commit: 5e8e570dbda6ed89af9bc2e0a05e3d94bfdfcb61
This commit is contained in:
Mikhail Mazurskiy
2018-05-19 08:14:37 +10:00
committed by Kubernetes Publisher
parent 4bb327ea2f
commit 4a75b93cb4
7 changed files with 28 additions and 50 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package rest
import (
"context"
"fmt"
"io/ioutil"
"net"
@@ -110,7 +111,7 @@ type Config struct {
Timeout time.Duration
// Dial specifies the dial function for creating unencrypted TCP connections.
Dial func(network, addr string) (net.Conn, error)
Dial func(ctx context.Context, network, address string) (net.Conn, error)
// Version forces a specific version to be used (if registered)
// Do we need this?