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

Function WithContextDialer

dialoptions.go:498–502  ·  view source on GitHub ↗

WithContextDialer returns a DialOption that sets a dialer to create connections. If FailOnNonTempDialError() is set to true, and an error is returned by f, gRPC checks the error's Temporary() method to decide if it should try to reconnect to the network address. Note that gRPC by default performs n

(f func(context.Context, string) (net.Conn, error))

Source from the content-addressed store, hash-verified

496//
497// [issue 23459]: https://github.com/golang/go/issues/23459
498func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOption {
499 return newFuncDialOption(func(o *dialOptions) {
500 o.copts.Dialer = f
501 })
502}
503
504// WithDialer returns a DialOption that specifies a function to use for dialing
505// network addresses. If FailOnNonTempDialError() is set to true, and an error

Callers 15

makeClientsFunction · 0.92
createTestConnFunction · 0.92
dialOptsMethod · 0.92
TestGRPCLB_BasicMethod · 0.92
TestGRPCLB_WeightedMethod · 0.92
TestGRPCLB_FallbackMethod · 0.92
TestGRPCLB_PickFirstMethod · 0.92

Calls 1

newFuncDialOptionFunction · 0.85