mirror of
https://github.com/openfaas/faas.git
synced 2025-06-11 01:36:47 +00:00
Docs - update with port of gateway
This commit is contained in:
parent
ddca468164
commit
95b438552b
@ -3,16 +3,16 @@
|
|||||||
Asynchronous function calls can be queued up using the following route:
|
Asynchronous function calls can be queued up using the following route:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ curl --data "message" http://gateway/async-function/{function_name}
|
$ curl --data "message" http://gateway:8080/async-function/{function_name}
|
||||||
```
|
```
|
||||||
|
|
||||||
Summary of modes for calling functions via API Gateway:
|
Summary of modes for calling functions via API Gateway:
|
||||||
|
|
||||||
| Mode | Method | URL | Body | Headers | Query string
|
| Mode | Method | URL | Body | Headers | Query string
|
||||||
| -------------|--------|------------------------------------------------|------|--------- |------------------- |
|
| -------------|--------|------------------------------------------------|------|--------- |------------------- |
|
||||||
| Synchronous | POST | http://gateway/function/{function_name} | Yes | Yes | Yes |
|
| Synchronous | POST | http://gateway:8080/function/{function_name} | Yes | Yes | Yes |
|
||||||
| Synchronous | GET | http://gateway/function/{function_name} | Yes | Yes | Yes |
|
| Synchronous | GET | http://gateway:8080/function/{function_name} | Yes | Yes | Yes |
|
||||||
| Asynchronous | POST | http://gateway/async-function/{function_name} | Yes | Yes | Yes [#369](https://github.com/openfaas/faas/issues/369) |
|
| Asynchronous | POST | http://gateway:8080/async-function/{function_name} | Yes | Yes | Yes [#369](https://github.com/openfaas/faas/issues/369) |
|
||||||
| Asynchronous | GET | Not supported | - | - | - |
|
| Asynchronous | GET | Not supported | - | - | - |
|
||||||
|
|
||||||
This work was carried out under [PR #131](https://github.com/openfaas/faas/pull/131).
|
This work was carried out under [PR #131](https://github.com/openfaas/faas/pull/131).
|
||||||
@ -61,15 +61,17 @@ $ kubectl -f apply ./faas.async.yml,nats.yml
|
|||||||
Functions do not need to be modified to work asynchronously, just use this alternate route:
|
Functions do not need to be modified to work asynchronously, just use this alternate route:
|
||||||
|
|
||||||
```
|
```
|
||||||
http://gateway/async-function/{function_name}
|
http://gateway:8080/async-function/{function_name}
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want the function to call another function or a different endpoint when it is finished then pass the `X-Callback-Url` header. This is optional.
|
If you want the function to call another function or a different endpoint when it is finished then pass the `X-Callback-Url` header. This is optional.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ curl http://gateway/async-function/{function_name} --data-binary @sample.json -H "X-Callback-Url: http://gateway/function/send2slack"
|
$ curl http://gateway:8080/async-function/{function_name} --data-binary @sample.json -H "X-Callback-Url: http://gateway:8080/function/send2slack"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also use the following site to setup a public endpoint for testing HTTP callbacks: [requestb.in](https://requestb.in)
|
||||||
|
|
||||||
## Extend function timeouts
|
## Extend function timeouts
|
||||||
|
|
||||||
Functions have three timeouts configurable by environmental variables expressed in seconds:
|
Functions have three timeouts configurable by environmental variables expressed in seconds:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user