Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

Commit 5e4cfdd

Browse files
committed
Update readme with gRPC info
1 parent 4dbdb1f commit 5e4cfdd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ gateway. If the watch feature of `docker-compose` is enabled, the services will
3939
automatically rebuilt and redeployed every time the `common` module or their own
4040
`solutions/dayX` module is updated.
4141

42+
### Using with gRPC
43+
I tried also implementing all services using gRPC, and half-succeeded. If running
44+
the project through `docker-compose` it's possible to call any service using `grpcurl`
45+
like this:
46+
```shell
47+
$ grpcurl -proto common/proto/adventservice.proto \
48+
-authority day09.grpc.aoc2024.se \
49+
-insecure \
50+
-d "$(cat input/day9 | jq -Rs '{input: .}')" \
51+
localhost:50051 adventservice.AdventService/SolvePart1
52+
```
53+
Just replace `day09.grpc.aoc2024.se` with the correct day, and `SolvePart1` with
54+
`SolvePart2`. It will not work with the Kubernetes setup however, because the
55+
ingress controller isn't configured for it. Apparently the Nginx ingress controller
56+
can't handle both gRPC and HTTP(S) using the same URL, and that was more time
57+
than I was willing to spend on it. :-)
58+
4259
## Progress
4360
* ⭐ means solved
4461
* 🥸 means solved, but takes 10 seconds or more to run

0 commit comments

Comments
 (0)