feat(gateway): export WithDialer option for custom gRPC client configuration (#5406)

This commit is contained in:
Kevin Wan
2026-02-06 21:50:50 +08:00
committed by GitHub
parent 9b74b7e09e
commit bdddf1f30c
2 changed files with 4 additions and 3 deletions

View File

@@ -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
}