Skip to content

ServiceDiscoveryConfig

Thiago Bustamante edited this page Aug 12, 2017 · 3 revisions

Configure service discovery providers to the gateway. This providers can be used by API's serviceDiscovery routers.

The Configuration has the following properties:

Property Type Description Required
provider MiddlewareConfig[] The Provider middleware configuration. true

Example:

{
    "serviceDiscovery": [
        {
            "provider": {
                "name": "consul",
                "options": {
                    "host": "localhost",
                    "port": 8500,
                    "defaults": {
                        "wait": "3 minutes"
                    } 
                }
            }
        }
    ]
}

or

serviceDiscovery:
    provider:
        - name: consul
            options:
                host: localhost
                port: 8500
                defaults: 
                    wait: 3 minutes

Pre Defined Providers

Tree Gateway provide some serviceDiscovery providers to integrate to common service discovery tools like consul.

Clone this wiki locally