go-zero
go-zero copied to clipboard
grpc timeout setting
trafficstars
I want to set the timeout time of grpc for breakpoint debugging. I found that it can be passed through the ClientOption function. However, the ClientOptions defined in ClientOption is internal and cannot be compiled.
// MustNewClient returns a Client, exits on any error.
func MustNewClient(c RpcClientConf, options ...ClientOption) Client {
cli, err := NewClient(c, options...)
if err != nil {
log.Fatal(err)
}
return cli
}
It's type aliased in zrpc package. You can use it.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.