Update registry so version is surfaced

This commit is contained in:
Asim
2015-11-08 01:48:48 +00:00
parent 4e6d1df9ea
commit 0320fc1b55
12 changed files with 453 additions and 90 deletions

View File

@@ -190,13 +190,14 @@ func (h *httpBroker) Publish(topic string, msg *Message) error {
return err
}
for _, node := range s.Nodes {
r, err := http.Post(fmt.Sprintf("http://%s:%d%s", node.Address, node.Port, DefaultSubPath), "application/json", bytes.NewBuffer(b))
if err == nil {
r.Body.Close()
for _, service := range s {
for _, node := range service.Nodes {
r, err := http.Post(fmt.Sprintf("http://%s:%d%s", node.Address, node.Port, DefaultSubPath), "application/json", bytes.NewBuffer(b))
if err == nil {
r.Body.Close()
}
}
}
return nil
}