Restorer.Table
create make_sturdy
is a new in-memory-only table. make_sturdy id
converts an ID to a full URI, by adding the hosting vat's address and fingerprint.
of_loader (module Loader) l
is a new caching table that uses Loader.load l sr (Loader.hash id)
to restore services that aren't in the cache.
val add : t -> Id.t -> 'a Capnp_rpc_lwt.Capability.t -> unit
add t id cap
adds a mapping to t
. It takes ownership of cap
(it will call Capability.dec_ref cap
on clear
).
val sturdy_ref : t -> Id.t -> 'a Capnp_rpc_lwt.Sturdy_ref.t
sturdy_ref t id
is a sturdy ref that can be used to restore service id
.
remove t id
removes id
from t
. It decrements the capability's ref count if it was added manually with add
.
val clear : t -> unit
clear t
removes all entries from the table.