Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Commit

Permalink
Switch consul resolver to use ServiceAddress
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Cornies <[email protected]>
  • Loading branch information
acornies committed Aug 23, 2019
1 parent 546fc20 commit ad2dfd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion consul/service_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (sr *Resolver) updateCatalog(dep dependency.Dependency, cs []*dependency.Ca
for _, addr := range cs {
addresses = append(
addresses,
fmt.Sprintf("http://%v:%v", addr.Address, addr.ServicePort),
fmt.Sprintf("http://%v:%v", addr.ServiceAddress, addr.ServicePort),
)
}

Expand Down
7 changes: 4 additions & 3 deletions consul/service_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ func TestWatchWithNewServicesUpdatesCatalog(t *testing.T) {

w.data <- []*dependency.CatalogService{
&dependency.CatalogService{
ServiceName: "test",
Address: "mynewaddress",
ServicePort: 8081,
ServiceName: "test",
Address: "mynewaddress",
ServiceAddress: "mynewaddress",
ServicePort: 8081,
},
}

Expand Down

0 comments on commit ad2dfd6

Please sign in to comment.