Skip to content

v0.2.1

Compare
Choose a tag to compare
@amenezes amenezes released this 01 Mar 14:24
· 114 commits to master since this release

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 variable DEFAULT_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.