diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..059988f --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +MQTT_BROKER=tcp://mosquitto:1883 +GENERATOR_ID=stream-generator +INGESTION_ID=stream-ingestor +GATEWAY_ADDR=gateway:50051 +PUBLISH_RATE=10 # events/sec +INGESTION_WORKERS=4 +INGESTION_QUEUE_SIZE=1000 \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9e62c2e --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +## help: Show available commands +help: + @echo "" + @echo "Usage: make [target]" + @echo "" + @echo "Available targets:" + @echo " config - Copy environment config from .env.example" + @echo " up - Build and run services with docker" + @echo " down - Shut down services in docker" + @echo " test - Run tests with race detection" + @echo "" + +config: + cp .env.example .env + +test: + go test ./... -race + +up: + docker compose up --build + +down: + docker compose down \ No newline at end of file