Nomad¶
The Nomad discovery strategy uses environment variables injected to discover Consul Connect services, thus defined as upstreams to an application.
- class blacksmith.sd._async.adapters.nomad.AsyncNomadDiscovery(service_url_fmt: str = 'http://{nomad_upstream_addr}/{version}', service_env_fmt: str = 'NOMAD_UPSTREAM_ADDR_{service}_{version}', unversioned_service_url_fmt: str = 'http://{nomad_upstream_addr}', unversioned_service_env_fmt: str = 'NOMAD_UPSTREAM_ADDR_{service}')¶
A discovery instance based on Nomad environment variables.
- async get_endpoint(service: str, version: str | None = None) str ¶
Retrieve endpoint using the given parameters from endpoints.