(endpoint string)
| 78 | } |
| 79 | |
| 80 | func newRuntimeClientConn(endpoint string) (*grpc.ClientConn, error) { |
| 81 | addr, dialer, err := criutil.GetAddressAndDialer(endpoint) |
| 82 | if err != nil { |
| 83 | return nil, err |
| 84 | } |
| 85 | |
| 86 | return grpc.NewClient(clientTargetForAddress(addr), |
| 87 | grpc.WithTransportCredentials(insecure.NewCredentials()), |
| 88 | grpc.WithAuthority("localhost"), |
| 89 | grpc.WithContextDialer(dialer), |
| 90 | grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)), |
| 91 | ) |
| 92 | } |
| 93 | |
| 94 | func clientTargetForAddress(addr string) string { |
| 95 | // grpc.NewClient defaults to the DNS resolver. Use the passthrough resolver |
searching dependent graphs…