gRPC-Core bindings for OCaml
- Connection with insecure credentials
- Connection with credentials
- Unary RPC
- Server streaming RPC
- Client streaming RPC
- Bidirectional streaming RPC
- Interceptors in server
- Interceptors in client
- libgrpc (>= 1.45)
grpc.stub
... just a C FFI using ctypesgrpc.core
... wrappers forgrpc.stub
with lwtgrpc.basic
... utilities (logger and header) for client and serversgrpc.client
... client library usinggpc.core
with ocaml-protoc-plugingrpc.server
... server library usinggrpc.core
with ocaml-protoc-plugin
$ direnv allow
$ dune exec example/server/main.exe &
main.exe: [DEBUG] run gRPC echo server on localhost:50051 ...
$ dune exec example/client/main.exe
main.exe: [grpc.server] get request on /grpc_test.Echo/Greet
main.exe: [DEBUG] x-foo: <empty>
main.exe: [DEBUG] request-id: request-id-is-9344
main.exe: [grpc.server] send response in 0.000029 sec
1
main.exe: [grpc.server] get request on /grpc_test.Echo/Greet
main.exe: [DEBUG] x-foo: <empty>
main.exe: [DEBUG] request-id: request-id-is-26685
main.exe: [grpc.server] send response in 0.000015 sec
2
main.exe: [grpc.server] get request on /grpc_test.Echo/Greet
main.exe: [DEBUG] x-foo: <empty>
main.exe: [DEBUG] request-id: request-id-is-30182
main.exe: [grpc.server] send response in 0.000015 sec
3
main.exe: [grpc.server] get request on /grpc_test.Echo/Greet
main.exe: [DEBUG] x-foo: <empty>
main.exe: [DEBUG] request-id: request-id-is-31641
main.exe: [grpc.server] send response in 0.000015 sec
4
main.exe: [grpc.server] get request on /grpc_test.Echo/Greet
main.exe: [DEBUG] x-foo: <empty>
main.exe: [DEBUG] request-id: request-id-is-30439
main.exe: [grpc.server] send response in 0.000027 sec
5
main.exe: [DEBUG] response: hello
- remove all the
grep TODO
s - implement interop test
- credentials
- support other RPCs not implemented
- documentation