mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 04:06:47 +00:00
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:
parent
75f05ca38e
commit
fb9a56428f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user