Server.Rpctype unary = string -> (Grpc.Status.t * string option) Lwt.tunary is the type for a unary grpc rpc, one request, one response.
type client_streaming =
string Lwt_stream.t ->
(Grpc.Status.t * string option) Lwt.tclient_streaming is the type for an rpc where the client streams the requests and the server responds once.
type server_streaming = string -> (string -> unit) -> Grpc.Status.t Lwt.tserver_streaming is the type for an rpc where the client sends one request and the server sends multiple responses.
type bidirectional_streaming =
string Lwt_stream.t ->
(string -> unit) ->
Grpc.Status.t Lwt.tbidirectional_streaming is the type for an rpc where both the client and server can send multiple messages.
type t = | Unary of unary| Client_streaming of client_streaming| Server_streaming of server_streaming| Bidirectional_streaming of bidirectional_streamingt represents the types of rpcs available in gRPC.
val unary : f:unary -> H2.Reqd.t -> unit Lwt.tunary ~f reqd calls f with the request obtained from reqd and handles sending the response.
val client_streaming : f:client_streaming -> H2.Reqd.t -> unit Lwt.tclient_streaming ~f reqd calls f with a stream to pull requests from and handles sending the response.
val server_streaming : f:server_streaming -> H2.Reqd.t -> unit Lwt.tserver_streaming ~f reqd calls f with the request optained from reqd and handles sending the responses pushed out.
val bidirectional_streaming :
f:bidirectional_streaming ->
H2.Reqd.t ->
unit Lwt.tbidirectional_streaming ~f reqd calls f with a stream to pull requests from and andles sending the responses pushed out.