MCPcopy
hub / github.com/docker/compose / DialEndpoint

Function DialEndpoint

internal/memnet/conn.go:26–34  ·  view source on GitHub ↗
(ctx context.Context, endpoint string)

Source from the content-addressed store, hash-verified

24)
25
26func DialEndpoint(ctx context.Context, endpoint string) (net.Conn, error) {
27 if addr, ok := strings.CutPrefix(endpoint, "unix://"); ok {
28 return Dial(ctx, "unix", addr)
29 }
30 if addr, ok := strings.CutPrefix(endpoint, "npipe://"); ok {
31 return Dial(ctx, "npipe", addr)
32 }
33 return nil, fmt.Errorf("unsupported protocol for address: %s", endpoint)
34}
35
36func Dial(ctx context.Context, network, addr string) (net.Conn, error) {
37 var d net.Dialer

Callers 2

ProxyTransportFunction · 0.92
NewClientFunction · 0.92

Calls 1

DialFunction · 0.85

Tested by

no test coverage detected