You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/06/11 10:07:22 UTC

[GitHub] [servicecomb-service-center] zenlint commented on a change in pull request #556: [SCB-1301] Use goroutine to control the startup process

zenlint commented on a change in pull request #556:  [SCB-1301] Use goroutine to control the startup process
URL: https://github.com/apache/servicecomb-service-center/pull/556#discussion_r292377883
 
 

 ##########
 File path: syncer/serf/agent.go
 ##########
 @@ -82,10 +113,23 @@ func (a *Agent) LocalMember() *serf.Member {
 		member := serfAgent.LocalMember()
 		return &member
 	}
-	serfAgent.State()
 	return nil
 }
 
+// GroupMembers returns a point-in-time snapshot of the members of by groupName
+func (a *Agent) GroupMembers(groupName string) (members []serf.Member) {
+	serfAgent := a.Agent.Serf()
+	if serfAgent != nil {
+		for _, member := range serfAgent.Members() {
+			fmt.Println("member: ", member.Tags[tagKeyCluster])
 
 Review comment:
   Change `fmt` to `log` ?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services