Skip to content

Commit 01cf80a

Browse files
committed
Update event sources
Mentions how to use various event sources / triggers with OpenFaaS and adds caveats where authors have not yet added basic-auth support to their trigger connectors. Signed-off-by: Alex Ellis (VMware) <[email protected]>
1 parent f6983fc commit 01cf80a

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

docs/reference/triggers.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ The most common use-case is HTTP which acts as a lingua franca between internet-
66

77
Looking to trigger a function on a schedule? Have a look at the [Cron page](/reference/cron/) for more information
88

9-
## HTTP
9+
## HTTP / webhooks
10+
1011
This is the default, and standard method for interacting with your Functions.
1112

1213
The function URL follows the pattern of:
@@ -17,6 +18,7 @@ https://<gateway URL>:<port>/function/<function name>
1718
> There is also the ability to execute a function asynchronously by replacing `/function/` with `/async-function/` before the function name
1819
1920
## CLI
21+
2022
Trigger a function using the `faas-cli` by using the function name
2123

2224
```
@@ -27,23 +29,42 @@ echo "triggered" | faas-cli invoke figlet
2729
2830
### Other Event Sources
2931

30-
#### Kafka
32+
#### Apache Kafka
3133

32-
Connect your function(s) to Kafka topics
34+
Connect your function(s) to [Apache Kafka](https://kafka.apache.org) topics.
3335

3436
More information in the Incubator repository: [openfaas-incubator/kafka-connector](https://github.com/openfaas-incubator/kafka-connector)
3537

38+
Support is available for OpenFaaS Gateways using Basic Authentication.
39+
3640
#### AWS SNS
3741

38-
Trigger a function from AWS SNS Notifications and Subscriptions
42+
You can use AWS SNS to trigger functions using AWS SNS Notifications and Subscriptions. This approach can be used to export almost any data-source or event from your Amazon Web Services (AWS) console such as S3 of DynamoDB to an OpenFaaS function.
43+
44+
Find more information in the following repository: [affix/OpenFaaS-SNS](https://github.com/affix/OpenFaaS-SNS)
45+
46+
#### Minio / S3
47+
48+
You can trigger OpenFaaS functions using Minio's webhook or Kafka integration.
49+
50+
* [Minio's webhook integration](https://blog.minio.io/introducing-webhooks-for-minio-e2c3ad26deb2)
51+
* [Minio's Kafka integration](https://docs.minio.io/docs/minio-bucket-notification-guide.html#apache-kafka)
52+
53+
#### IFTTT
3954

40-
More information in the repository: [affix/OpenFaaS-SNS](https://github.com/affix/OpenFaaS-SNS)
55+
You can trigger OpenFaaS functions using webhooks sent via the (if this, then that) service.
56+
57+
An example may be triggering a function which forwards Tweets about your brand or project to a given Slack channel. For this combination use the "Twitter search" Applet and have it trigger the "Make a web request" Applet giving the public URL of your OpenFaaS gateway and the receiver function such as https://gw.my-company.com/function/slack-forwarder
58+
59+
See an example of a function built to forward Tweets from IFTTTT to Slack using Golang: [filter-tweets](https://github.com/openfaas-incubator/social-functions/blob/master/filter-tweets/handler.go).
60+
61+
Visit [ifttt.com](https://ifttt.com) to learn more.
4162

4263
#### CloudEvents
4364

44-
CloudEvents is a specification for describing event data in a common way. More information on [CloudEvents](https://cloudevents.io/)
65+
[CloudEvents](https://cloudevents.io/) is a specification for describing event data in a common way.
4566

46-
Trigger functions from Azure EventGrid with the CloudEvents standard
67+
Follow this example to learn how to trigger functions using the Azure EventGrid and CloudEvents.
4768

4869
More information in the repository: [johnmccabe/cloudevents-slack-demo](https://github.com/johnmccabe/cloudevents-slack-demo)
4970

@@ -53,10 +74,18 @@ Invoke functions using Redis pub/sub and the [Sidekiq model](https://sidekiq.org
5374

5475
View the [sidekiq-connector](https://github.com/affix/sidekiq-connector)
5576

77+
> Note: the Redis connector currently has no support for gateways using Basic Authentication, but [this is being worked on](https://github.com/affix/sidekiq-connector/issues/1) by the author.
78+
5679
#### RabbitMQ (third-party project)
5780

5881
Invoke functions from RabbitMQ topics
5982

6083
More information in the repository: [Templum/rabbitmq-connector](https://github.com/Templum/rabbitmq-connector)
6184

6285
> Note: the RabbitMQ connector currently has no support for gateways using Basic Authentication, but [this is being worked on](https://github.com/Templum/rabbitmq-connector/issues/2) by the author.
86+
87+
88+
#### Add your own event source
89+
90+
If you'd like to add an event source which is not listed below you can fork the OpenFaaS event [connector SDK](https://github.com/openfaas-incubator/connector-sdk) which is written in Go and use this to connect your pub/sub topics or message queues to functions in OpenFaaS.
91+

docs/tutorials/featured.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@
1313

1414
* [Get storage for your Severless Functions with Minio & Docker](https://blog.alexellis.io/openfaas-storage-for-your-functions/)
1515

16+
* [Micro-tutorial for Redis and Node.js](https://gist.github.com/alexellis/e05a7b573ae22b209f0214d5766ff07e)
17+
1618
There are many more great tutorials and events by our community listed in our main [Community file](https://github.com/openfaas/faas/blob/master/community.md).

0 commit comments

Comments
 (0)