Skip to content

Commit 1810719

Browse files
burtonralexellis
authored andcommitted
Added triggers page to Reference section
This adds a page to describe the various ways an OpenFaaS function can be triggered. Currently only pointing to various repositories. This will provide way for users to quickly and easily see the ways a function can be invoked Signed-off-by: Burton Rheutan <[email protected]>
1 parent 521ea28 commit 1810719

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

docs/reference/triggers.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Triggers
2+
3+
OpenFaaS functions can be triggered easily by any kind of event. A small piece of code will convert from the event-source and trigger the function using the OpenFaaS Gateway API.
4+
5+
The most common use-case is HTTP which acts as a lingua franca between internet-connected systems.
6+
7+
Looking to trigger a function on a schedule? Have a look at the [Cron page](/reference/cron/) for more information
8+
9+
## HTTP
10+
This is the default, and standard method for interacting with your Functions.
11+
12+
The function URL follows the pattern of:
13+
```
14+
https://<gateway URL>:<port>/function/<function name>
15+
```
16+
17+
> There is also the ability to execute a function asynchronously by replacing `/function/` with `/async-function/` before the function name
18+
19+
## CLI
20+
Trigger a function using the `faas-cli` by using the function name
21+
22+
```
23+
echo "triggered" | faas-cli invoke figlet
24+
```
25+
26+
> CLI invocation can also be async by passing the `-a` flag to the `invoke` call
27+
28+
### Other Event Sources
29+
30+
#### Kafka
31+
Connect your function(s) to Kafka topics
32+
33+
More information in the Incubator repository: [openfaas-incubator/kafka-connector](https://github.com/openfaas-incubator/kafka-connector)
34+
35+
#### AWS SNS
36+
Trigger a function from AWS SNS Notifications and Subscriptions
37+
38+
More information in the repository: [affix/OpenFaaS-SNS](https://github.com/affix/OpenFaaS-SNS)
39+
40+
#### CloudEvents
41+
CloudEvents is a specification for describing event data in a common way. More information on [CloudEvents](https://cloudevents.io/)
42+
43+
Trigger functions from Azure EventGrid with the CloudEvents standard
44+
45+
More information in the repository: [johnmccabe/cloudevents-slack-demo](https://github.com/johnmccabe/cloudevents-slack-demo)
46+
47+
#### RabbitMQ
48+
Invoke functions from RabbitMQ topics
49+
50+
More information in the repository: [Templum/rabbitmq-connector](https://github.com/Templum/rabbitmq-connector)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ pages:
127127
- Auth: ./reference/authentication.md
128128
- CORS: ./reference/cors.md
129129
- Cron: ./reference/cron.md
130+
- Triggers: ./reference/triggers.md
130131
- Design & Architecture:
131132
- Gateway: ./architecture/gateway.md
132133
- Watchdog: ./architecture/watchdog.md

0 commit comments

Comments
 (0)