membphis commented on a change in pull request #1281: feature: Support for
using Eureka as a service discovery center
URL: https://github.com/apache/incubator-apisix/pull/1281#discussion_r398584027
##########
File path: lua/apisix/balancer.lua
##########
@@ -230,6 +231,13 @@ local function pick_server(route, ctx)
key = up_conf.type .. "#route_" .. route.value.id
end
+ if up_conf.service_name then
+ if not discovery then
+ return nil, nil, "discovery is uninitialized"
+ end
+ up_conf.nodes = discovery.nodes(up_conf.service_name)
Review comment:
we can store it to `route.dns_value`
you can take a look at:
https://github.com/apache/incubator-apisix/blob/master/lua/apisix/balancer.lua#L202
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services