mirror of
https://github.com/zap-proto/ocaml-rpc.git
synced 2026-10-30 15:04:28 +00:00
This switches capnp-rpc from Lwt to Eio. One particularly nice side effect of this is that `Service.return_lwt` has gone, as there is no distinction now between concurrent and non-concurrent service methods.
28 lines
719 B
OCaml
28 lines
719 B
OCaml
open Eio.Std
|
|
open Capnp_rpc.Std
|
|
|
|
module Version : sig
|
|
type t = [`Version_ed7d11372e0a7243] Capability.t
|
|
|
|
val read : t -> string
|
|
end
|
|
|
|
type t = [`Registry_d9975f668b337b6d] Capability.t
|
|
|
|
val set_echo_service : t -> Echo.t -> unit
|
|
|
|
val echo_service : t -> Echo.t
|
|
(** Waits until unblocked before returning. *)
|
|
|
|
val echo_service_promise : t -> Echo.t
|
|
(** Returns a promise immediately. Resolves promise when unblocked.
|
|
(should appear to work the same as [echo_service] to users) *)
|
|
|
|
val unblock : t -> unit
|
|
|
|
val complex : t -> Echo.t * Version.t
|
|
(** [complex t] returns two capabilities in a single, somewhat complex, message. *)
|
|
|
|
val local : sw:Switch.t -> unit -> t
|
|
(** [local ~sw ()] is a new local registry. *)
|