Hi,

I am back :)

As the `eureka` demo show:

```bash
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
    "uri": "/user/*",
    "upstream": {
        "service_name": "USER-SERVICE",
        "type": "roundrobin",
        "discovery_type": "eureka"
    }
}'
```

So, we can use the `consul_kv` below:

```bash
--- apisix_yaml
routes:
 -
   uri: /*
   upstream:
     service_name: http://127.0.0.1:8500/v1/kv/upstreams/webpages/
     discovery_type: consul_kv
     type: roundrobin
```

And, we don't need to import another `consul_url` or other variable, just use 
`service_name` is ok for most service discovery ways.

> 2021年2月8日 13:00,Li Yang <yan...@apache.org> 写道:
> 
> It sounds like a very useful feature for me.
> 
> My question is how will we configure routes after this feature?
> 
> Is this your planned way of configuring routes?
> 
> --- apisix_yaml
> routes:
>  -
>    uri: /*
>    upstream:
>      service_name: http://127.0.0.1:8500/v1/kv/upstreams/webpages/
>      discovery_type: consul_kv
>      type: roundrobin
> 
> The service_name variable name seems not accurate enough. Can we call
> it consul_uri or something like this?
> 
> 
> On Mon, Feb 8, 2021 at 11:23 AM Zexuan Luo <spacewan...@apache.org> wrote:
>> 
>>> *   doc
>>     *   english
>>     *   chinese
>> 
>> We can only provide the English version of doc.
>> 
>> Zexuan Luo <spacewan...@apache.org> 于2021年2月8日周一 上午10:48写道:
>> 
>>> If you need any help, please let us know.
>>> 
>>> 

Reply via email to