keijack / python-eureka-client

A eureka client written in python. Support registering your python component to Eureka Server, as well as calling remote services by pulling the the Eureka registry.
MIT License
184 stars 43 forks source link

secureHealthCheckUrl #20

Closed peter254 closed 4 years ago

peter254 commented 4 years ago

Hello, At the moment we are using your library and it works very well! But we are missing one feature - the secureHealthCheckUrl attribute. As far as I understand it, the attribute is read when receiving a service, but I could only find the option to set the normal health check URL.

keijack commented 4 years ago

Hi, @peter254 , You can find the Nodes via this:

application_name="YOUR_SERVICE"
cli = eureka_client.get_discovery_client()
app = cli.applications.get_application(application_name)
for ins in app.instances:
    print(ins.healthCheckUrl)
    # you can also find all the properties in this object like vipAddress/statusPageUrl
# or you can only go through the up instances
for ins in app.up_instances:
    print(ins.healthCheckUrl)
peter254 commented 4 years ago

Hey @keijack I am talking about the Registration, not the discovery - sorry for the misunderstanding

keijack commented 4 years ago

@peter254 sorry for response so late. in v 0.7.3, you can use secure_health_check_url parameter in init method to specify your own secureHealthCheckUrl。