This is a simple GRPC application that mocks user database using a simple variable and write services to get a single user or multiple users according to their id.
- Download Code zip.
- Execute
make dock-build
to build the image.. - Execute
sudo docker run -p 9090:9090 -t usermocker
to run the docker file and start the server. - Now the server should be running on port 9090 .
- One can now send request using the client.
- Execute
make build-client
to build the client binary. - To get help regarding client do
./clientBin --help
. - Refer the examples below.
$ ./client -uid <USER_ID>
$ ./client -uids="<USER_ID>,<USER_ID>,<USER_ID>,<USER_ID>"
$ ./client -uids="<USER_ID>,<USER_ID>,<USER_ID>,<USER_ID>" -uid <USER_ID>