Skip to main content

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

consulservicefinder-0.0.4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

consulservicefinder-0.0.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file consulservicefinder-0.0.4.tar.gz.

File metadata

  • Download URL: consulservicefinder-0.0.4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for consulservicefinder-0.0.4.tar.gz
Algorithm Hash digest
SHA256 bffaa4bb485e32a6b4bf7695ba7c3c984bdd59549987a59a113eb7e4f9150c0e
MD5 2557b2092a4239cb0007615609f0bbe2
BLAKE2b-256 b1fcbc8ccf232fe2cfacb47e599779dab5cfc8e02726c72eaad9a83ca05e9c9c

See more details on using hashes here.

File details

Details for the file consulservicefinder-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: consulservicefinder-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for consulservicefinder-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 268c6109ac0ce007e3e1c772c64b524b04bb98d891393ccd3d75f67a36918dc1
MD5 457f7ac036058549d27a59343d60a406
BLAKE2b-256 5abb2049a780ee63b8e758a6797cc61e58a144506df76b02ad7d840299cc7230

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page