From fb9a56428fece94e6ce0685dc33f5e3b8f80796b Mon Sep 17 00:00:00 2001 From: "Martin Dekov (VMware)" <mdekov@vmware.com> Date: Wed, 25 Jul 2018 05:29:34 -0700 Subject: [PATCH] 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> --- guide/kong_integration.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/guide/kong_integration.md b/guide/kong_integration.md index 56531b93..99b0b081 100644 --- a/guide/kong_integration.md +++ b/guide/kong_integration.md @@ -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 -- GitLab