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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 519cf5ffa1ea007798f442e716840c5df5eed55d15d15aec004e298c06bb82e5 |
|
MD5 | cfb498cc5c3aa1348de7998d1022a7d2 |
|
BLAKE2b-256 | 8b9ac91c1252cec306589b0c203508c66c26cdcb362926381cdb188077690f7b |
Close
Hashes for consulservicefinder-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae14ecb8c305c4e2ac54edbd59f8a3d682577bb711f0a4d0f2e14ddb2fe667c |
|
MD5 | e164933be4774511375684ce7ba3bb02 |
|
BLAKE2b-256 | 6519d7be5c2f20a8485ce2126729061c0dcbe8cf4faa0d379de5a3887184db01 |