1
0
Fork 0

refactor(consulcatalog): new template methods approach.

This commit is contained in:
Fernandez Ludovic 2018-01-01 03:10:17 +01:00 committed by Traefiker
parent 586b5714a7
commit f0a733d6d6
5 changed files with 648 additions and 117 deletions

View file

@ -385,12 +385,12 @@ func getServicePorts(services []*api.CatalogService) []int {
func (p *CatalogProvider) healthyNodes(service string) (catalogUpdate, error) {
health := p.client.Health()
opts := &api.QueryOptions{}
data, _, err := health.Service(service, "", true, opts)
data, _, err := health.Service(service, "", true, &api.QueryOptions{})
if err != nil {
log.WithError(err).Errorf("Failed to fetch details of %s", service)
return catalogUpdate{}, err
}
nodes := fun.Filter(func(node *api.ServiceEntry) bool {
return p.nodeFilter(service, node)
}, data).([]*api.ServiceEntry)