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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bffaa4bb485e32a6b4bf7695ba7c3c984bdd59549987a59a113eb7e4f9150c0e |
|
MD5 | 2557b2092a4239cb0007615609f0bbe2 |
|
BLAKE2b-256 | b1fcbc8ccf232fe2cfacb47e599779dab5cfc8e02726c72eaad9a83ca05e9c9c |
Close
Hashes for consulservicefinder-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 268c6109ac0ce007e3e1c772c64b524b04bb98d891393ccd3d75f67a36918dc1 |
|
MD5 | 457f7ac036058549d27a59343d60a406 |
|
BLAKE2b-256 | 5abb2049a780ee63b8e758a6797cc61e58a144506df76b02ad7d840299cc7230 |