Add route for async invocation of functions in the kong guide

With this commit i extend the kong docs to add routing for
async invocation of functions.

Signed-off-by: Martin Dekov (VMware) <mdekov@vmware.com>
This commit is contained in:
Martin Dekov (VMware) 2018-07-25 05:29:34 -07:00 committed by Alex Ellis
parent 75f05ca38e
commit fb9a56428f

View File

@ -41,7 +41,7 @@ $ docker service create --name kong-database \
-e "POSTGRES_USER=kong" \
-e "POSTGRES_DB=kong" \
-e "POSTGRES_PASSWORD=secretpassword" \
postgres:9.4
postgres:9.5
```
Now we will use the Kong image to populate default configuration in the Postgres database:
@ -103,6 +103,18 @@ $ curl localhost:8000/function/func_echoit -d 'hello world'
hello world
```
Also enable routing for async invocation of functions
```
$ kong_admin_curl -X POST \
--url http://localhost:8001/apis/ \
--data 'name=async-function' \
--data 'uris=/async-function' \
--data 'upstream_url=http://gateway:8080/async-function'
$ curl localhost:8000/async-function/func_echoit -d 'hello world'
hello world
```
### Require basic authentication
Enable the basic-auth plugin in Kong