GRPC Golang 拨号选项如何使用 WithMaxMsgSize 函数

GRPC Golang dial options how to use the WithMaxMsgSize function

我正在尝试更改 golang 拨号选项以更改其最大消息大小,但无法找到有关如何使用函数 WithMaxMsgSize 更改 receive/send 文件大小的任何示例

方法找到了,只需要在初始化服务器的时候在struct中实现即可

s := grpc.NewServer(grpc.MaxSendMsgSize(1024*1024*50), grpc.MaxRecvMsgSize(1024*1024*50))