Releases: amenezes/discovery-client
Releases · amenezes/discovery-client
1.0.3
1.0.1
1.0.0
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.1
Changelog
find_service
method now return a dict on format:
{'node': 'a60a5b512b4f', 'address': '127.0.0.1', 'service_id': 'consul', 'service_name': 'consul', 'service_port': 8300}
If more than one instance exists round robin will be set by default, or the method can be changed specifying a different option, for example:
dc.find_service('consul', method='random')
find_services
method returns a list on format:
[{'node': 'a60a5b512b4f-0', 'address': '127.0.0.1', 'service_id': 'consul', 'service_name': 'consul', 'service_port': 8300},{'node': 'a60a5b512b4f-1', 'address': '127.0.0.1', 'service_id': 'consul', 'service_name': 'consul', 'service_port': 8300}]
- the default timeout to reconnect that will be use by method
consul_is_healty
now it's 30 seconds and his value can be changed though the environment variableDEFAULT_TIMEOUT
.
For aioclient
only, now it's necessary create a specific task if you wish reconnect on consul in case of unavailability of service. See the examples related on file README.md or examples folder for more details.