aggregator
Aggregator service for product API
Install
go mod vendor
Build
go build -o aggregator
Docker Build
docker build . -t dgoldstein1/aggregator
Run
Docker
docker-compose up -d
Locally
export MONGO_URL="mongodb://localhost:27017"
./aggregator
Insert Data
time mongo 127.0.0.1/products docker/mongo/insert_data.js
Sample Requests
curl -s http://localhost:8080/products/13860428 | jq
curl -s http://localhost:8080/products/13860428 \
-XPUT \
-d \
'{"price" : 10.50 }' | jq
curl -s http://localhost:8080/products/13860428 | jq
Metrics
Internal metrics are recorded through prometheus. To visualize metrics, go to http://localhost:3000 and explore metrics dashboards.