You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "libra1010 (GitHub)" <gi...@apache.org> on 2020/03/17 06:11:14 UTC

[GitHub] [dubbo-go] libra1010 opened issue #416: 服务暴露,只能通过配置文件吗?

如题,如果我需要暴露N个服务
都需要在配置文件 一个一个的暴露吗?
这样的话,配置文件不会很长吗?

[ Full content available at: https://github.com/apache/dubbo-go/issues/416 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo-go] hetianxia commented on issue #416: 服务暴露,只能通过配置文件吗?

Posted by "hetianxia (GitHub)" <gi...@apache.org>.
@flycash 大明哥,我是回答题主的问题,
func SetProviderConfig(p ProviderConfig) {
	providerConfig = &p
}
在Load() config之前,通过SetProviderConfig 方法,引入其他途径配置的Services & References

[ Full content available at: https://github.com/apache/dubbo-go/issues/416 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo-go] fangyincheng commented on issue #416: 服务暴露,只能通过配置文件吗?

Posted by "fangyincheng (GitHub)" <gi...@apache.org>.
当前是可以通过直接构造 ConsumerConfig  以代码的方式 Load  配置的。

[ Full content available at: https://github.com/apache/dubbo-go/issues/416 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo-go] hetianxia commented on issue #416: 服务暴露,只能通过配置文件吗?

Posted by "hetianxia (GitHub)" <gi...@apache.org>.
get,set 可以替换references & services

[ Full content available at: https://github.com/apache/dubbo-go/issues/416 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org