server.go
@@ -230,6 +230,10 @@ //s.publisher.Publish(s.nodes.ToSlice())//publish nodes changed } func (d *DiscoveryServer) AliveNodes() []string { return d.services.nodes.ToSlice() } func (d *DiscoveryServer) PublishMsg(msg string) { d.services.publisher.Publish([]byte(msg)) }