Merge pull request #948 from Marmelatze/consul_port

consul port label
This commit is contained in:
Fabian Reinartz 2015-07-31 18:35:26 +02:00
commit a5483a43d2

View file

@ -16,6 +16,7 @@ package discovery
import ( import (
"fmt" "fmt"
"net/http" "net/http"
"strconv"
"strings" "strings"
"sync" "sync"
"time" "time"
@ -275,7 +276,7 @@ func (cd *ConsulDiscovery) watchService(srv *consulService, ch chan<- *config.Ta
ConsulNodeLabel: clientmodel.LabelValue(node.Node), ConsulNodeLabel: clientmodel.LabelValue(node.Node),
ConsulTagsLabel: clientmodel.LabelValue(tags), ConsulTagsLabel: clientmodel.LabelValue(tags),
ConsulServiceAddressLabel: clientmodel.LabelValue(node.ServiceAddress), ConsulServiceAddressLabel: clientmodel.LabelValue(node.ServiceAddress),
ConsulServicePortLabel: clientmodel.LabelValue(node.ServicePort), ConsulServicePortLabel: clientmodel.LabelValue(strconv.Itoa(node.ServicePort)),
}) })
} }