go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

grpc timeout setting

Open edison-dev opened this issue 2 years ago • 2 comments
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
}

edison-dev avatar Dec 16 '22 07:12 edison-dev

It's type aliased in zrpc package. You can use it.

kevwan avatar Dec 16 '22 14:12 kevwan

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Dec 17 '23 01:12 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Mar 26 '24 01:03 github-actions[bot]