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

Method clientConnWithConnControl

test/end2end_test.go:837–851  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

835}
836
837func (te *test) clientConnWithConnControl() (*grpc.ClientConn, *dialerWrapper) {
838 if te.cc != nil {
839 return te.cc, nil
840 }
841 opts, scheme := te.configDial()
842 dw := &dialerWrapper{}
843 // overwrite the dialer before
844 opts = append(opts, grpc.WithDialer(dw.dialer))
845 var err error
846 te.cc, err = grpc.NewClient(scheme+te.srvAddr, opts...)
847 if err != nil {
848 te.t.Fatalf("NewClient(%q) = %v", scheme+te.srvAddr, err)
849 }
850 return te.cc, dw
851}
852
853func (te *test) clientConn(opts ...grpc.DialOption) *grpc.ClientConn {
854 if te.cc != nil {

Calls 4

configDialMethod · 0.95
WithDialerFunction · 0.92
NewClientFunction · 0.92
FatalfMethod · 0.65

Tested by

no test coverage detected