mqttfaas

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2018 License: Apache-2.0

README

MQTT FAAS

Build Status Go Report Card

Execute docker functions that are run based on mqtt messages.

Quick Setup


# Download latest docker-compose.yml
wget https://raw.githubusercontent.com/sks/mqttfaas/master/docker-compose.yml

# Start docker container
docker-compose up

Definition of functions

Samples can be found in samples folder

  • Must have a LABEL mqtt_faas
  • Topics of interest for each function should be marked using LABEL mqtt_faas_topic
  • If the mqtt_faas_topic is empty. the function gets all the messages from all topics
  • Topic messages are available to the functions on stdin
  • Topic name is available as environment variable FIRED_BY
  • A Persistant /data directory is available to each function

Development environment

git clone github.com/sks/mqttfaas $GOPATH/src/github.com/sks/mqttfaas
cd $_

# Install Dependency and build binaries
make

# Start the MQTT
docker-compose up -d

Directories

Path Synopsis
cmd
internal
pkg
samples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL