Overview
Replication log is a distributed systems course homework assignment.
Running the App
tilt up
docker build -f Dockerfile -t node .
docker build -f Dockerfile.test -t test .
docker-compose up
Using the App
curl localhost:8080/ping
curl localhost:8081/ping
curl localhost:8082/ping
curl -X POST -d '{"message":"abc"}' localhost:8080/messages
curl localhost:8080/messages
curl localhost:8081/messages
curl localhost:8082/messages
curl localhost:8080/namespaces
curl -X POST -d '{"message":"local","namespace":"ns"}' localhost:8080/messages
curl 'localhost:8080/messages?namespace=ns'
curl 'localhost:8080/messages?namespace=ns&namespace=default'
curl -X DELETE localhost:8080/namespaces/ns
curl -X POST -d '{"message":"abc","delay":1000}' localhost:8080/messages
Running Tests
docker-compose run test
CONFIG_PATH=$(pwd)/test-local.json go test ./integration
Sources