1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-04 08:24:28 +00:00

Vendor update

This commit is contained in:
galal-hussein
2017-10-29 11:41:21 +02:00
parent 60574a70bb
commit 84d02e8b42
427 changed files with 76398 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package sockets
import (
"net"
"net/http"
"time"
"github.com/Microsoft/go-winio"
)
func configureUnixTransport(tr *http.Transport, proto, addr string) error {
return ErrProtocolNotAvailable
}
func configureNpipeTransport(tr *http.Transport, proto, addr string) error {
// No need for compression in local communications.
tr.DisableCompression = true
tr.Dial = func(_, _ string) (net.Conn, error) {
return DialPipe(addr, defaultTimeout)
}
return nil
}
// DialPipe connects to a Windows named pipe.
func DialPipe(addr string, timeout time.Duration) (net.Conn, error) {
return winio.DialPipe(addr, &timeout)
}