func NewDialer(upgrader Upgrader, client *http.Client, method string, url *url.URL) httpstream.Dialer {
	return &dialer{
		client:   client,
		upgrader: upgrader,
		method:   method,
		url:      url,
	}
}
NewDialer will create a dialer that connects to the provided URL and upgrades the connection to SPDY.
package spdy
import (
	"fmt"
	"net/http"
	"net/url"
	"k8s.io/apimachinery/pkg/util/httpstream"
	"k8s.io/apimachinery/pkg/util/httpstream/spdy"
	restclient "k8s.io/client-go/rest"
)
type Upgrader interface {
	NewConnection(resp *http.Response) (httpstream.Connection, error)
}
func RoundTripperFor(config *restclient.Config) (http.RoundTripper, Upgrader, error) {
	tlsConfig, err := restclient.TLSConfigFor(config)
	if err != nil {
		return nil, nil, err
	}
	upgradeRoundTripper := spdy.NewRoundTripper(tlsConfig, true)
	wrapper, err := restclient.HTTPWrappersForConfig(config, upgradeRoundTripper)
	if err != nil {
		return nil, nil, err
	}
	return wrapper, upgradeRoundTripper, nil
}
type dialer struct {
	client   *http.Client
	upgrader Upgrader
	method   string
	url      *url.URL
}
var _ httpstream.Dialer = &dialer{}