consul.api.discovery_chain module¶
- class consul.api.discovery_chain.DiscoveryChain(agent)[source]¶
Bases:
object- get(service, compile_dc=None, token=None, override_connect_timeout=None, override_protocol=None, override_mesh_gateway_mode=None)[source]¶
Reads the compiled discovery chain for service. Uses POST instead of GET whenever an override is supplied, matching Consul’s documented behavior for passing override parameters in the request body. :param service: The service name to compile the discovery chain for. :param compile_dc: Optional datacenter to use as the basis of compilation. :param token: token with service:read capability :param override_connect_timeout: Optional duration override, e.g. “10s”. :param override_protocol: Optional protocol override, e.g. “http”. :param override_mesh_gateway_mode: Optional mesh gateway Mode override, e.g. “local”. :return: The compiled discovery chain