Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openfaas-faas
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Team Jaz CS 598 CCC Final Project
openfaas-faas
Commits
95b43855
Unverified
Commit
95b43855
authored
7 years ago
by
Alex Ellis
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Docs - update with port of gateway
parent
ddca4681
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
guide/asynchronous.md
+8
-6
8 additions, 6 deletions
guide/asynchronous.md
with
8 additions
and
6 deletions
guide/asynchronous.md
+
8
−
6
View file @
95b43855
...
@@ -3,16 +3,16 @@
...
@@ -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
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment