mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-24 06:28:13 +01:00
Bumps [github.com/docker/go-connections](https://github.com/docker/go-connections) from 0.5.0 to 0.6.0. - [Commits](https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: github.com/docker/go-connections dependency-version: 0.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
24 lines
509 B
Go
24 lines
509 B
Go
package sockets
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
"net/http"
|
|
"time"
|
|
|
|
"github.com/Microsoft/go-winio"
|
|
)
|
|
|
|
func configureNpipeTransport(tr *http.Transport, proto, addr string) error {
|
|
// No need for compression in local communications.
|
|
tr.DisableCompression = true
|
|
tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
|
|
return winio.DialPipeContext(ctx, addr)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func dialPipe(addr string, timeout time.Duration) (net.Conn, error) {
|
|
return winio.DialPipe(addr, &timeout)
|
|
}
|