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.
17 lines
701 B
OCaml
17 lines
701 B
OCaml
open Capnp_rpc.Std
|
|
open Capnp_rpc_net
|
|
|
|
include Restorer.LOADER
|
|
|
|
type loader = [`Logger_beacebd78653e9af] Sturdy_ref.t -> label:string -> Restorer.resolution
|
|
(** A function to create a new in-memory logger with the given label and sturdy-ref. *)
|
|
|
|
val create : make_sturdy:(Restorer.Id.t -> Uri.t) -> _ Eio.Path.t -> t * loader Eio.Promise.u
|
|
(** [create ~make_sturdy dir] is a database that persists services in [dir] and
|
|
a resolver to let you set the loader (we're not ready to set the loader
|
|
when we create the database). *)
|
|
|
|
val save_new : t -> label:string -> Restorer.Id.t
|
|
(** [save_new t ~label] adds a new logger with label [label] to the store and
|
|
returns its newly-generated ID. *)
|