Receive msg related to IOT actions to be executed via google Pub/Sub and handles them.
important This service doesn't create a topic if not exists. Please be sure to create it in GCP. The subscription absence is handled.
{
"action": "Open",
"id": 2
}
This service is able to support the following adapters:
Standard out
: simply prints msg to standard_out.gpio
: interacts with a gpio board (example: Raspberry Pi) The adapter can be configured using the environment variable:ADAPTER_TYPE
-
GOOGLE_APPLICATION_CREDENTIALS
: Path where gcp service account is placed. Here you can find a way to create it. -
GCP_PROJECT_ID
: Name of project id. -
SUBSCRIPTION_NAME
: Name of the subscription to use to listen for msgs. -
TOPIC_NAME
: Name of the topic to use to listen for msgs. -
ACK_TIME_IN_SECONDS
: Ack time to use in seconds by msg broker -
ADAPTER_TYPE
: Adapter type to use to handle messages. Available values are:standard_out
gpio
This repo has a set of pipeline in order to produce artifacts in an automatic way: Docker hub image
- on branch != main an image with tag
dev
is published - on branch == main an image with tag
latest
is pubblished - on tag an image with
tag-name
is published
Perform make cross_build
git checkout master
git tag {your tag}
git push --follow-tags