MCPcopy
hub / github.com/grpc/grpc-go / NewClientConnWithContext

Function NewClientConnWithContext

benchmark/benchmark.go:343–349  ·  view source on GitHub ↗

NewClientConnWithContext creates a gRPC client connection to addr using ctx.

(_ context.Context, addr string, opts ...grpc.DialOption)

Source from the content-addressed store, hash-verified

341
342// NewClientConnWithContext creates a gRPC client connection to addr using ctx.
343func NewClientConnWithContext(_ context.Context, addr string, opts ...grpc.DialOption) *grpc.ClientConn {
344 conn, err := grpc.NewClient(addr, opts...)
345 if err != nil {
346 logger.Fatalf("grpc.NewClient(%q) = %v", addr, err)
347 }
348 return conn
349}

Callers 2

buildConnectionsFunction · 0.92
NewClientConnFunction · 0.85

Calls 2

NewClientFunction · 0.92
FatalfMethod · 0.65

Tested by

no test coverage detected