add endpoint data for consul registry

This commit is contained in:
Asim
2015-10-11 12:05:20 +01:00
parent ac995ba983
commit fcbd2acdde
3 changed files with 35 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ func (cw *consulWatcher) serviceHandler(idx uint64, data interface{}) {
cs := &Service{}
for _, e := range entries {
cs.Endpoints = decodeEndpoints(e.Service.Tags)
cs.Name = e.Service.Service
cs.Nodes = append(cs.Nodes, &Node{
Id: e.Service.ID,