Skip to content

ServiceDiscoveryConfig

thiagobustamante edited this page Jul 5, 2017 · 3 revisions

Configure service discovery providers to the gateway. This providers can bs 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