项目作者: alexking

项目描述 :
Run async OpenFaas functions and receive results back via MQTT
高级语言: JavaScript
项目地址: git://github.com/alexking/mqtt-openfaas-bridge.git
创建时间: 2018-05-15T06:41:15Z
项目社区:https://github.com/alexking/mqtt-openfaas-bridge

开源协议:MIT License

下载


MQTT OpenFaas Bridge

Run async OpenFaas functions and receive results back via MQTT.

To run a function, publish a message
on the topic openfaas/invoke/function-name with a JSON payload.

  1. {
  2. "input": "input for openfaas function",
  3. // Callback parameters will be passed through to the response
  4. "callbackParams": {
  5. "url-encoded": "additional-info"
  6. }
  7. }

You can then listen for results on the openfaas/results/function-name topic.

  1. {
  2. "output": "output from the function",
  3. "params": {
  4. "params": "are passed through"
  5. }
  6. }

You can configure the bridge by setting environmental variables manually or in a .env file. They’re currently documented in the .env.example file.