Contains two applications for managing ports (that have been defined via a JSON file):
- A service which exposes a gRPC interface for persisting and listing ports
- An ingestor which will parse a given JSON file, extract the port information, and call the service to persist the data
go1.20+golangci-lintbuf(and associated plugins for generating code)dockermake
The applications can be started via Docker using:
docker compose upThe gRPC interface will be exposed locally on port 9000 and can be invoked with, for example, grpcui:
grpcui -plaintext localhost:9000The code can be built, linted, and tested using the provided Makefile:
make lint
make test
make buildThe applications get then be started with:
export GRPC_SERVER_ADDRESS="localhost:9000"
export GRPC_REFLECTION_ENABLED="true"
export INGEST_FILEPATH="<path-to-json-file>"
./ports-service
./ports-ingestor- [] Move protobuf code generation into Docker (and remove generated files from source control)