PhilYue opened a new issue #1584:
URL: https://github.com/apache/dubbo-go/issues/1584
<!-- Please only use this template for submitting enhancement requests -->
**What would you like to be added**:
annotation by LaurenceLiZhixin
```go
// Refer a remote JSON PRC service from registry
func (jp *JsonrpcProtocol) Refer(url *common.URL) protocol.Invoker {
// default requestTimeout
// todo config timeout
requestTimeout := time.Duration(3 * time.Second)
//config.GetConsumerConfig().RequestTimeout
// todo config timeout
requestTimeoutStr := "3s" //url.GetParam(constant.TIMEOUT_KEY,
config.GetConsumerConfig().Request_Timeout)
if t, err := time.ParseDuration(requestTimeoutStr); err == nil {
requestTimeout = t
}
invoker := NewJsonrpcInvoker(url, NewHTTPClient(&HTTPOptions{
HandshakeTimeout: time.Second, // todo config timeout
config.GetConsumerConfig().ConnectTimeout,
HTTPTimeout: requestTimeout,
}))
jp.SetInvokers(invoker)
logger.Infof("[JSONRPC Protocol] Refer service: %s", url.String())
return invoker
}
```
**Why is this needed**:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]