twz915 commented on a change in pull request #315: [ISSUE #314] support name
server domain
URL: https://github.com/apache/rocketmq-client-go/pull/315#discussion_r359179418
##########
File path: internal/namesrv.go
##########
@@ -125,3 +138,88 @@ func (s *namesrvs) SetCredentials(credentials
primitive.Credentials) {
func (s *namesrvs) AddrList() []string {
return s.srvs
}
+
+// UpdateNameServerAddress will update srvs.
+// docs: https://rocketmq.apache.org/docs/best-practice-namesvr/
+func (s *namesrvs) UpdateNameServerAddress(nameServerDomain, instanceName
string) {
+ if nameServerDomain == "" {
+ nameServerDomain = os.Getenv("NAMESRV_ADDR") // try to get from
environment variable
Review comment:
ok, i'll fix it
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services