MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / dial

Function dial

examples/internal/gateway/gateway.go:39–48  ·  view source on GitHub ↗
(network, addr string)

Source from the content-addressed store, hash-verified

37}
38
39func dial(network, addr string) (*grpc.ClientConn, error) {
40 switch network {
41 case "tcp":
42 return dialTCP(addr)
43 case "unix":
44 return dialUnix(addr)
45 default:
46 return nil, fmt.Errorf("unsupported network type %q", network)
47 }
48}
49
50// dialTCP creates a client connection via TCP.
51// "addr" must be a valid TCP address with a port number.

Callers 1

RunFunction · 0.85

Calls 2

dialTCPFunction · 0.85
dialUnixFunction · 0.85

Tested by

no test coverage detected