The project has 3 services:
┌─────────────────┐
│ │
│ api gateway │
│ │
└────────┬────────┘
▲ │
│ │
│ ▼
┌───────────────┴──────────────────┐
│ │
│ event broker (nsq) │
│ │
└───────┬──────────────┬───────────┘
▲ │ │ ▲
│ │ │ │
│ ▼ ▼ │
┌─────┴─────────┐ ┌───────┴────────┐
│ │ │ │
│ port scanner │ │ port database │
│ │ │ │
└───────────────┘ └────────────────┘
The API gateway has following endpoint exposed
/port/process-file/[filename]
Where filename is name of the file to process.
Required tools:
To build and test binaries type:
make
To build docker images type:
make docker-images
cd iac
docker compose up
Create request to api-gateway to process specified file:
curl http://localhost:8080/port/process-file/ports.json