Discovery-client

Latest version: v1.0.3

Safety actively analyzes 638316 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.2.2

**Changelog**

- new flow to reconnect on Consul in case of unavailability.

0.2.1

**Changelog**

- `find_service` method now return a dict on format:

`txt
{'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:

`python
dc.find_service('consul', method='random')
`

- `find_services` method returns a list on format:

`txt
[{'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](https://github.com/amenezes/discovery-client/blob/master/README.md) or [examples](https://github.com/amenezes/discovery-client/tree/master/examples) folder for more details.

0.1.3

First public release.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.