Find service from Consul
Project description
Consul Service Finder
I got a problem when I try to simulate multiple service register on Consul server and the client can find one of the services to use the API.
I can use below URL to get all services but that is not what I want.
curl http://localhost:8500/v1/agent/services
Ideas
* Consul Query to search service by service name
* Count the service be used
* Return min count of services by same service name
Example
csf = ConsulServiceFinder()
# create query by service name
csf.createQueryByServiceName("microweb_microtalk", "q_test")
# find one service and compose it's url
csf.composeServiceUrl(csf.requestOneServiceByServiceName("microweb_microtalk"))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for consulservicefinder-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2024dca523fb25fd07816e7148fd48d96704bd57810fa177d3de274fe3f621af |
|
MD5 | 98f710eb1357199190471c0ee444b106 |
|
BLAKE2b-256 | 8bf9a47a128e90979e7c849ff1299206d452a8d630165c4c0678bd7a958759f8 |
Close
Hashes for consulservicefinder-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b861815739beeaa816b7c7c8f574174c046ffd40585d23d0f98a58a65941bd0a |
|
MD5 | 4bfb4ba81d4dec83e5486205598dfa86 |
|
BLAKE2b-256 | 6dfc7c3b8c59b57ce2ed4b4c8ac26b8304f7717497e63fb050b1e9e587678fe3 |