mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 16:30:01 +08:00
feat(gateway): export WithDialer option for custom gRPC client configuration (#5406)
This commit is contained in:
@@ -329,8 +329,9 @@ func createDescriptorSource(cli zrpc.Client, up Upstream) (grpcurl.DescriptorSou
|
||||
return source, nil
|
||||
}
|
||||
|
||||
// withDialer sets a dialer to create a gRPC client.
|
||||
func withDialer(dialer func(conf zrpc.RpcClientConf) zrpc.Client) func(*Server) {
|
||||
// WithDialer sets a dialer to create a gRPC client.
|
||||
// This allows customization of gRPC client options, such as message size limits.
|
||||
func WithDialer(dialer func(conf zrpc.RpcClientConf) zrpc.Client) func(*Server) {
|
||||
return func(s *Server) {
|
||||
s.dialer = dialer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user