Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-micro v4版本 客户端请求超时,,在go-micro怎么配置请求时间 #2689

Open
yz-yz-yz opened this issue Jan 18, 2024 · 1 comment

Comments

@yz-yz-yz
Copy link

func init() {
consulRegistry := consul.NewRegistry(
//指定微服务的ip: 选择注册服务器地址,默认为本机,也可以选择consul集群中的client,建议一个微服务对应一个consul集群的client
registry.Addrs("192.168.5.191:8500"),
)
// Create service
srv := micro.NewService(
micro.Registry(consulRegistry),
)
srv.Init()
MicroClient = srv.Client()

} 这个是初始化客户端 ------------- "id":"go.micro.client","code":408,"detail":"call timeout: context deadline exceeded","status":"Request Timeout"}"

@DunZane
Copy link

DunZane commented Apr 3, 2024

same question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants