a fake donut store built using grpc and sqlite
pull the docker container
docker pull ghcr.io/s1ntaxe770r/donut-store:latest
start the service
docker run -p 5050:5050 9052:9052 -d donut-store:latest
to test the service install grpcurl
go install github.com/fullstorydev/grpcurl/cmd/grpcurl
grpcurl -plaintext localhost:5050 DonutShop
sample response
DonutShop.GetDonut
DonutShop.GetDonuts
DonutShop.GetVersion
DonutShop.MakeDonut
grpcurl -plaintext localhost:5050 DonutShop/GetDonuts
sample response
{
"donuts": [
{
"name": "bagel",
"price": 32,
"image": "https://none.com/bagel",
"id": "1"
},
{
"name": "glazed donut",
"price": 32,
"image": "https://none.com/bagel",
"id": "3"
},
]
}
grpcurl -d '{"name":"bagel"}' -plaintext localhost:5050 DonutShop/GetDonut
sample response
{
"name": "bagel",
"price": 32,
"image": "https://none.com/bagel",
"id": "1"
}
grpcurl -d '{}' -plaintext localhost:5050 DonutShop/GetVersion
sample response
{
"number": "v0.1"
}
grpcurl -d '{"name":"bagel","price":32,"image":"https://none.com/bagel","id":"001"}' -plaintext localhost:5050 DonutShop/MakeDonut
{
"name": "bagel"
}
curl http://localhost:9092/metrics